- Home /
Could the game crash be a GC problem?
My release version of the game was stuck at the end of the run, but the game didn't crash, just like the infinite loop. I used the following method to see what was the cause:
1: use debug version of the release, Attach vs to release version-> to suspend all threads, to see the main thread of the call stack, but the main line running place has reached the ntdll.. No user code.
2:use the task manager Dump, use Windebug to see the call stack, stack information is as follows: I guess there is no space can be allocated, but then there is a lot of computer memory.
00000000`d9d8d7d8 00007ff8`1c1dfc01 : 00000000`00000000 00000000`c0000225 00000000`d9d8d9a0 00000000`00000000 : ntdll!ZwWaitForSingleObject+0x14
00000000`d9d8d7e0 00007ff8`1c1d6fce : 00000000`00000000 00000000`d9d8d9a0 00000000`d9d8d8f0 00000000`d9d8db80 : ntdll!LdrpDrainWorkQueue+0xe5
00000000`d9d8d820 00007ff8`1c1d6add : 00000000`d9d8d8f0 00000000`d9d8da80 00000000`00000000 00000000`00000001 : ntdll!LdrpLoadDllInternal+0xc2
00000000`d9d8d8a0 00007ff8`1c1b9efc : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000001 : ntdll!LdrpLoadDll+0xf1
*** ERROR: Symbol file could not be found. Defaulted to export symbols for KERNELBASE.dll -
00000000`d9d8da40 00007ff8`18da484f : 00007ff8`1ae433e0 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!LdrLoadDll+0x8c
00000000`d9d8db40 00007ff8`1adc92fd : 00000000`00000000 00000000`00d716b6 00000000`d9d8dd38 00000000`00000000 : KERNELBASE!LoadLibraryExW+0x16f
00000000`d9d8dbb0 00007ff8`1adacf86 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`01ae4030 : user32!VersionRegisterClass+0x71
00000000`d9d8de80 00007ff8`1adba138 : 00000000`00000000 00000000`00008000 00000000`020a00ce 00000000`01ae4030 : user32!VerNtUserCreateWindowEx+0x2c2
00000000`d9d8e210 00007ff8`1adce209 : 00000000`0000008d 00000000`00000041 00000000`00000000 00007ff8`1ada78ad : user32!InternalCreateDialog+0x888
00000000`d9d8e3c0 00007ff8`1ae2ae5b : 00000000`00010007 00000000`d9d8e4f9 00000000`0000008d 00000000`00000017 : user32!InternalDialogBox+0x125
00000000`d9d8e420 00007ff8`1ae288e8 : 00000000`d9d8e730 00000000`000000b0 00000000`00007f01 00000000`000000fa : user32!SoftModalMessageBox+0x228b
00000000`d9d8e560 00007ff8`1ae28565 : 00000000`00000000 00000000`00000000 00000000`cc039e40 00000000`cbd698e0 : user32!MessageBoxWorker+0x2ec
00000000`d9d8e710 00007ff8`1ae28442 : 00000000`00000000 00000000`00000010 00000000`00000024 00000000`cbd698e0 : user32!MessageBoxTimeoutW+0xd5
00000000`d9d8e810 00007ff8`1ae2806e : 00007fff`f4bc83f0 00000000`cbd698e0 00000000`d9d8e9e0 00000000`d658f000 : user32!MessageBoxTimeoutA+0x102
00000000`d9d8e870 00007fff`f4ab5850 : 00000000`d658f800 00000000`61edcba0 00000004`00001000 ffffc100`00020000 : user32!MessageBoxA+0x4e
00000000`d9d8e8b0 00007fff`f4ab67a9 : 00007fff`f4bc83d0 00000000`d9d8e9e0 00000000`d658f000 00000000`d9d8f260 : mono!GC_abort+0x1c [c:\buildslave\mono-runtime-and-classlibs\build\libgc\misc.c @ 1099]
00000000`d9d8e8e0 00007fff`f4ab8a42 : 00000000`00000008 00000000`00000001 00007fff`f4bc0a90 00007fff`f4ab41cc : mono!GC_push_all_stacks+0xd9 [c:\buildslave\mono-runtime-and-classlibs\build\libgc\win32_threads.c @ 455]
00000000`d9d8ee10 00007fff`f4ab80dd : 00000000`0000001d 00000000`00000001 00000000`00000000 00007ff6`74f82577 : mono!GC_push_roots+0xc6 [c:\buildslave\mono-runtime-and-classlibs\build\libgc\mark_rts.c @ 652]
00000000`d9d8ee40 00007fff`f4ab8115 : 00000000`0000001d 00000000`00000000 00000000`000000ff 00000000`00000009 : mono!GC_mark_some_inner+0x221 [c:\buildslave\mono-runtime-and-classlibs\build\libgc\mark.c @ 306]
00000000`d9d8ee90 00007fff`f4ab44a1 : 00007fff`f4ab41cc 00007fff`f4ab41cc 00000000`00000000 00007fff`f4ab41cc : mono!GC_mark_some+0x9 [c:\buildslave\mono-runtime-and-classlibs\build\libgc\mark.c @ 478]
00000000`d9d8eef0 00007fff`f4ab504d : 00007fff`f4ab41cc 00007fff`f4ab41cc 00000000`00000405 00000000`00000000 : mono!GC_stopped_mark+0xe9 [c:\buildslave\mono-runtime-and-classlibs\build\libgc\alloc.c @ 607]
00000000`d9d8ef50 00007fff`f4ab51ec : 00000000`00000003 00000000`00000000 00000000`00000000 00000000`00000003 : mono!GC_try_to_collect_inner+0x129 [c:\buildslave\mono-runtime-and-classlibs\build\libgc\alloc.c @ 446]
00000000`d9d8efa0 00007fff`f4ab3afa : 00000000`00000000 00000000`00000405 00000000`00000000 00000000`00000405 : mono!GC_collect_or_expand+0x70 [c:\buildslave\mono-runtime-and-classlibs\build\libgc\alloc.c @ 1110]
00000000`d9d8eff0 00007fff`f4ab3e15 : 00000000`00000000 00000000`00000405 00000000`00000003 00000000`00002028 : mono!GC_alloc_large+0x9e [c:\buildslave\mono-runtime-and-classlibs\build\libgc\malloc.c @ 60]
00000000`d9d8f030 00007fff`f4ab3f20 : 00000000`00002028 00000000`00002000 00000000`06200140 00000000`066e4b10 : mono!GC_generic_malloc+0xb9 [c:\buildslave\mono-runtime-and-classlibs\build\libgc\malloc.c @ 204]
00000000`d9d8f060 00007fff`f49da396 : 00000000`00002028 00000000`06200140 00000000`066e4b10 00000000`d9d8f1c8 : mono!GC_malloc_atomic+0x6c [c:\buildslave\mono-runtime-and-classlibs\build\libgc\malloc.c @ 270]
00000000`d9d8f090 00000000`0620180e : 00000000`2f2bcd30 00000000`d9d8f160 00000000`06200140 00000000`00000000 : mono!mono_array_new_specific+0x82 [c:\buildslave\mono-runtime-and-classlibs\build\mono\metadata\object.c @ 4413]
3: according to this link: https://blogs.unity3d.com/cn/2016/05/24/breakout-how-to-stop-an-infinite-loop-in-a-unity-c-script/, but my CPU occupancy rate is 0, as the code has not run.
What should I do to debug or find the cause of the problem? I hope someone can help me, thank you very much.
Comment