Crash in UnityWorker thread (MultiplyPoint3/TranformUIVertices)

Hey everyone,

I ran into a problem I never faced before, a crash within the UnityWorker thread. I can’t imagine the cause, the moment it happened, I started changing the position of some RectTransforms through my own animation script (if that matters).

Here is a screenshot from Xcode:

This is the first time it happened in hours of testing. Is that error caused by me, or is it an internal Unity thing? This happened under a Mono build.

EDIT: After restarting and testing again, the same thing happened, different elements, but again at the start of a moving a RectTransform (with few image/texts as childs).

Best regards,
Marian

Hello,

I am having the same issue - and this started happening with Unity 5.2. I reverted back to 5.1.3, and everything works fine. So it seems like something in the internal unity worker process in 5.2 during gameplay that causes the crash.
Here is my screenshot. Looks pretty similar to the post above.

i think i have the same issue also. no update on this?
i’m using Unity 5.2.2f1.

same code works fine on
Sony Xperia Z1 Compact (OS 5.0.2)
iPhone 6+ (iOS 9)

but not on my
iPad Mini (iOS 9)

Hello, could you please submit a bug report with your project attached and post the bug number here? Thanks.

Was someone able to produce this bug reliably (maybe even with a small project)?

I had around 3 crashes within 300 users on day 1+2 and I can’t find any other reason (as this was the only bug that ever made my app fully crash)

I’ve got almost the same issue. The probability of the error is similar too (about 1 in 100 or so). My Xcode window looks almost exactly like yours (image attached). I’m running Unity 5.2.2f1, but cannot remember if it occurred on previous versions.

Question: Did you fill out a bug report? If so, do you have a link?

Update: Verified issue still seen in 5.2.0f3. Trying 5.1.4f1 next…

Update 2: Seems to not be an issue in 5.1.4f1, as I have yet to make it crash. I’ve also run a development build and ran “bt all” in Xcode to get a stack trace (attached). The EXC_BAD_ACCESS seems to be on thread #14.

I will point out that I’ve narrowed down a possible region of my code where this seems to be occurring. In my case, it occurs after I am releasing my mouse button, and I have a theory that the transform.InverseTransformPoint() call that I’m subsequently doing is what is resulting in the native exception (based on the MultiplyPoint3 verbiage). I will test out this theory as soon as I can by creating a project that does nothing but calls to this method, so I can see how often it crashes, if at all.

Update 3: I’ve ruled out the previous theory, as I can tell from my original code/project that it gets past the inverse transformation before freezing Unity (due to the native exception). My next theory is that it has to do with the fact that I am kicking off a coroutine from inside another, both of which are operating on the same transform (though different properties, and at different times).


2374138–161511–multiplypoint3_crash_stack_trace.txt (14.3 KB)

We have same issue. This occur in random times, frequent when try instantiate prefab for UI (RectTransofrm) or when load new scene

Please file a bug report with your project attached. This is the only way we can ever catch and fix such bugs, because even minor variations cause the bug to be no longer reproducible at all.

I’ve submitted Case 738853 a while ago, very similar issue to this one, same UnityWorker thread, but on the Populate() method.

My test case happens 100% of the time, 1-3 mins into the game.

Started in 5.2.0, 100% repro in all 5.2.x versions. Last I checked happens with Mono and IL2CPP backends.

Thanks for the bug report, sorry I didn’t notice it in the bug database earlier. This is one of hard bugs that are reproducible only sometimes and only in certain situations, so the timeline for the fix is uncertain.

I understand, I’ve been having a back and forth with you QA guys, and last I heard you were having trouble reproducing, even with my repro project.

I assure you though, I get it to crash 100% of the time, if you need anything else from me (maybe the Xcode project would help?) don’t hesitate to ask!

Did you find any workaround to this? We are seeing exactly same issue in our project after upgrading to 5.2 from 4.6.

No workaround I’m affraid. =( We compile this game using 5.1, because I’m 99% sure this is a bug in the multi-threaded UI rendering implementation, which came in 5.2.

I have same problem. But there’s a low probability of this problem occurring.
Do you have any thoughts about trigger of this problem?

On my project it happens everytime when running on iOS. It started happening when they introduced multi-threaded rendering for the UI, I’m sure it has to do with that. This game of mine has many (40+) world canvases on-screen at any given time, so that’s probably what triggers it. I don’t really know anything more specific though! =/

There are 5 canvases on scene at problem happened in my project.
These render mode is “Screen Space - Camera”.
Well, this problem not happened yet at single canvas on scene…

Your reply is helpful for me.
Thank you!

Yeah, it really sounds like someone forgot a lock somewhere, and one canvas’ thread is corrupting the memory of another.

I only use one single canvas in my scene though, not multiple.

I found sentence as below in release note of Unity5.3.0f2 (beta).
“UI: Fix occasional crash caused by vertex/index buffers being destroyed before a geometry job terminates.”

I thought this crash is related this fix.
If my thought is correct, this problem may resolve by to update Unity version.
But I have shallow knowledge about rendering, I can’t say clearly.

If there are any mistakes in my thought, please let me know.

Well, they usually use the bug report number on their patch notes, and my issue is still open in their bug tracker, so I wouldn’t hold my breath yet…

https://fogbugz.unity3d.com/default.asp?738853_jgjht72ja94tjjae