{ "id": "61283", "key": "TIMOB-651", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11222", "name": "Release 1.2.0", "archived": true, "released": true, "releaseDate": "2010-04-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:48.000+0000", "created": "2011-04-15T02:33:46.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:48.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

get this

\n

2010-03-26 11:46:28.667 TwitterUI[51108:530b] *** Terminating\napp due to uncaught exception 'NSInternalInconsistencyException',\nreason: 'stopAudioSession called too many times'

\n

seems to be a problem with the guard.

\n

run attached app (click button on page1, then click row on table\nview, close modal, repeat -> crash)

{html}", "attachment": [ { "id": "17877", "filename": "archive.zip", "author": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:47.000+0000", "size": 10898, "mimeType": "application/zip" } ], "flagged": false, "summary": "Audio Player crash", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123737", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Claimed from Blain. My previous description of the bug was\nerroneous.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:47.000+0000", "updated": "2011-04-15T02:33:47.000+0000" }, { "id": "123738", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This appears to be a much more serious issue. Stack traces\nindicate the following:

\n

Creation: (count = 1)
\n0: -[TiMediaAudioSession startAudioSession]
\n1: -[TiMediaAudioPlayerProxy initWithProperties:]
\n2: -[TiProxy
initWithPageContext:args:]
\n3: -[TiModule createProxy:forName:context:]

\n

With the following when the tab (NOT the modal window!) are\nclosed:

\n

Destruction:

\n

Once for context destruction: (count = 0)
\n1: -[TiMediaAudioSession stopAudioSession]
\n2: -[TiMediaAudioPlayerProxy _destroy]
\n3: -[TiProxy contextShutdown:]

\n

And once for the proxy destruction: (count = -1)

\n

1: -[TiMediaAudioSession stopAudioSession]
\n2: -[TiMediaAudioPlayerProxy _destroy]
\n3: -[TiProxy dealloc]

\n

The solution is to perform a sanity check on (count), but please\nbe aware of the larger issue: All destroy functions MUST\nRELEASE_TO_NIL() all variables and/or perform operations which are\nguaranteed to have NO side-effects in other classes (in this case,\nTiMediaAudioPlayerProxy calls a function with a side-effect in\nanother class: TiMediaAudioSession.) If they must call functions\nwith side-effects, there should be a 'BOOL destroyed' variable\nwhich tracks whether or not the object has already been destroyed.\n(ED'S NOTE: Calling [super destroy] in the appropriate place\nhandles this already; ignore my advice.)

\n

Strongly recommend that this variable (and a sanity check\nassociated with it) be added to TiProxy.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:47.000+0000", "updated": "2011-04-15T02:33:47.000+0000" }, { "id": "123739", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Well I'll be - there's already this variable (and an associated\nsanity check!) in _destroy for TiProxy.

\n

The problem was that [super _destroy] was not called. Fixed.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:47.000+0000", "updated": "2011-04-15T02:33:47.000+0000" }, { "id": "123740", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [31b5596dc6480e8f6e753a48949505706e7a2f2a])\nCloses #651 - Didn't call [super _destroy]. \nhttp://github.com/appcelerator/titanium_mobile/commit/31b5596dc6480...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:33:47.000+0000", "updated": "2011-04-15T02:33:47.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }