I wrote a .net 4.0 mono service called snserver.exe and am hosting it on a Raspberry Pi via mono-service.
In order to run it, I execute the following line:
mono-service -l:/var/supernovaServer/snserver.lock /var/supernovaServer/snserver.exe
After a few hours or days, the process terminates and leaves the snserver.lock file in place. A StreamWriter used by the service hasn't flushed, as evidenced by partial output. Furthermore, it seems that even the custom exception handler I wrote (AppDomain.CurrentDomain.UnhandledException event) doesn't fire.
How can I diagnose a crash like this?