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.
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)
-
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
-
The code seems fine to me.
It does so on simulator or only on the device? -
It is only happening on device…
Is there anyway of forcing it back to a js file rather than just simply
w.close();
-
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.
-
It is only happening on device…
Is there anyway of forcing it back to a js file rather than just simply
w.close();
-
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.
-
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]