iPhone assert

I'm getting this assert when I run to iPod Touch: http://imgur.com/zvzTc

Running in the iPhone Simulator is okay..although the simulator is iOS 6.0 and the iPod is 5.0.1.

hg commit 35fd466

Is it a known issue?

Comments

  • edited November 2012
    Never seen it. Does it happen right at the beginning?
    That means that somehow we've stacked more than 32 touch/accelerometer events in the main thread before processing them in the worked thread.
    It sounded like a pretty safe number per frame but maybe events got processed before the app is initialized?
    I can make the code more robust in that respect and simply not accepting any events before init and dropping overflowing events after instead of simply asserting.
  • edited November 2012
    I just made the modification mentioned in my previous post, let me know if that helped.
  • edited November 2012
    Yes, it happens when the game is launched. If it's launched from the device (not the Xcode debugger) it exits immediately before any graphics are displayed.

    The problem doesn't happen in the "orxTest" bounce app included with orx.

    Thanks for making the chance. I will try it this evening when I get home.
  • edited November 2012
    Thanks for taking a look. I updated the iPod to iOS 6.0 last night, so now it is same iOS as the simulator.

    With the change, the assert no longer fires and the games loads. However, the log fills with the warning messages for about 13 seconds while the game is loading. When everything is finished loading and the title screen shows, the messages stop. Then, when I switch between scenes again (delete all objects and create a lot of new ones) the messages flood for several more seconds until the next scene appears.

    If I place a breakpoint in my orxEVENT_TYPE_SYSTEM handler, it isn't reached at all while the flood is happening. This is, I guess, as you said.. the events are stacking up without being processed.

    This doesn't happen in the bounce demo, but it loads much faster than my game does, and it seems the problem occurs while loading.
  • edited November 2012
    Mmh yep, that would be the accelerometer sending 30 events per second while the main thread is busy. :)

    Those messages are only in debug and you can filter them out if you want to (orxDEBUG_ENABLE_LEVEL is your friend ;)).

    Also, if you don't need the accelerometer, you can simply turn it off by explicitly setting the config property iOS.AccelerometerFrequency to 0. That will also help saving the battery. :)
  • edited November 2012
    Good advice! I use the accelerometer for a "gravity" effect during gameplay, but not for the title/menu screens. I can disable it and save battery.

    Makes sense about the accelerometer events, but why didn't I see it happen until recently?
  • edited November 2012
    Mmh, not sure why that happened recently.

    Did you use an old version previously?
    That couldn't happen before we fixed the thread safety on iOS for touch/accelerometer events, but that was done earlier during this summer.
  • edited November 2012
    Mystery solved. I didn't update orx for Equilibria most of the summer since I was working hard on getting the alpha done.

    Thanks again for the tip about suppressing the logs and disabling accelerometer.
Sign In or Register to comment.