Problem
When start_session/connect fail the version compatibility check (_assert_connection_compat raises Incompatible x64dbg plugin and client versions ...), the SUB event thread (_sub_thread) has already been started by _init_connection. That thread is not a daemon, so the Python process hangs and never exits after the exception propagates.
Seen during the release smoke test: a script that catches the compat AssertionError and returns still leaves a live python process.
Fix
Tear down the connection (which joins/stops _sub_thread) when the compat assert fails — e.g. wrap the _assert_connection_compat() call so a failure calls _close_connection() before re-raising.
Verify
Point a client at a plugin with a different COMPAT_VERSION, call start_session, catch the Incompatible... error, and confirm the process exits cleanly (no lingering thread/process).
Problem
When
start_session/connectfail the version compatibility check (_assert_connection_compatraisesIncompatible x64dbg plugin and client versions ...), the SUB event thread (_sub_thread) has already been started by_init_connection. That thread is not a daemon, so the Python process hangs and never exits after the exception propagates.Seen during the release smoke test: a script that catches the compat
AssertionErrorand returns still leaves a live python process.Fix
Tear down the connection (which joins/stops
_sub_thread) when the compat assert fails — e.g. wrap the_assert_connection_compat()call so a failure calls_close_connection()before re-raising.Verify
Point a client at a plugin with a different
COMPAT_VERSION, callstart_session, catch theIncompatible...error, and confirm the process exits cleanly (no lingering thread/process).