- Home /
Determining what is causing an unmanged exception in web builds
We are getting an unmanaged (non CLI compliant) exception occurring on a background thread performing Socket based comms work. It only occurs in web builds when running in a browser. In the editor in web mode, or a windows build, it all works fine.
The problem is the code looks like this:
try
{
WriteToSocket();
Log("Success");
}
catch (Exception e)
{
Log("Error: {0}", e);
}
catch
{
Log("Non CLI exception, wtf!");
}
finally
{
Log("Finished");
}
Before I had the empty catch clause in there (with the wtf comment) the log would only contain the 'Finished' text, without 'Success' or 'Error'. Only when a colleague informed me of unamanged exceptions did I realize what was happening. So I have confirmed that general 'Exception' catch clause is skipped, but the empty catch does run, and I do get the 'wtf' comment, which basically implies a non-CLI exception is occurring.
My question is how do I determine what this exception is and why it is occurring? Are there any detailed unity logs I can enable? It only happens under heavy tcp traffic and so I do not think I will be able to make a reproducing sample to sent to unity easily...
Unity V3.5.6
Your answer
