Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Windows standalone crashes every time on closing app.

Discussion in 'Windows' started by bboydaisuke, May 17, 2021.

  1. bboydaisuke

    bboydaisuke

    Joined:
    Jun 14, 2014
    Posts:
    67
    My app crashes every time on closing app. It works fine on Editor. I tried looking into dumps but couldn't find anything helpful.

    Could you help me to find solution?

    ========== OUTPUTTING STACK TRACE ==================

    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 1210DFD0)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 1210DFD0)
    0x1210DFD0 ((<unknown>)) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 1210DDB0)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 1210DDB0)
    0x1210DDB0 ((<unknown>)) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 120FD588)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 120FD588)
    0x120FD588 ((<unknown>)) (function-name not available)
    0x7546EEBB (USER32) AddClipboardFormatListener
    0x75465E7A (USER32) GetClassLongW
    0x75465A7A (USER32) GetClassLongW
    0x7546963F (USER32) CallNextHookEx
    0x77194E7D (ntdll) KiUserCallbackDispatcher
    0x75463819 (USER32) PostMessageW
    0x749535E5 (uxtheme) Ordinal132
    0x7494FB01 (uxtheme) Ordinal45
    0x7494F778 (uxtheme) Ordinal45
    0x75464037 (USER32) GetSystemMetricsForDpi
    0x7881A2E3 (UnityPlayer) PlayerMainWndProc
    0x7546EEBB (USER32) AddClipboardFormatListener
    0x75465E7A (USER32) GetClassLongW
    0x75465557 (USER32) GetSystemMetricsForDpi
    0x7545205B (USER32) CallWindowProcA
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 1210DFD0)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 1210DFD0)
    0x1210DFD0 ((<unknown>)) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 1210DDB0)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 1210DDB0)
    0x1210DDB0 ((<unknown>)) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 120FD588)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 120FD588)
    0x120FD588 ((<unknown>)) (function-name not available)
    0x7546EEBB (USER32) AddClipboardFormatListener
    0x75465E7A (USER32) GetClassLongW
    0x75465A7A (USER32) GetClassLongW
    0x7546963F (USER32) CallNextHookEx
    0x77194E7D (ntdll) KiUserCallbackDispatcher
    0x75463819 (USER32) PostMessageW
    0x749535E5 (uxtheme) Ordinal132
    0x7494FB01 (uxtheme) Ordinal45
    0x7494F778 (uxtheme) Ordinal45
    0x75464037 (USER32) GetSystemMetricsForDpi
    0x7881A2E3 (UnityPlayer) PlayerMainWndProc
    0x7546EEBB (USER32) AddClipboardFormatListener
    0x75465E7A (USER32) GetClassLongW
    0x75465557 (USER32) GetSystemMetricsForDpi
    0x7545205B (USER32) CallWindowProcA
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 1210DFD0)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 1210DFD0)
    0x1210DFD0 ((<unknown>)) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 1210DDB0)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 1210DDB0)
    0x1210DDB0 ((<unknown>)) (function-name not available)
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 120FD588)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 120FD588)
    0x120FD588 ((<unknown>)) (function-name not available)
    0x7546EEBB (USER32) AddClipboardFormatListener
    0x75465E7A (USER32) GetClassLongW
    0x75463BEA (USER32) DispatchMessageW
    0x75455D70 (USER32) DispatchMessageA
    0x78807DFE (UnityPlayer) TranslateAndDispatchFilteredMessage
    0x78818476 (UnityPlayer) MainMessageLoop
    0x7881C160 (UnityPlayer) UnityMainImpl
    0x7881F415 (UnityPlayer) UnityMain
    0x005F1015 (onlinecard) wWinMain
    0x005F11D9 (onlinecard) __scrt_common_main_seh
    0x752BFA29 (KERNEL32) BaseThreadInitThunk
    0x77187A7E (ntdll) RtlGetAppContainerNamedObjectPath
    0x77187A4E (ntdll) RtlGetAppContainerNamedObjectPath

    ========== END OF STACKTRACE ===========

    0:000> .ecxr;.exr -1
    eax=00000000 ebx=00dedd88 ecx=13b4b7ac edx=00000000 esi=00040e6c edi=00000000
    eip=1210dfd0 esp=007be4c4 ebp=007be508 iopl=0 nv up ei ng nz ac pe cy
    cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010297
    1210dfd0 ?? ???
    ExceptionAddress: 1210dfd0
    ExceptionCode: c0000005 (Access violation)
    ExceptionFlags: 00000000
    NumberParameters: 2
    Parameter[0]: 00000008
    Parameter[1]: 1210dfd0
    Attempt to execute non-executable address 1210dfd0

    0:000> kb
    *** Stack trace for last set context - .thread/.cxr resets it
    # ChildEBP RetAddr Args to Child
    WARNING: Frame IP not in any known module. Following frames may be wrong.
    00 007be4c0 44778000 44778000 44778000 44778000 0x1210dfd0
    01 007be5fc 7715fde5 007be8d8 00000000 00000014 0x44778000
    02 007be880 749503af 00000000 00040e6c 00000112 ntdll!LdrStandardizeSystemPath+0xf5
    03 007be894 7494fbb6 007be8b4 75463819 0147f370 uxtheme!CThemeWnd::_GetThemeWndPropAndAddRef+0xff
    04 007be8d0 00000000 007be93c 7494fb01 02ac0828 uxtheme!CThemeWnd::_PreDefWindowProc+0x6c
     

    Attached Files:

  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,507
    Are you by any chance overriding the WndProc in your game with a C# function? Looks like the wndproc it tries to invoke is in an unloaded module, which could be because Unity has shut Mono down and the function no longer exists in memory.
     
  3. bboydaisuke

    bboydaisuke

    Joined:
    Jun 14, 2014
    Posts:
    67
    Solved after stop calling Windows API.