[TIMOB-23341] Exception on iPhone: no row found for index. in -TiUITableViewProxy insertRowAfter
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-08-11T21:58:44.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | n/a |
Reporter | Peter Varadi |
Assignee | Angel Petkov |
Created | 2012-10-18T12:29:48.000+0000 |
Updated | 2017-03-22T17:12:19.000+0000 |
Description
When you are trying to add numerous rows to a TableView using insertRowAfter it randomly causes exceptions: "no row found for index. in -TiUITableViewProxy insertRowAfter:";"
It looks line some code lines have been commented out for unknown reason and causing issues on the UI thread. Please see this commit:
https://github.com/appcelerator/titanium_mobile/commit/040cb9ab4350e6f3bd6eb5e22770f76ec9791b5e
And see this issue on the forum:
http://developer.appcelerator.com/question/129708/obj-c-fix-for-error-on-tableview-insertrowbefore--insertrowafter
This line should be back on those methods:
ENSURE_UI_THREAD(insertRowAfter,args);
This is a very old commit. Please provide some code that we can test with
Please reopen this ticket. The 'no row found for index' is still present in SDK 5.2. It's append when you use loop to insert row after the last row. Please check the answer and the explaination here https://archive.appcelerator.com/question/129708/obj-c-fix-for-error-on-tableview-insertrowbefore--insertrowafter
And this is how to reproduce the bug
*EDIT by Hans*: Corrected the demo code and added some format.
Reopening ticket, this is a valid issue. PR: https://github.com/appcelerator/titanium_mobile/pull/7992
Closing ticket due to comments made above. Please re-open if this issue returns.