Search Unity

  1. Dismiss Notice
  2. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice

Winodws Standalone Crash at Close

Discussion in 'Windows' started by Picky-Salamander, May 3, 2016.

  1. Picky-Salamander

    Picky-Salamander

    Joined:
    Apr 26, 2013
    Posts:
    27
    I'm having a problem where our application seems to crash when closed (I attached a picture of the crash). It seems to be related to a native C++ dll that we're loading (CEF). The error log shows the file crash trace:

    ========== OUTPUTING STACK TRACE ==================

    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 10A80CD0)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 10A80CD0)
    0x10A80CD0 ((<unknown>))
    0x1282E581 (libcef) cef_string_map_value
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 0508FCC8)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 0508FCC8)
    0x0508FCC8 ((<unknown>))
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 050E8735)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 050E8735)
    0x050E8735 ((<unknown>))
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 050E8675)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 050E8675)
    0x050E8675 ((<unknown>))
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 050E8626)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 050E8626)
    0x050E8626 ((<unknown>))
    ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 05071CC7)
    ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 05071CC7)
    0x05071CC7 ((<unknown>))
    0x1002B6F3 (mono) mono_gc_is_finalizer_thread
    0x1002B8A9 (mono) mono_gc_is_finalizer_thread
    0x1002B978 (mono) mono_gc_is_finalizer_thread
    0x1010C38E (mono) unity_mono_method_is_generic
    0x772338F4 (KERNEL32) BaseThreadInitThunk
    0x77655DE3 (ntdll) RtlUnicodeStringToInteger

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

    Looking at the error.log yields the following:

    Unity Player [version: Unity 5.3.4f1_fdbb5133b820]

    Unknown caused an Access Violation (0xc0000005)
    in module Unknown at 0023:10a80cd0.

    Error occurred at 2016-05-03_173636.
    C:\app\Demo.exe
    46% memory in use.
    0 MB physical memory [0 MB free].
    0 MB paging file [0 MB free].
    0 MB user address space [3586 MB free].
    Write to location 00ce53d0 caused an access violation.

    Is this type of error systematic of something? CEF does run on another thread and I shut that down on the application quit. I cancel the quit in OnApplicationQuit and wait 5 seconds after the thread and CEF shutdown and I still get the crash.

    Thanks for the help!
     

    Attached Files:

  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,941
    Do you have the source code for that dll?
    If you have Visual Studio, you can try attaching debugger to game, that might help pinpointing the crash.
     
  3. Picky-Salamander

    Picky-Salamander

    Joined:
    Apr 26, 2013
    Posts:
    27
    In case anyone else is having a similar issue, I was able to solve this. Turns out it was a garbage collection issue with one of the C++ wrappers in the library. I had the debug symbols for the dll (pdb) and hooked that up to Visual Studio and found where it was crashing. I already had assumed it was a garbage collection issue from the "mono_gc_is_finalizer_thread" in the error trace, so the debug symbols lead me to the dispose of a class that was getting collected at the wrong time.
     
unityunity