Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Violation in RegistrationSetBase dtor on game exit #34

Open
SteveTownsend opened this issue Sep 3, 2020 · 0 comments
Open

Access Violation in RegistrationSetBase dtor on game exit #34

SteveTownsend opened this issue Sep 3, 2020 · 0 comments

Comments

@SteveTownsend
Copy link

SteveTownsend commented Sep 3, 2020

Had to remove RAII usage of this class to avoid an AV when game is closing down. The VM seems non-viable for cleanup of this class. I have a work-round (don't use RAII, just let them leak on exit, who cares?) but for other use cases this might matter.

In general, there does not seem to be a good pattern for DLL resource cleanup - I also had to revert to using the VM to manage this part of my mod's lifecycle. I don't think this is fixable unless there is some event OnGameExit or similar, I just found it interesting.

Code comment on the fix I made is below:

/* do not clean this class up: SKSE::RegistrationSetBase::~Impl (?) faults per https://github.com/SteveTownsend/SmartHarvestSE/issues/200
* 
From Map file
	0001:0009a310       ??1RegistrationSetBase@Impl@SKSE@@QEAA@XZ 000000018009b310 f   CommonLibSSE:RegistrationSet.obj

WER output crash address:
	Sig[3].Value=SmartHarvestSE.dll
	Sig[6].Name=Exception Code
	Sig[6].Value=c0000005
	Sig[7].Name=Exception Offset
	Sig[7].Value=000000000009b343
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant