Titanium Community Questions & Answer Archive

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

RSS Reader Crashing on Device

When I test my app in the simulator, my rss reader works fine and links to the web articles when clicked. However when I test my app on my device it seems to crash almost every time and seems to work much differently than in the simulator.

My code for one of these reader pages is below. I am 98% done with my app and am debugging on my device and can't figure out why it keeps crashing.

Pastie: http://pastie.org/1062513

My iphone is jailbroken and running 3.1.2, not sure if this matters.

— asked July 27th 2010 by Sean DeChellis
  • iphone
  • mobile
  • reader
  • rss
0 Comments

8 Answers

  • Add a unique className to your identical tableRows.

    var row = Ti.UI.createTableViewRow({height:80,className:'name_something'});
    

    This will tell the iPhone to render the rows using the same template( with a lot of memory reduction)

    — answered July 27th 2010 by Dan Tamas
    permalink
    0 Comments
  • It seems like that did the trick, but now the close button on the webview navbar is acting up. Many times when it is clicked, it seems to reload the webview article in full-screen with no navbar instead of navigating back to the rss reader. Any suggestions?

    Pastie is still the same

    — answered July 27th 2010 by Sean DeChellis
    permalink
    0 Comments
  • The code seems fine to me.
    It does so on simulator or only on the device?

    — answered July 27th 2010 by Dan Tamas
    permalink
    0 Comments
  • It is only happening on device…

    Is there anyway of forcing it back to a js file rather than just simply

    
    w.close();
    
    — answered July 27th 2010 by Sean DeChellis
    permalink
    0 Comments
  • If it's only on device there is something "lazy" there breaking your code.

    try to create the empty table first

     var tableview = Titanium.UI.createTableView({});
    

    and at the end after you have the click events setup and so on set the data ( line 67-68 in the pastie I guess)

    tableview.setData(data)
    

    this should fix the issue.

    — answered July 27th 2010 by Dan Tamas
    permalink
    0 Comments
  • It is only happening on device…

    Is there anyway of forcing it back to a js file rather than just simply

    
    w.close();
    
    — answered July 27th 2010 by Sean DeChellis
    permalink
    0 Comments
  • Tried your most recent solution, but no 100% fix yet. It still reloads the webview [fullscreen] instead of closing sometimes.

    It almost seems like the transition from webview [close] back to the rss page is the thing causing the problem.

    — answered July 27th 2010 by Sean DeChellis
    permalink
    0 Comments
  • Tamas, thank you for all your help.

    I un-jailbroke my iphone thinking that maybe this had something to do with the crashing. Sure enough, the rss reader no longer is crashing or acting strange.

    I think running these jailbroken apps had something to do with draining my memory:
    [intelliscreen, proswitcher, backgrounder, sbssettings, winterboard +more]

    — answered July 29th 2010 by Sean DeChellis
    permalink
    0 Comments
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.