Windows: Keep ZDSR DLL loaded during shutdown - #110
Open
chenxianghui1130 wants to merge 1 commit into
Open
Conversation
ZDSR may still execute asynchronous code while Prism shuts down. Unloading its delay-loaded DLL at that point causes intermittent access violations in the host process. Signed-off-by: chenxianghui1130 <chenxianghui1130@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ZDSR can leave asynchronous work running after Prism releases its backend.
prism_shutdowncurrently unloadsZDSRAPI.dll/ZDSRAPI_x64.dll, which intermittently leaves the host executing code from an unloaded module.Windows Error Reporting captured
ZDSRAPI_x64.dll_unloadedwith0xc0000005at the same offset across separate runs. An automated application exit loop reproduced this in 3/5 runs with v0.18.2. Keeping the ZDSR delay-loaded DLL resident until process termination produced 30/30 clean exits in Debug and Release builds.Prism still releases the backend, context, and availability enumerator normally. Other delay-loaded backends are unchanged.
A CI regression test is not included because reproduction requires the proprietary ZDSR installation and is timing-dependent.
Fixes #109
AI assistance was used for crash analysis and drafting. I reproduced the issue, reviewed the change, and verified the results.