DescentDevelopers/Descent3

[Runtime Issue]: Launching the game causes “Debug Assertion Failed! `_CrtlsValidHeapPointer(block)`”

Jayman2000 opened this issue · 5 comments

Build Version

v1.6 770e9e8

Operating System Environment

  • Microsoft Windows (32-bit)
  • Microsoft Windows (64-bit)
  • Mac OS X
  • Linux (specify distribution and version below)

CPU Environment

  • x86 (32-bit Intel/AMD)
  • x86_64 (64-bit Intel/AMD)
  • ARM (32-bit)
  • ARM64 (64-bit; sometimes called AArch64)
  • Other (RISC V, PPC...)

Game Modes Affected

  • Single player
  • Anarchy
  • Hyper-Anarchy
  • Robo-Anarchy
  • Team Anarchy
  • Capture the Flag
  • Bounty
  • Entropy
  • Hoard
  • Monsterball
  • Cooperative

Game Environment

I’m using game data from the US Windows Dual-Jewel version of Descent 3 v1.4.

Description

When I launch the game on Windows, I get this error:

Microsoft Visual C++ Runtime Library

Debug Assertion Failed!

Program: …ous\Documents\Descent3\builds\win\Descent3\Debug\Descent3.exe
File: minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp
Line: 904

Expression: _CrtlsValidHeapPointer(block)

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)

Choose one of these options: Abort, Retry, Ignore

Regression Status

I don't know

Steps to Reproduce

  1. Compile a debug build of Descent 3 on Windows.
  2. Delete the %APPDATA%\Outrage Entertainment directory if it exists.
  3. Make sure that all of the required game files are in the same directory as Descent3.exe.
  4. Change directory into that directory.
  5. Run Descent3.exe -nointro.

Note: When you follow these steps to reproduce, you’ll encounter another bug before you encounter the bug that this bug report is about.

It's probably #587 or #574 , I did not test them on Windows.

Hi @Jayman2000 , I've just built the latest master on Windows 11 and could not reproduce the issue with your provided steps. Game runs fine on Debug and Release mode. Can you please try building from scratch and report back? If that does not work, we will need a crash back trace from a debug build to provide further assistance

I tried rebuilding Descent 3 from scratch on Windows 10, and I was still able to reproduce the bug. Here’s a backtrace:

0000009e`22fd9d90 00007ff8`09719362     KERNELBASE!RaiseException+0x69
*** WARNING: Unable to verify checksum for Descent3.exe
0000009e`22fd9e70 00007ff7`26e11e9d     VCRUNTIME140D!_CxxThrowException+0x132 [D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\throw.cpp @ 81]
0000009e`22fd9f00 00007ff7`26e11b1a     Descent3!std::_Throw_system_error_from_std_win_error+0x4d [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\system_error @ 723]
0000009e`22fd9f90 00007ff7`26e11c25     Descent3!std::_Check_convert_result+0x1a [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\chrono @ 49]
0000009e`22fd9fc0 00007ff7`26e10e64     Descent3!std::filesystem::_Convert_narrow_to_wide+0xf5 [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\filesystem @ 47]
0000009e`22fda080 00007ff7`26e427a6     Descent3!std::filesystem::_Convert_stringoid_to_wide+0x64 [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\filesystem @ 197]
0000009e`22fda0f0 00007ff7`26e41f5d     Descent3!std::filesystem::_Convert_Source_to_wide,std::allocator >,std::filesystem::_Normal_conversion>+0x56 [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\filesystem @ 281]
0000009e`22fda160 00007ff7`2702f5ad     Descent3!std::filesystem::path::path,std::allocator >,0>+0x3d [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\filesystem @ 655]
0000009e`22fda1a0 00007ff7`26f4dfd0     Descent3!PilotSelect+0xdd [C:\Users\Anon Y. Mous\Documents\Descent3\Descent3\pilot.cpp @ 921]
0000009e`22fde0d0 00007ff7`26e86366     Descent3!MainMenu+0x370 [C:\Users\Anon Y. Mous\Documents\Descent3\Descent3\menu.cpp @ 769]
0000009e`22fdf1c0 00007ff7`26e860aa     Descent3!MainLoop+0x86 [C:\Users\Anon Y. Mous\Documents\Descent3\Descent3\descent.cpp @ 545]
0000009e`22fdf210 00007ff7`2710761f     Descent3!Descent3+0x3ba [C:\Users\Anon Y. Mous\Documents\Descent3\Descent3\descent.cpp @ 507]
0000009e`22fdf700 00007ff7`27106b4d     Descent3!oeD3LnxApp::run+0xf [C:\Users\Anon Y. Mous\Documents\Descent3\Descent3\sdlmain.cpp @ 142]
0000009e`22fdf730 00007ff7`2755dfd2     Descent3!WinMain+0x5bd [C:\Users\Anon Y. Mous\Documents\Descent3\Descent3\sdlmain.cpp @ 324]
0000009e`22fdfd70 00007ff7`2755dec2     Descent3!invoke_main+0x32 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 107]
0000009e`22fdfdb0 00007ff7`2755dd7e     Descent3!__scrt_common_main_seh+0x132 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288]
0000009e`22fdfe20 00007ff7`2755e06e     Descent3!__scrt_common_main+0xe [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 331]
0000009e`22fdfe50 00007ff8`46797374     Descent3!WinMainCRTStartup+0xe [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_winmain.cpp @ 17]
0000009e`22fdfe80 00007ff8`4863cc91     KERNEL32!BaseThreadInitThunk+0x14
0000009e`22fdfeb0 00000000`00000000     ntdll!RtlUserThreadStart+0x21

While I was creating that backtrace, the bug stopped happening. After some investigation, I’ve updated the steps to reproduce in order to (hopefully) make it easier to reproduce this bug.

Delete the %APPDATA%\Outrage Entertainment directory if it exists.

that can be a factor, knowing that it crashes on pilot selection. I'll test again later and let you know

I still couldn't reproduce the crash in a Release build, but in Debug I could identify the problem and hopefully fix it.
Let me know if this works for you.