0
votes

I create a game with Unity for iOS. When Xcode upgrades to 9.3 , sometimes the project crashes with this error when I'm in the game:

was compiled with optimization - stepping may behave oddly; variables may not be available.

I searched and find many ways to fix this problem, but i still get it. I didn't use optimization and i uncheck the code strip in unity setting.

any idea how can i fix it?!

UPDATE:

Another informat

ShouldUpdateTransformBefore():

0x100f9c064 <+0>:  ldr    x8, [x0]
0x100f9c068 <+4>:  ldr    x9, [x1]
0x100f9c06c <+8>:  cmp    x8, x9
0x100f9c070 <+12>: b.eq   0x100f9c07c               ; <+24> at RectTransform.cpp:319
0x100f9c074 <+16>: cset   w0, lo
0x100f9c078 <+20>: ret    
0x100f9c07c <+24>: ldr    w9, [x1, #0x8]
0x100f9c080 <+28>: cmn    w9, #0x1                  ; =0x1 
0x100f9c084 <+32>: b.eq   0x100f9c0a4               ; <+64> at RectTransform.cpp:320
0x100f9c088 <+36>: ldr    w10, [x0, #0x8]
0x100f9c08c <+40>: cmp    w9, w10
0x100f9c090 <+44>: b.eq   0x100f9c0ac               ; <+72> at RectTransform.cpp:327

-> 0x100f9c094 <+48>: ldr x11, [x8, #0x10]

0x100f9c098 <+52>: ldr    w9, [x11, w9, sxtw #2]
0x100f9c09c <+56>: cmn    w9, #0x1                  ; =0x1 
0x100f9c0a0 <+60>: b.ne   0x100f9c08c               ; <+40> at RectTransform.cpp:322
0x100f9c0a4 <+64>: mov    w0, #0x0
0x100f9c0a8 <+68>: ret    
0x100f9c0ac <+72>: orr    w0, wzr, #0x1
0x100f9c0b0 <+76>: ret
1
I don't know about unity, but you would get this if for example you are installing/running via Xcode but the configuration for the run scheme is set to Release instead of Debug (the Run scheme's configuration is debug by default, but can be changed to release). Are you sure its actually crashing however.Gruntcakes
@Gruntcakes you mean that i will not see this error when i release my game to appstore?BlackMB
No. That message is nothing to do with the app really, its from Xcode when you try and interactively debug the app. See the 2nd answer here: stackoverflow.com/questions/32772573/…Gruntcakes
Note that that isn't an error, just a log message. If your app is crashing it is for an unrelated reason (and will probably still happen when you release your game in the App Store)dan
@dan i dont have this problem in android! Or in pc when i play it. It happens exactly when this error shows in log.BlackMB

1 Answers

0
votes

Although seems it is too late, I just face similar problem and share the solution here.

Reason

In my case, the application using too much memories causes the testing device crashes. You can test it with a better device. My application crashes in iPhone7 but not in iPhone7 Plus. And you can also check it in the Memory column in the left.

enter image description here

Solution

If application crashes when loading scene, here is the solution, or suggestion.

Assume there are 2 scenes, A and B. Both of them cost 1GB memory.

When A -> B, A will be destroyed after B is loaded, which means 2GB is requested when A + B. It is too heavy for mobile.

So I add scene C, a middleware cost 0.1GB memory.

And now I go to scene B through A -> C -> B.

A + C request 1.1GB, then Scene A releases.

After that, C -> B request 1.1GB.

The maximum memory of loading scene from A to B decrease from 2GB to 1.1GB. It solved my application crashing problem. Hope it helps.