Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3294] iOS: App termination due to misc. mutable circumstances

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionNeeds more info
Resolution Date2012-05-03T16:28:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelscore
ReporterRick Blalock
AssigneeMarshall Culpepper
Created2011-04-15T03:41:37.000+0000
Updated2017-03-09T23:53:18.000+0000

Description

A common exception that terminates an app happens when trying to manipulate, remove, etc. an array filled with native objects.

One of our customers reports the issue here: http://developer.appcelerator.com/helpdesk/view/66011#c361894">http://developer.appcelerator.com/helpdesk/view/66011#c361894

This is something common I've seen across trying to remove an array of event listeners, native objects stored in a global array, etc.

Another similar example although not identical is the scrollableView's 'views' property. If it's populated with 20 views and then you decide to loop through each one removing them (i.e. using the remove method) - it can take several seconds on the device before they are all removed, depending on their contents. If you try to repopulate the scrollableView's views before they are removed, it throws an exception and terminates the app ('NSArray was mutated while being enumerated' or sometimes '0...12 index 14 not found', depending on the context).

The above example can be applied to simply removing views from a window that are referenced in a global array and then trying to repopulate that array (or even views that are children of a view).

Comments

  1. Stephen Tramer 2012-05-03

    Helpdesk ticket is no longer available, no description of a repro case in the ticket itself. Requires reproduction case before we can investigate.
  2. Lee Morris 2017-03-09

    Closing this ticket as the request for more information has not been provided.

JSON Source