Does anyone successfully do multithreading on a BB10 device ? I have my AI calculations in a separat Thread on every other platform without problems. On BB10 it crashes as soon as the GC has to kick in on the other thread. Problem is, this only happens on the device. The repro code is totally simple, just start a thread and append to a List<> in there for a couple of seconds... Last log messages on the device befor the crash: Collecting from unknown thread. Stacktrace: at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_specific (intptr,int) <0xffffffff> at System.Array.Resize<int> (int[],int,int) <0x00078> at System.Array.Resize<int> (int[],int) <0x00047> at System.Collections.Generic.List`1<int>.set_Capacity (int) <0x0003b> at System.Collections.Generic.List`1<int>.GrowIfNeeded (int) <0x00057> at System.Collections.Generic.List`1<int>.Add (int) <0x00037> at crash.ThreadFun () <0x0005f> at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0x00073> See the Official Bug report here: https://fogbugz.unity3d.com/default.asp?553153_446dfsrhtb5u9pig
Mr. Wuerst - We have reproduced the issue and our lead BlackBerry developer is currently plugging away at it. We'll post our findings and any resolution as soon as we've found a conclusive answer. Thanks for your patience, Adam D. Multiclassed Test Engineer/Harbinger of Pizza Unity Technologies
I appear to be getting the same issue. is there any resolution in the last three weeks ?? Stacktrace: at (wrapper managed-to-native) System.Threading.Monitor.Enter (object) <IL 0x00021, 0xffffffff> at Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult.SetComplete (System.Exception,int) <IL 0x0000d, 0x00088> at Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult.SetComplete () <IL 0x00003, 0x00053> at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult) <IL 0x000a1, 0x0049f> at (wrapper runtime-invoke) object.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x0001e, 0x0014f>
Was there ever a solution to this? I'm getting an intermittent crash from the GC on another thread issue.
Unfortunately the official bug report is still without any reply: https://fogbugz.unity3d.com/default.asp?553153_446dfsrhtb5u9pig Seems nobody really cares... Why would I push work like AI calc into a thread so that the customer can still use my app, that it is totally unnecessary.... NOT
Doh, well I fixed my issue by carefully placing GC.Collect() in the right places and pooling the objects passed to the other thread...at least it seems to be fixed time will tell!! Good luck with yours!
Mr. Wurst - This issue is just more complex than most bugs. We don't put anything in the bug reports unless it's absolutely pertinent to the issue, that way we keep the report detailed but clean. I can assure you it is something we're giving attention to.
Update for everyone. A fix for this problem has been released with Unity 4.3.1. Feel free to give it a spin!