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 crash when using appendRow

I have this issue with 1.4.0 and 1.4.1 (from nightly) on iPhone.

Very frequently, the emulator and device will crash when calling appendRow. This happens maybe 1 out of 5 times. Has anyone else experienced this? It seems there is a race condition on appendRow as the rowcount is off - either that or something is being garbage collected. Ideas?

* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (0) must be equal to the number of rows contained in that section before the update (0), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted).'

Our application flow:
1) Open new "selector" window to select something to add to the "main" windows table
2) Fire event in "selector" window to pass selected row back to the "main" window
3) Event in main window updates the table using appendRow
4) Close the "selector" window

— asked September 7th 2010 by Vinh Bui
  • appendrow
  • crash
  • iphone
1 Comment
  • have you tried this with 1.8.0..?

    — commented March 19th 2012 by Mitul Bhalia

2 Answers

  • Did you finally fix this problem? I'm having some trouble myself now too…

    The only solution I can think of is rebuilding the whole table using
    tableView.setData(data)

    — answered November 1st 2010 by George Marmaridis
    permalink
    0 Comments
  • I have the same issue , only when using appendRow.. any fix for this?

    — answered November 12th 2010 by Petr Cervenka
    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.