Random Crashes on App

You must Login before you can answer or comment on any questions.

Hello, I've built a pretty substantial app for iOS using Titanium. It consists of a tab group with five sections and involved pulling a lot of data from HTTP requests as well as taking pictures and uploading them to Flickr. I have everything working smoothly and even have a nice custom design across the entire thing. However the app will sometimes randomly crash after navigating several windows (or especially when the device is locked for awhile).

In simulator, it crashes with a null error and putting printouts after majors steps seems to show that the most troublesome processes (like pulling and parsing an XML document into a table view) crash at different points every time. I feel it must be a memory, variable scope, or HTTP request problem but since everything works most of the time I'm fairly stumped.

I guess the most useful thing would be any suggestions for good program design/structure, performance optimization and performance tracking tools that work with Appcelerator/XCode.

4 Answers

Did you ever get to the bottom of this? I have had the same experience since using the 1.7.x SDK.

I'm printing the available memory to the window title every second and it's showing anywhere between 15-36mb free memory until it decides to randomly crash, sometimes with input, sometimes without (input as in, interaction with the app).

This is worrying. There's no legitimate reason for it to happen, there's no special processing going on, the screen is sitting idle and it crashes randomly.

I'm looking at a broken system effectively, what sort of solution can there be for this? I've tried all the memory pool freeing techniques but little is showing to help.

Is anyone from Appcelerator seeing this thread, can you please comment on it, or better, resolve this random crashing? It's an issue I am witnessing with a variety of different code bases - all unique to each other!

— answered 2 years ago by P Sweeney
answer permalink
9 Comments
  • Can you please post the crash log or the relevant parts of it?

    — commented 2 years ago by Henning Glatter-Gotz

  • Where will I be able to access the crash logs?

    — commented 2 years ago by P Sweeney

  • If it is crashing in the simulator:

    • Open the Console App (should be in the utilities folder) and browse to the Diagnostic And Usage Information/User Diagnostic report
    • Find the thread that crashed

    If on the device:

    • Start up Xcode and connect the device, you can browse the crash logs.

    — commented 2 years ago by Henning Glatter-Gotz

  • Show 6 more comments

Your Answer

Think you can help? Login to answer this question!