godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.22k stars 21.22k forks source link

Godot 4.* Crashed on Windows11 when open. #84562

Closed hatrd closed 1 year ago

hatrd commented 1 year ago

Godot version

4.1.3

System information

Windows11, Godot 4.* , AMD Ryzen 7 7840H, RTX4050

Issue description

Open and crashed. Here's part of the dmp file.

PROCESS_NAME:  Godot_v4.1.3-stable_win64.exe

READ_ADDRESS:  000001c715690000 

ERROR_CODE: (NTSTATUS) 0xc0000005 - 0x%p            0x%p                    %s

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  000001c715690000
STACK_TEXT:  
000000b9`ee9fc6b8 00007ffa`80ca3d78     : 00000000`00000c00 000001c7`0ef4fde0 00000000`00000c00 000001c7`0ef4fde0 : msvcr90!memcpy+0xb0
000000b9`ee9fc6c0 00007ff6`1264d0ae     : 00000000`80006010 00000000`00000001 000000b9`00000000 00000000`00000000 : wintab32+0x3d78
000000b9`ee9fc760 00007ff6`0dd63e77     : 00000000`00000000 00000000`00000000 000001c7`0d9142a0 00000000`001706ea : Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x3e8279e
000000b9`ee9fc7c0 00007ff6`0dd66266     : 0000398c`3d0daf5e 000000b9`ee9fee30 00000000`00000000 00000000`00000086 : Godot_v4_1_3_stable_win64+0x83e77
000000b9`ee9fe960 00007ffa`8a178241     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`80006010 : Godot_v4_1_3_stable_win64+0x86266
000000b9`ee9fe9a0 00007ffa`8a177a8b     : 00000000`001706ea 00007ff6`0dd66240 00000000`001706ea 00000000`00000006 : user32!UserCallWinProcCheckWow+0x2d1
000000b9`ee9feb00 00007ffa`4ec41d74     : 000001c7`0e3bd860 00000000`001706ea 00007ff6`0dd66240 00000000`0000001c : user32!CallWindowProcW+0x8b
000000b9`ee9feb50 00007ffa`8a178241     : 00000000`00000000 00000000`00000000 00000000`80006010 00000000`80006010 : opengl32!wglWndProc+0x294
000000b9`ee9febc0 00007ffa`8a177efc     : 00000000`00002308 00007ffa`4ec41ae0 00000000`001706ea 00000000`80000000 : user32!UserCallWinProcCheckWow+0x2d1
000000b9`ee9fed20 00007ffa`8a18302d     : 00000000`00000000 00000000`00000000 00000000`00000001 00000000`00000000 : user32!DispatchClientMessage+0x9c
000000b9`ee9fed80 00007ffa`8a4d3434     : 000000b9`ee9fee18 00000011`00000050 00007ffa`87f0bbb4 00007ffa`80ca3280 : user32!_fnDWORD+0x3d
000000b9`ee9fede0 00007ffa`87f0bbb4     : 00007ff6`0dd5da09 000000b9`ee9fef20 00007ff6`1019ef05 000001c7`2c4ba020 : ntdll!KiUserCallbackDispatcherContinue
000000b9`ee9fee68 00007ff6`0dd5da09     : 000000b9`ee9fef20 00007ff6`1019ef05 000001c7`2c4ba020 000001c7`2c5b26b0 : win32u!NtUserSetForegroundWindow+0x14
000000b9`ee9fee70 00007ff6`101c38a9     : 00000000`00000001 00007ffa`00000000 00000000`ffffffff 00007ff6`12b6e0a0 : Godot_v4_1_3_stable_win64+0x7da09
000000b9`ee9feee0 00007ff6`1021f788     : 000000b9`ee9ff140 00007ff6`12a9a45e 00000000`00000000 000001c7`3762a530 : Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x19f8f99
000000b9`ee9fef70 00007ff6`0de470f7     : 000000b9`ee9ff260 000000b9`ee9ff190 000001c7`32259810 000001c7`2c4ba020 : Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x1a54e78
000000b9`ee9ff050 00007ff6`12144086     : 00007ff6`13148df8 000001c7`2c4ba020 000000b9`ee9ff358 000001c7`0d8ec480 : Godot_v4_1_3_stable_win64+0x1670f7
000000b9`ee9ff080 00007ff6`11ef093a     : 000001c7`2c5f47a0 00000000`00000000 00007ff6`14f3d760 00000000`00000000 : Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x3979776
000000b9`ee9ff150 00007ff6`126cf585     : 00000000`00000000 00000000`00000001 0000398c`3d0db60e 00000000`00000000 : Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x372602a
000000b9`ee9ff1e0 00007ff6`121c2355     : 0000398c`3d0db54e 00000000`00000000 00000000`00000000 00007ff6`12a9c716 : Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x3f04c75
000000b9`ee9ff2b0 00007ff6`10187f4e     : 000001c7`0d9142a0 00007ff6`14f684c0 00000000`00000000 00007ffa`00000000 : Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x39f7a45
000000b9`ee9ff370 00007ff6`0dd3713f     : 00000000`00000002 000001c7`2c5b2201 00000000`00000000 00000000`00000000 : Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x19bd63e
000000b9`ee9ff460 00007ff6`0dd85a66     : 000001c7`0d9142a0 000000b9`00000000 000001c7`0ad106d8 00007ff6`0dd12d30 : Godot_v4_1_3_stable_win64+0x5713f
000000b9`ee9ff680 00007ff6`12b449e5     : 000001c7`00000001 000000b9`ee9ffb5c 00000000`00000001 00000000`00000001 : Godot_v4_1_3_stable_win64+0xa5a66
000000b9`ee9ffb30 00007ff6`0dce13c1     : 00000000`00000000 00000000`00000042 00000000`00000000 00000000`00000000 : Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x437a0d5
000000b9`ee9ffb80 00007ff6`0dce14d6     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : Godot_v4_1_3_stable_win64+0x13c1
000000b9`ee9ffc50 00007ffa`8930257d     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : Godot_v4_1_3_stable_win64+0x14d6
000000b9`ee9ffc80 00007ffa`8a48aa78     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x1d
000000b9`ee9ffcb0 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x28

