iOS builds freezing after 5.2 update

After I updated on 5.2 one of my games became unplayable for some reason. There are no errors in the compiler nor in Xcode debug. The game is freezing after a few moments of playing. Is anyone else experiencing this issue?

I have reported a bug when I was on 5.2.0p1 about this a week ago, and no response yet. Now when 5.2.1 is out this problem is still happening.

I’m on a very tight schedule with Apple about submitting a new build of my game or I will get suspended on App Store unless I remove my game or submit an update. If anyone from Unity is reading this can you please check my bug report? There is also my project attached (Case 728877)

@Simon_says_1

To help us narrow down the possible cause of the error, can you try this with the Mono scripting backend instead of the IL2CPP scripting backend? Does the same problem occur? Thanks.

@JoshPeterson Thank you for your answer. I have tried Mono now and game also froze itself after few seconds of running. This problem didn’t exist on Unity 5.1.3.

@Simon_says_1

Thanks for trying that, I’ll ping our iOS QA team to have a look. Thanks.

1 Like

@JoshPeterson any revision on this?

@Simon_says_1

No, I don’t see any updates to the bug report yet, sorry. I’ll ping our QA team again.

I am having the same problem, my game just freezes randomly after a few seconds of play. im using 5.2.2f. I profiled and debugged and it just seems to loop somewhere.
My scene mainly consists of UI and a few spheres.
Was there a solution to this problem? @JoshPeterson @Simon_says_1

@Woody4618

It is difficult to determine a solution without more information. Doe this work correctly with the Mono scripting backend? That at least might get us closed to a solution.

I tried both mono and IL2CPP. It also happened in IOS (Iphone 4s) and Android. But no problems in unity editor. Could it be related to Canvases in cameraspace that are scaled very small? Like 0.0083 for example. I am trying out the 5.3beta and the 5.2.2 patch. Maybe something was patched.

Hey, I think i tracked it down to Canvas.RenderOverlays wait for Job Canvas.sort. That was also what i saw where it hang in Xcode.
It is easily reproducable.
Create a Canvas with a canvas scaler, scale with screen size. Add a scroll view and add a view elements. Set the reference resolution high. Its very easily seeable with high values, like 80000 or something. Then deploy to mobile, scroll the view and watch the profiler.
The sort job takes about 60 ms per frame. I guess the egine is then waiting for it or triggers it again when its not yet done and then it loops forever. @JoshPeterson

1 Like

@Woody4618

I’m glad you were able to track down the cause.

@JoshPeterson well yeah i tracked it down, but its far from beeing fixed :smile:
I think it is relate to the changes to put the sorting into another thread. Unity Blog
What fixed it for me was switching back to 5.1 and it took me two days to figure out that it was a unity bug. :frowning:
I guess i will not update unity anymore during development. :smile:

@Woody4618

Ahh, sorry. I’m rather unfamiliar with this area. Is it possible for you to submit a bug report? We can have a look at it.

@JoshPeterson I updated the bug report from Simon_says Shall i create a new one? (Case 728877)

@Woody4618

I don’t think there is any need to submit a new bug report. it looks like our iOS team in vesting the bug report from @Simon_says_1 now. Thanks.

Is there at least a workaround for this after all the investigation?

@Simon_says_1

Looking at the bug report, I don’t see a work around listed, sorry. It seems this bug has had some investigation though, so a fix may be coming.

@JoshPeterson I have just went to build the project in newest version of Unity, 5.2.3p2 and nothing seems to freeze. Tested on iphone 5s running ios 9.1. Seems like it has been fixed maybe? I haven’t gotten any updated info in the bug report though.

@Simon_says_1

Thanks for the information. I don’t see any updates to the bug report either, so I’m not sure why this was corrected. Maybe it was handled as a part of other work.