{ "id": "110338", "key": "TIMOB-13525", "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": [], "resolution": null, "resolutiondate": null, "created": "2013-02-27T19:32:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:16.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The following method is from AudioStreamerCUR.m in SDK 3.0.2.GA. When you call the stop method while in AS_STOPPING state the app gets into an endless loop at the end of the method. Depending on the audio file the AS_STOPPING state can be several seconds at the end of the song. Also it seems that other methods have problems with that state, e.g. pause seems to do nothing. This means that the player cannot be controlled and might hang the app in this state.\r\n\r\n{code}\r\n- (void)stop\r\n{\r\n\t@synchronized(self)\r\n\t{\r\n\t\tif (audioQueue &&\r\n\t\t\t(state == AS_PLAYING || state == AS_PAUSED ||\r\n\t\t\t\tstate == AS_BUFFERING || state == AS_WAITING_FOR_QUEUE_TO_START))\r\n\t\t{\r\n\t\t\tself.state = AS_STOPPING;\r\n\t\t\tstopReason = AS_STOPPING_USER_ACTION;\r\n\t\t\terr = AudioQueueStop(audioQueue, true);\r\n\t\t\tif (err)\r\n\t\t\t{\r\n\t\t\t\t[self failWithErrorCode:AS_AUDIO_QUEUE_STOP_FAILED];\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (state != AS_INITIALIZED)\r\n\t\t{\r\n\t\t\tself.state = AS_STOPPED;\r\n\t\t\tstopReason = AS_STOPPING_USER_ACTION;\r\n\t\t}\r\n\t\tseekWasRequested = NO;\r\n\t}\r\n\t\r\n\twhile (state != AS_INITIALIZED)\r\n\t{\r\n\t\t[NSThread sleepForTimeInterval:0.1];\r\n\t}\r\n}\r\n{code}\r\n", "attachment": [ { "id": "37018", "filename": "app.js", "author": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-04-04T17:24:39.000+0000", "size": 851, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "iOS: Endless loop in AudioStreamerCUR", "creator": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 6\r\nTi SDK 3.1 GA, 3.0.2 GA", "comment": { "comments": [ { "id": "240049", "author": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "body": "Maybe it help that it seems that the call to {code}err = AudioQueueDispose(audioQueue, true){code} in \"startInternal\" after \"cleanup:\" does not return. At least not in the debugger. And so the state is never set to AS_INITIALIZED.", "updateAuthor": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-02-27T21:03:37.000+0000", "updated": "2013-02-27T21:14:33.000+0000" }, { "id": "240053", "author": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "body": "Works fine with iOS 6.0 in the simulator, so it seems (that's what Google also suggested) that it is an iOS 6.1 issue. Maybe there is some possible workaround?\r\n", "updateAuthor": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-02-27T21:41:45.000+0000", "updated": "2013-02-27T21:41:56.000+0000" }, { "id": "245576", "author": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Michael,\n\nPlease can you provide a small reproducible test case that demonstrates this issue, a 100 line or so app.js file is preferred. For more information on how to submit a bug report check: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report\n\nRegards,\nJamie", "updateAuthor": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-03T22:39:16.000+0000", "updated": "2013-04-03T22:39:16.000+0000" }, { "id": "245745", "author": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "body": "Please see the attached \"app.js\" and run it in the iPhone simulator. There is a text field with a predefined URL (which you can change) and start/stop buttons. When clicking the start button the audio player plays the specified URL. The predefined should be okay as long as it is reachable. Otherwise just select any MP3 file. It should not be too long since the effect is visible only at the end. Clicking the stop button stops playback which works fine. An alert is displayed which can be closed. When the audio player state changes to STOPPING, the change listner displays an alert box and stops the player. With iOS 6.1 this freezes th GUI forever. With iOS 6.0 it works fine.\n", "updateAuthor": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-04-04T17:23:57.000+0000", "updated": "2013-04-04T17:23:57.000+0000" }, { "id": "245747", "author": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "body": "Test project", "updateAuthor": { "name": "mdescher", "key": "mdescher", "displayName": "Michael Descher", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-04-04T17:24:39.000+0000", "updated": "2013-04-04T17:24:39.000+0000" }, { "id": "247097", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on iOS 6.1.3 with Ti SDK 3.0.2 GA and latest 3.1 CI. Simply quickly tap the start and stop button until it hangs. Also get a the red exception screen sometimes complaining that stop is called too many times.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-11T17:22:51.000+0000", "updated": "2013-04-11T17:22:51.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }