2

I've been having some crashes at random spots in my gdx game on iOS. It works without any problem on the other platforms.

When the app quits I get this in my robovm terminal:

9/17/15 1:05:29 PM: [ERROR] AppLauncher failed with an exception:
9/17/15 1:05:29 PM: [ERROR] java.lang.RuntimeException: The app crashed: Terminated due to Memory Error. Check the device logs in Xcode (Window->Devices) for more info.
9/17/15 1:05:29 PM: [ERROR]     at org.robovm.libimobiledevice.util.AppLauncher.pipeStdOut(AppLauncher.java:829)
9/17/15 1:05:29 PM: [ERROR]     at org.robovm.libimobiledevice.util.AppLauncher.launchInternal(AppLauncher.java:734)
9/17/15 1:05:29 PM: [ERROR]     at org.robovm.libimobiledevice.util.AppLauncher.launch(AppLauncher.java:1052)
9/17/15 1:05:29 PM: [ERROR]     at org.robovm.compiler.target.ios.AppLauncherProcess$1.run(AppLauncherProcess.java:67)

Using the devices crash report from xcode I've retrieved this however:

Exception Type:  EXC_RESOURCE
Exception Subtype: WAKEUPS
Exception Message: (Limit 150/sec) Observed 457/sec over 300 secs
Triggered by Thread:  0

Reading around I've seen that this might be due to a inefficient thread handling but I'm not very sure.

Any tip is welcome. Thanks!

yafrack
  • 654
  • 1
  • 8
  • 24

1 Answers1

0

"Background threads in iOS have a hard limit on how many times you can run a sleep/wake cycle on each thread per second, and having a high count here is usually an indication that something is wrong / inefficient in your thread management." So the param value for sleep() should be greater than or eaqual to 6.67ms(1000/150ms, calc by 150/sec).

AlexChin
  • 1
  • 1