Titanium Community Questions & Answer Archive

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

Remote images in table row / jump position / crash app

I'm using remote images within a table view and don't seem to be getting very far. I've tried imageViews and webViews, both with similar issues:

  • images show up randomly

  • images change position within the table while scrolling (!), jumping literally between rows

  • images are never loaded

  • scrolling a few times up and down crashes the application (!)

The images I'm loading are "transporting" parameters in the URL ( http://www.foo.com/bar.jpg?…) and might sometimes take longer to load, since they're dynamically generated.

Has anyone had similar experiences with a case like this? Any hint of any kind would be highly appreciated.

(Btw. — docs for list syntax here at the Q&A are incorrect.)

— asked April 18th 2010 by Florian Plank
  • crash
  • images
  • iphone
  • mobile
  • remote
  • table
1 Comment
  • Hi Florian,

    What did you do to solve the issue with the images showing up randomly and the app crashing?

    Thanks in advance
    Sean

    — commented December 3rd 2012 by sean sean

5 Answers

  • Gidday.
    Make sure each row has a row.className - it can be any string - make these different/unique if the rows are to have different layouts/content.
    This has helped me immensely.

    — answered April 18th 2010 by Gregor Munro
    permalink
    0 Comments
  • Adding classnames defintely helps performance. I still get random crashes when scrolling quickly though. Last crash started with:

    TRACE] D/skia ( 1541): — SkImageDecoder::Factory returned null
    [TRACE] W/dalvikvm( 1541): threadid=41: thread exiting with uncaught exception (group=0x4001aa28)
    [TRACE] E/TiUncaughtHandler( 1541): (AsyncTask #10) [19096,35117] Sending event: exception on thread: AsyncTask #10 msg:java.lang.RuntimeException: An error occured while executing doInBackground()

    — answered August 13th 2010 by Oscar Merida
    permalink
    0 Comments
  • Thanks for your reply. I'm currently using the classnames. I found that the problem was the way I had attached those images to the row, A little weird IMO but it works now. If I find the time I'll post my solution. Nothing special, though.

    — answered April 19th 2010 by Florian Plank
    permalink
    1 Comment
    • A little late, but how did you attach images?

      — commented August 13th 2012 by Daniel Krusenstråhle
  • Gregor, you just solved my rendering problem. Thanks!

    — answered May 5th 2010 by Ryan Huff
    permalink
    0 Comments
  • Hi Gregor Munro

    Thanks , it solved my problem .

    — answered April 8th 2011 by Raquibul Islam
    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.