It crashed in removeScheduler, due to memcpy to 0x0. Symbol: Godot_v4_1_3_stable_win64!ZN6embree13TaskScheduler15removeSchedulerERKNS_3RefIS0_EE+0x3e8279e

Godot3 can be opened successfully. All versions of Godot4 will crash. Binaraies are downloaded from https://godotengine.org/download/windows/ Both .NET and normal exe would crash.

Steps to reproduce

  1. open godot 4.1.3
  2. "Please Confirm..." window pops up.
  3. No matter what I choose, as long as this window closes, godot crashes.

Minimal reproduction project

No project.

Chaosus commented 1 year ago

Do you have a running instances of the overclocking software like MSI Afterburner? If so, try to turn it off.

hatrd commented 1 year ago

@Chaosus No. I don't have anything like MSI Afterburner. And I tried in Safe Mode, still crashed. I tried to update the driver, Limit godot to run on Integrated Graphics, still crashes.

I rebuilt godot with debug info. Same problem.

STACK_TEXT:  
msvcr90!memcpy+0xb0
wintab32+0x3d78
godot_windows_editor_x86_64!DisplayServerWindows::_process_activate_event+0x145
godot_windows_editor_x86_64!DisplayServerWindows::WndProc+0x606
godot_windows_editor_x86_64!WndProc+0x26
user32!UserCallWinProcCheckWow+0x2d1
user32!CallWindowProcW+0x8b
opengl32!wglWndProc+0x294
user32!UserCallWinProcCheckWow+0x2d1
user32!DispatchClientMessage+0x9c
user32!_fnDWORD+0x3d
ntdll!KiUserCallbackDispatcherContinue
win32u!NtUserDestroyWindow+0x14
godot_windows_editor_x86_64!DisplayServerWindows::delete_sub_window+0x26d
godot_windows_editor_x86_64!Window::_clear_window+0x109
godot_windows_editor_x86_64!Window::set_visible+0x190
godot_windows_editor_x86_64!MethodBindT<Window>::call+0x70
godot_windows_editor_x86_64!Object::callp+0x223
godot_windows_editor_x86_64!Callable::callp+0x15b
godot_windows_editor_x86_64!CallQueue::_call_function+0xc8
godot_windows_editor_x86_64!CallQueue::flush+0x2f6
godot_windows_editor_x86_64!SceneTree::process+0x141
godot_windows_editor_x86_64!Main::iteration+0x42d
godot_windows_editor_x86_64!OS_Windows::run+0x35
godot_windows_editor_x86_64!widechar_main+0x1bc
godot_windows_editor_x86_64!_main+0x47
godot_windows_editor_x86_64!main+0x9
godot_windows_editor_x86_64!__scrt_common_main_seh+0x106
kernel32!BaseThreadInitThunk+0x1d
ntdll!RtlUserThreadStart+0x28

ExceptionAddress: 0000000061c8e2e0 (msvcr90!memcpy+0x00000000000000b0)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000018b01330000
Attempt to read from address 0000018b01330000

It calls memcpy(0, 0x18b01330000) but can't read 0x18b01330000. While I can open the same binary file on windows10&windows11 vmware virtual machine. I have no idea what to do now. Are there any suggestion?

danilw commented 1 year ago

@hatrd do you have any overlays installed? like discord or nvidia-proprietary overlay? or some similar video-capture overlays maybe try to turn them off/uninstall

you did not mention driver version, and if nvidia drivers installed from "windows update center" or from Nvidia website if drivers not latest and/or not from Nvidia website - try to install from Nvidia website

saierXP commented 1 year ago

He solved the problem by installing drivers for the integrated graphics card, have you ever installed drivers for an integrated graphics card? https://github.com/godotengine/godot/issues/82840#issuecomment-1757022360 You can also try specifying the graphics card via --gpu-index. You can also try starting in single-window mode --single-window.

hatrd commented 1 year ago

@saierXP Godot_v4.1.3-stable_win64.exe --single-window works! Thanks a lot! But I wonder if there's a thorough solution to fix this crash.

I have updated drivers for the integrated graphics card AMD Radeon 780M, godot still crashes. Stack backtrack to DestroyWindow like before. DestroyWindow seems to be the key of crash. Closing some other windows, like import project window, will also crash.

Integrated graphics card driver info:

AMD Windows 31.0.22023.1014
Driver Version 23.20.23.01-231025a-397214C-AMD-Software-Adrenalin-Edition

And for nvidia driver, I've tried lateset NVIDIA STUDIO and NVIDIA GAME READY drivers. Not work.

hatrd commented 1 year ago

This is a bug of wintab32.dll, my tablet driver. This crash can be resolved by renaming wintab32.dll to something else / deleting wintab32.dll (so it won't be loaded), or updating wintab32.dll to a newer one.