What do you need help with?
Question
Installation method
FAB
Issue area
Connection / WebRTC
Impact
Blocker - I cannot continue
Unreal Engine version
5.3.2 (Unreal Engine 5.3)
Convai Unreal Engine Plugin version
4.0.0-beta.24
Project setup
Blueprint and C++
Target platform
Unreal Editor
Where does it happen?
Not tested yet
Short summary
Source-inspection question: supported native listener/client lifetime boundary after disconnect and immediate reconnect. No runtime crash reproduced.
What happened?
We are using Unreal Engine 5.3.2 and ConvAI 4.0.0-beta.24 on Windows. The plugin is installed under the engine Marketplace plugins directory; the original installation method has not been confirmed.
This concern was discovered through source-code inspection, not through a reproducible runtime crash. In the inspected Unreal wrapper, the native client registers UConvaiSubsystem as its listener. Disconnect handling queues game-thread work that captures the shared subsystem and later accesses its current session/client. This raises a possible A-to-B stale-callback/cleanup concern during immediate replacement; we have not reproduced that ordering at runtime.
The supplied native SDK header exposes SetConvaiClientListner(IConvaiClientListner*), Disconnect(), and the ConvaiClient destructor, but we could not establish a documented callback-drain/lifetime guarantee from the available header.
Could Convai engineering clarify:
- Can callbacks occur on the old listener after SetConvaiClientListner(nullptr)?
- Can callbacks occur after Disconnect() returns?
- Can callbacks already in flight still enter the listener?
- Is there an API or synchronization point that guarantees callbacks have drained?
- At what point is it safe to destroy the listener and ConvaiClient, and what teardown order/thread is supported?
- Has this lifecycle behavior been addressed or documented in a newer Convai SDK/plugin?
We paused integration rather than assume callback quiescence or rely on a fixed delay.
What did you expect?
After ending connection A, there should be a documented safe point at which A’s listener and ConvaiClient can be destroyed and connection B can start without callbacks or cleanup from A affecting B. Please clarify the supported unregister/disconnect/drain/destruction sequence.
Steps to reproduce
Source-inspection scenario for engineering review, not confirmed runtime reproduction:
- Start connection/session A.
- End/disconnect A.
- Immediately start connection/session B.
- Queued/native callbacks originating from A may execute after B becomes current.
- We need to know the supported lifetime boundary for A’s IConvaiClientListner and ConvaiClient.
We have deliberately not attempted to induce a crash.
Unreal logs or error messages
No runtime error logs are available: this was identified during source inspection, and we deliberately did not attempt to induce a crash.
The existing Unreal wrapper in ConvaiSubsystem.cpp delays destruction of recently disconnected clients using a background task and a two-second sleep. Its comments discuss internal WebRTC threads still shutting down. That existing delay prompted our listener-lifetime question; it is not evidence that we reproduced a crash or that a fixed delay guarantees callbacks have drained.
No credentials, proprietary project source, private character data, or conversation logs are attached.
I checked the relevant documentation, resources, and similar forum posts before posting.
on
I confirm that I did not include API keys, tokens, passwords, secrets, private character data, private conversation logs, or customer data.
on