-
Notifications
You must be signed in to change notification settings - Fork 98
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
Instablity Crash on Vulkan App using DLL with TLS and On Exit #52
Comments
Hi, thanks for your feedback, I will find time to test and fix this issue. |
Hi, I just created a fix for this issue and it works fine on my computer. Please check out the MmpTlsFixup branch to test. if (fdwReason == DLL_PROCESS_DETACH) {
MmCleanup();
} |
In addition, you need to add the |
@bb107 Thanks a lot, I will test and let you know. |
@bb107 Hey! I tested Also it seems it fixed some parts of this issue #53 You can close this issue and mark it as fixed. I appreciate if you can look or guess the root of the follow up issue. |
@bb107 New update, Now it crashes randomly in mid app |
Hi, could you provide an example to reproduce these problems? |
Hi @bb107, Unfortunately they happen rarely for instance, I am using my project for 3 days and it didn't happen again, My guess is it's all about threading and timing. I update the repo if I could find more consistent data to provide you. |
Hi @bb107, After 2 years I'm back :D
I am working on a complicated project in Godot game engine. My project require loading some dll from memory which uses TLS (from Godot SDK) I tried many manual mappers and only one that works properly is yours which is really impressive.
However, After using MemoryModulePP (Static Link, DLL) It causes a instability in Godot when it tries to initialize Vulkan, D3D12, Sound Engine etc. and Leads to a
_debugbreak
And also It causes crash on Exit.I did try many things and spent 3 days on debugging But I couldn't find the root, All I know is this is caused by loading MemoryModulePP and I guess it's caused by the hooks, Note that this only happens after loading the dll with TLS. Without TLS it looks fine.
I prepared a fully pre-setup project for looking into the issue which can be downloaded here.
This project contains Godot 4.3 engine, pre-built Godot SDK and GDExtension that uses MemoryModulePP. However in this test project I couldn't reproduce the startup crash on vulkan but exit crash is happening which I believe it's connected to the same startup bug.
This is a very critical project for me and I will really appreciate it if you can help me diagnose the issue and fix it.
One important thing is the startup initialization crash always happens after calling to
RtlFreeHeap
and raised byRtlReportCriticalFaliure
and it happens same on Vulkan, D3D12, XInput etc.Also sometimes break will be on MemoryModulePP itself at this line.
Do you have any idea or lead to fix the issue?
Thanks
Update 2 :
I got some clue on what is happening, So I believe something going wrong with hooks and things done in MemoryModulePP initialization.
So If I delay loading of MemoryModule.dll which happens when it is needed to be called from, Startup instability won't happen.
The text was updated successfully, but these errors were encountered: