Search Unity

How to catch unhandled exception?

Discussion in 'Editor & General Support' started by TwILeK, Sep 1, 2015.

  1. TwILeK

    TwILeK

    Joined:
    Sep 17, 2014
    Posts:
    54
    Hi

    Any idea how to catch unhandled exceptions?
    No, the Application.LogCallback isn't work!
    because the UnityEditor crash without any log in editor.log ... (just say: Crash!!! and list all of dll-s)

    Crash!!!
    SymInit: Symbol-SearchPath: 'D:/work/Programs/Unity/Editor/Data/MonoEmbedRuntime;.;D:\work\empyre\game;D:\work\Programs\Unity\Editor;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'twilek'
    OS-Version: 10.0.10240 () 0x100-0x1
    D:\work\Programs\Unity\Editor\Unity.exe:Unity.exe (0000000140000000), size: 54063104 (result: 0), SymType: 'PDB', PDB: 'D:\work\Programs\Unity\Editor\Unity_x64.pdb', fileVersion: 5.1.2.31787
    C:\WINDOWS\SYSTEM32\ntdll.dll:ntdll.dll (00007FFD1B540000), size: 1839104 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ntdll.dll', fileVersion: 10.0.10240.16430
    C:\WINDOWS\system32\KERNEL32.DLL:KERNEL32.DLL (00007FFD1B210000), size: 708608 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\KERNEL32.DLL', fileVersion: 10.0.10240.16384
    C:\WINDOWS\system32\KERNELBASE.dll:KERNELBASE.dll (00007FFD18A30000), size: 1953792 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\KERNELBASE.dll', fileVersion: 10.0.10240.16384
    C:\WINDOWS\system32\ole32.dll:eek:le32.dll (00007FFD1AF60000), size: 1314816 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\ole32.dll', fileVersion: 10.0.10240.16384
    C:\WINDOWS\system32\combase.dll:combase.dll (00007FFD19380000), size: 2605056 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\combase.dll', fileVersion: 10.0.10240.16384
    C:\WINDOWS\system32\msvcrt.dll:msvcrt.dll (00007FFD192E0000), size: 643072 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\msvcrt.dll', fileVersion: 7.0.10240.16384
    D:\work\Programs\Unity\Editor\GeometryToolbox.dll:GeometryToolbox.dll (00007FFD16340000), size: 188416 (result: 0), SymType: '-exported-', PDB: 'D:\work\Programs\Unity\Editor\GeometryToolbox.dll'
    D:\work\Programs\Unity\Editor\Unwrap.dll:Unwrap.dll (00007FFD10640000), size: 262144 (result: 0), SymType: '-exported-', PDB: 'D:\work\Programs\Unity\Editor\Unwrap.dll'
    D:\work\Programs\Unity\Editor\FreeImage.dll:FreeImage.dll (0000000180000000), size: 2777088 (result: 0), SymType: '-exported-', PDB: 'D:\work\Programs\Unity\Editor\FreeImage.dll', fileVersion: 3.11.0.0
    C:\WINDOWS\system32\RPCRT4.dll:RPCRT4.dll (00007FFD196A0000), size: 1204224 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\RPCRT4.dll', fileVersion: 10.0.10240.16412
    C:\WINDOWS\system32\sechost.dll:sechost.dll (00007FFD19880000), size: 372736 (result: -1073741819), SymType: '-unknown-', PDB: '', fileVersion: 10.0.10240.16384


    i tried with signal() from dll ... and
    AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
    bot not works ... :(

    Any idea?

    Thanks
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Did you try a try...catch?

    Syntax:
    Code (CSharp):
    1. try
    2. {
    3.     // Code that throws exception
    4. }
    5. catch (System.Exception myException)
    6. {
    7.     // Code that happens if an exception is found, where "myException" is the exception
    8. }
     
  3. TwILeK

    TwILeK

    Joined:
    Sep 17, 2014
    Posts:
    54
    Hi

    The exception is UNHANDLED by editor. I can't try catching :(

    Any other idea?
     
  4. Alex-Lian

    Alex-Lian

    Guest

    This is crashing in native code. A managed exception handler wouldn't be able to catch this.
    Best bet is to collect a crash dump and submit a bug report.
     
  5. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Speak of the devil... I'm having this problem too now! I've been trying to debug it with my team members all morning and we've made absolutely no progress.

    It looks like it could be a problem with how Unity interacts with certain drivers... and may be caused by DOTween or TouchScript (in our case).


    Unfortunately I can't submit a bug report that contains any useful information, as this game belongs to the company I work for and I'm not at liberty to share much about it.
     
  6. TwILeK

    TwILeK

    Joined:
    Sep 17, 2014
    Posts:
    54
    Alex: i tried with signal() http://man7.org/linux/man-pages/man7/signal.7.html
    it work's on Unix and Windows system, but not work's with unity ...

    I sent many many bug report without any reply :) so i can't try send again ... :) because i can't attach ~30gb game data and source code ...

    Any idea? how to solve signal problem? or any unity solution to register native signal handler?