Unity freezes with deadlocks.

We are working with a project in unity, and are having some problems with dead locks, but we have no way to debug it, i tried to start another thread to access the stack trace of the unity's thread after it freezes, but in this version of mono the stack trace methods are not implemented. I tried several debug programs like windbg, but all these programs just get stack trace of the proccess system calls. Any sugestions on some way to debug this? There's some way of get the current unity's thread stacktrace after it freezes??

When it freezes it has commonly not crashed so you don't get stack traces.

Once it crashes though it will write the according stack trace to the log file (in the editor to the current one, once you reopen the editor it will be renamed to become the -prev one)

Without knowing what you are doing in general its hard to impossible to offer suggestions on what might be the cause as there are quite a few possibilities. As you added the concurrency tag you should potentially be warned that threads in Mono 1.2.5 aren't that stable and also its important to keep in mind that Unity 2 is not threadsafe so if you have any threading in there ensure to not touch anything create thats not part of System (including the "Object" class which unless specified differently, normally is UnityEngine.Object)

Sorry wrong answer. (Question instead answer)