devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

[Issue Report]: Game crash upon loading new level (Windows ARM64)

Open ArminiusTux opened this issue 1 month ago • 9 comments

Operating System

Other (please specify)

DevilutionX version

1.5.5

Describe

Diabolical greetings,

ever since version 1.5.4 (v1.5.5 has the very same problem) the game crashes upon loading a new level (new game or saved game is irrelevant). Oddly enough this only happens on Release builds (MSVC), Debug compilations do not show this behaviour at all.

'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\devilutionx.exe'. Module was built without symbols.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\bz2.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\zlib1.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\SDL2_image.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\fmt.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\SDL2.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\jpeg62.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\libpng16.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\tiff.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\libwebpdemux.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\libwebp.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\liblzma.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\CODING\devilutionX\build\Release\libsharpyuv.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\mscms.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\icm32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\MMDevAPI.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\avrt.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\hid.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\XInput1_4.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\InputHost.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\dinput8.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\Windows.Gaming.Input.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\twinapi.appcore.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\TextInputFramework.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\d3d9.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\DXCore.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\d3d9on12.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\D3D12.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\D3D12Core.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_f0d2f6fdb81bdd2d\qcdx12arm64xum.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_f0d2f6fdb81bdd2d\qcegparm64x.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_f0d2f6fdb81bdd2d\qcegparm64x.dll'
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\dxilconv.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_f0d2f6fdb81bdd2d\qcgpuarm64xcompilercore.DLL'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\D3DSCache.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\userenv.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\directxdatabasehelper.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Unloaded 'C:\Windows\System32\ResourcePolicyClient.dll'
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Unloaded 'C:\Windows\System32\ResourcePolicyClient.dll'
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\AudioSes.dll'. Symbol loading disabled by Include/Exclude setting.
'devilutionx.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'. Symbol loading disabled by Include/Exclude setting.
Exception thrown at 0x00007FF6A2734308 in devilutionx.exe: 0xC0000005: Access violation reading location 0x00007FF6A2897000.
Image

call stack:

>	devilutionx.exe!00007ff6a2734308()	Unknown
 	devilutionx.exe!00007ff6a27347b0()	Unknown
 	devilutionx.exe!00007ff6a2736a1c()	Unknown
 	devilutionx.exe!00007ff6a26228f0()	Unknown
 	devilutionx.exe!00007ff6a262ec20()	Unknown
 	devilutionx.exe!00007ff6a261b5ac()	Unknown
 	devilutionx.exe!00007ff6a261bd24()	Unknown
 	devilutionx.exe!00007ff6a265dc80()	Unknown
 	devilutionx.exe!00007ff6a265df70()	Unknown
 	devilutionx.exe!00007ff6a2604a70()	Unknown
 	devilutionx.exe!00007ff6a277488c()	Unknown
 	devilutionx.exe!00007ff6a2774074()	Unknown
 	devilutionx.exe!00007ff6a277410c()	Unknown
 	kernel32.dll!00007fffe8ce8740()	Unknown
 	ntdll.dll!00007fffe9fc4464()	Unknown

Hoping for a quick fix, bye.

To Reproduce

  1. change level (go upstairs or downstairs)

Expected Behavior

No response

Additional context

No response

ArminiusTux avatar Nov 01 '25 18:11 ArminiusTux

Can you try a RelWithDebInfo build? That'll give a more readable stack trace

glebm avatar Nov 01 '25 19:11 glebm

Of course, here you go:

cmake .. -G "Visual Studio 17 2022" -A arm64 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DNONET=ON

The network switch was and is still necessary, as the game won't compile otherwise (MSVC and clang).

call stack:

>	devilutionx.exe!devilution::`anonymous namespace'::TFit_Obj5(int t) Line 116	C++
 	devilutionx.exe!devilution::`anonymous namespace'::SpecialThemeFit(int i, devilution::theme_id t) Line 264	C++
 	devilutionx.exe!devilution::InitThemes() Line 853	C++
 	devilutionx.exe!devilution::LoadGameLevel(bool firstflag, devilution::lvl_entry lvldir) Line 2796	C++
 	devilutionx.exe!devilution::ShowProgress(devilution::interface_mode uMsg) Line 295	C++
 	devilutionx.exe!devilution::`anonymous namespace'::GameEventHandler(const SDL_Event & event, unsigned short modState) Line 794	C++
 	devilutionx.exe!devilution::`anonymous namespace'::RunGameLoop(devilution::interface_mode uMsg) Line 868	C++
 	devilutionx.exe!devilution::StartGame(bool bNewGame, bool bSinglePlayer) Line 2400	C++
 	devilutionx.exe!devilution::`anonymous namespace'::InitMenu(devilution::_selhero_selections type) Line 59	C++
 	devilutionx.exe!devilution::mainmenu_loop() Line 162	C++
 	devilutionx.exe!devilution::DiabloMain(int argc, char * * argv) Line 2465	C++
 	devilutionx.exe!main_getcmdline() Line 83	C
 	[External Code]	
Image Image

ArminiusTux avatar Nov 01 '25 20:11 ArminiusTux

To Reproduce

  1. change level (go upstairs or downstairs)

I don't suppose you've tested the same save file on a different platform? Or different save files on the same platform?

StephenCWills avatar Nov 01 '25 21:11 StephenCWills

I even tried new games - upon entering the cathedral the game crashes.😒 When using the debug builds, everything is fine (just as with the release builds of v1.5.3 and prior.

ArminiusTux avatar Nov 01 '25 22:11 ArminiusTux

I even tried new games - upon entering the cathedral the game crashes.😒 When using the debug builds, everything is fine (just as with the release builds of v1.5.3 and prior.

Perhaps you can try to bisect it then? These are the only changes I see in the dungeon generation code between 1.5.3 and 1.5.5.

  • 834d86f860436f29f401917afbe8e9e7dd7a862e
  • 869ff8d7fa6d2d3b8a3f3f41aac982f354d4d912

StephenCWills avatar Nov 02 '25 00:11 StephenCWills

Hoping for a quick fix, bye.

Probably not, sounds like compiler issues to me and likely only something that someone with a Windows Arm machine can solve.

AJenbo avatar Nov 02 '25 09:11 AJenbo

Perhaps you can try to bisect it then? These are the only changes I see in the dungeon generation code between 1.5.3 and 1.5.5.

I omitted both changes and ended up with the same result.

Hoping for a quick fix, bye.

Probably not, sounds like compiler issues to me and likely only something that someone with a Windows Arm machine can solve.

You must be right, I went back to v1.5.3 and also ended up with a broken Release build and a working Debug build.

ArminiusTux avatar Nov 02 '25 13:11 ArminiusTux

To end on a positive note, I compiled DevilutionX with clang (via MSYS2):

  • To avoid this error:
[454/488] Building CXX object test/CMakeFiles/animationinfo_test.dir/animationinfo_test.cpp.obj
FAILED: [code=1] test/CMakeFiles/animationinfo_test.dir/animationinfo_test.cpp.obj
C:\msys64\clangarm64\bin\ccache.exe C:\msys64\clangarm64\bin\c++.exe -DBUILD_TESTING -DDEVILUTIONX_DEFAULT_RESAMPLER=Speex -DDEVILUTIONX_DISPLAY_TEXTURE_FORMAT=SDL_PIXELFORMAT_RGB888 -DDEVILUTIONX_PALETTE_TRANSPARENCY_BLACK_16_LUT -DDEVILUTIONX_RESAMPLER_SDL -DDEVILUTIONX_RESAMPLER_SPEEX -DDISABLE_TCP -DDISABLE_ZERO_TIER -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DNONET -IC:/CODING/devilutionX/Source -IC:/CODING/devilutionX/build/Source -IC:/CODING/devilutionX/build/_deps/libsmackerdec-src/include -IC:/CODING/devilutionX/build/_deps/simpleini-src -IC:/CODING/devilutionX/3rdParty/tl -IC:/CODING/devilutionX/3rdParty/hoehrmann_utf8 -IC:/CODING/devilutionX/build/_deps/libmpq-src -IC:/CODING/devilutionX/3rdParty/PKWare/. -IC:/CODING/devilutionX/build/_deps/sdl_audiolib-src/include -IC:/CODING/devilutionX/build/_deps/sdl_audiolib-src/src -IC:/CODING/devilutionX/build/_deps/sdl_audiolib-build -IC:/CODING/devilutionX/build/_deps/find_steam_game-src -isystem C:/msys64/clangarm64/include/SDL2 -fno-rtti -fno-exceptions -O3 -DNDEBUG -std=c++20 -flto=thin -ffunction-sections -fdata-sections -Wall -Wextra -Wno-unused-parameter -fmacro-prefix-map=C:/CODING/devilutionX/= -pthread -MD -MT test/CMakeFiles/animationinfo_test.dir/animationinfo_test.cpp.obj -MF test\CMakeFiles\animationinfo_test.dir\animationinfo_test.cpp.obj.d -o test/CMakeFiles/animationinfo_test.dir/animationinfo_test.cpp.obj -c C:/CODING/devilutionX/test/animationinfo_test.cpp
C:/CODING/devilutionX/test/animationinfo_test.cpp:115:30: error: no member named 'setprecision' in namespace 'std'
  115 |                             << std::fixed << std::setprecision(2)
      |                                                   ^~~~~~~~~~~~
1 error generated.
[456/488] Linking CXX executable devilutionx.exe
ninja: build stopped: subcommand failed.

  • The source file animationinfo_test.cpp, needs a tiny addtion at line 5: #include <iomanip>

  • The result just works fine - no crashes, be it new games (red tile level design) or old save games (grey tile level design).

  • on the plus side: clang compiles roughly 10x faster than MSVC

  • on down side: it links to tons of dependencies:

SDL2.dll*         libSvtAv1Enc-3.dll*   libbrotlidec.dll*  libdav1d-7.dll*  libjxl.dll*      libpng16-16.dll*    libunwind.dll*        libyuv.dll*
SDL2_image.dll*   libaom.dll*           libbrotlienc.dll*  libdeflate.dll*  libjxl_cms.dll*  librav1e.dll*       libwebp-7.dll*        libzstd.dll*
devilutionx.exe*  libavif-16.dll*       libbz2-1.dll*      libjbig-0.dll*   liblcms2-2.dll*  libsharpyuv-0.dll*  libwebpdemux-2.dll*   zlib1.dll*
libLerc.dll*      libbrotlicommon.dll*  libc++.dll*        libjpeg-8.dll*   liblzma-5.dll*   libtiff-6.dll*      libwinpthread-1.dll*

ArminiusTux avatar Nov 02 '25 19:11 ArminiusTux

@ArminiusTux Would you be able to try building the linked PR build and see if it fixes the original problem?

kphoenix137 avatar Dec 09 '25 00:12 kphoenix137

Dear @kphoenix137 ,

I applied your patch to v1.5.5 (v1.6.0git produces too many errors - seems a lot of asset restructering is going on here) and the crashes, upon changing the dungeon level or entering/exiting the cathedral remain.

I'll publish Clang release builds for the time being (although MSVC debug builds work as well).

ArminiusTux avatar Dec 21 '25 19:12 ArminiusTux