Skip to content

Constant SIGTRAP in the MemoryManager destructor only on windows #403

Open
@MonsieurBleu

Description

@MonsieurBleu

I am working on v0.10.1 and on windows I have this crash each time I close the program :

warning: Critical error detected c0000374
Thread 1 received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffe3b49c883 in ntdll!RtlIsZeroMemory () from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb) up
#1 0x00007ffe3b4a595a in ntdll!.misaligned_access ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb)
#2 0x00007ffe3b4a5c3a in ntdll!.misaligned_access ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb)
#3 0x00007ffe3b4b1c35 in ntdll!.misaligned_access ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb)
#4 0x00007ffe3b3cc3ac in ntdll!RtlGetCurrentServiceSessionId ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb)
#5 0x00007ffe3b3caff1 in ntdll!RtlFreeHeap () from C:\WINDOWS\SYSTEM32\ntdll.dll
(gdb)
#6 0x00007ffe38fb364b in ucrtbase!_free_base ()
from C:\WINDOWS\System32\ucrtbase.dll
(gdb)
#7 0x00007ff732584174 in reactphysics3d::HeapAllocator::~HeapAllocator (
this=0x7ff732792550 PG::common+16, __in_chrg=)
at C:\DEV\libs_build\reactphysics3d-0.10.1\src\memory\HeapAllocator.cpp:70
70 mBaseAllocator.release(static_cast<void*>(unit), unitSize + sizeHeader);
(gdb)
#8 0x00007ff732685fce in reactphysics3d::MemoryManager::~MemoryManager (
this=0x7ff732792540 PG::common, __in_chrg=)
at C:/DEV/libs_build/reactphysics3d-0.10.1/include/reactphysics3d/memory/MemoryManager.h:83
83 ~MemoryManager() = default;
(gdb)

I've tried to remove all physics call that I made one by one, I even made a special new project with the minimal amount of code (only common and world creation) and I always have the same problem.
When I'm testing this on my Linux device, everything works as expected, the crash only occurs on Windows.

For compiling the library I used cmake gui and mingw g++. I compile my final project in c++23 with mingw g++.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions