Titanium Community Questions & Answer Archive

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

Random app crash

I've been clueless with this one and have no leads to go on, during the last two weeks of development it crashes randomly, usually -10 seconds after opening the app.

How ever it doesn't crash the next time I open it.

The app basically gets a list of addresses and geocodes them and then displays them on a table and a mapview.

It could be a bad geo coding address that's causing this. Get the feeling since/if it caches the geocode result, next time it skips the lookup avoiding the crash.
My geocoding code: (http://pastie.org/private/g4hqcwqasbgqus786eya)

Looking at every crash log exception type and code is exactly the same (including the 0x6f72726d)

Crash log here: http://pastie.org/977529

— asked May 26th 2010 by Chris G
  • 1.3
  • crash
  • iphone
  • mobile

3 Answers

  • Are you adding a className="something" to the table rows ?

    — answered May 26th 2010 by Dan Tamas
  • Thanks for the reply Taman, yeah I have ~ row.className = 'datarow'; ~
    Even had ~ row.className = 'datarow'+ Math.floor(Math.random()*10000 + 1); ~ but no luck. I'm going to try removing part by part and trying it but after the 3rd run for the day it stops crashing so its very hard to debug.

    — answered May 26th 2010 by Chris G
  • Looks like I finally narrowed down the issue, my table rows and map annotations have a image view with different image each one. Think this happens when the request to load one of these images times out. I get the error.

    ~ [ERROR] Failed to load image: http://example.com/img/423425.jpg,
    Error: Error Domain=ASIHTTPRequestErrorDomain Code=2 UserInfo=0x3685e0 "The request timed out" ~

    This image actaully exists and loads next time app is run coz it caches most of the other images and gives more bandwidth to the rest.

    Any ideas how to set imageview's request timeout?

    //table row code
    row.add(Ti.UI.createImageView({ url:properties[i].i, top:5, left:5,  width:100,height:70 }));
    //annotation code
    var annotation = Titanium.Map.createAnnotation({
            latitude: e.latitude, longitude: e.longitude, title: property.title,
            leftView: Ti.UI.createImageView({ url:properties[i].i, top:5, left:10, width:40, height:30 })
    — answered May 26th 2010 by Chris G
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.