Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Analytics and Offline/Online switching crash

If I start my application with my wi-fi turned off, then hit "Home" and turn the wi-fi on, when I restart my app, it crashes 100% of the time. In Xcode Organizer, I can see the cause of the exception as "active assertions beyond permitted time".

I decided to set analytics to false based on the findings in this post:

This greatly improves things, but I still get the crash occasionally (around 10% to 20% of the time). But I know that turning analytics off definitely helped, since it's no longer 100%. Unfortunately, I also occasionally get KERN_INVALID_ADDRESS and KERN_PROTECTION_FAILURE crashes as a result of online/offline switching. My question is: what can I do to get these crashes to 0%?

This crash seems to usually be connected to analytics, so I have no idea what could be causing it once I set analytics to false. I tried setting UIApplicationExitsOnSuspend to both true and false, which didn't seem to make a difference.

If anyone else has tangled with this issue and has any input, I'd really appreciate it.

— asked October 18th 2010 by Mike Dosey
  • active
  • analytics
  • assertions
  • background
  • crsh
  • duration
  • iphone
  • kern_invalid_address
  • kern_protection_failure
  • mobile
  • permitted
  • uiapplicationexitsonsuspend

3 Answers

  • Can you post a full crash log? I am receiving similar errors with analytics disabled, but I'm not sure it's the same thing.

    — answered October 18th 2010 by Damien Elmes
  • I've made an interesting discovery: setting analytics to false causes Ti.Platform.username to return garbage. Sometimes it will just be a nonsense string, other times it completely crashes the app, which explains the KERN exceptions I was getting.

    I tried reproducing this in a small test project and couldn't, so there must be something else that is contributing to the issue as well. Are you accessing Ti.Platform data in your project by any chance?

    — answered October 19th 2010 by Mike Dosey
    1 Comment
    • How yo solve active assertions crash? I have the same problem. Thank you

      — commented October 31st 2013 by Almudena Vila
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.