Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-86] Race condition in sound: prepareAsync called in state 128

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:51:56.000+0000
Affected Version/sn/a
Fix Version/sRelease 0.6.2
ComponentsAndroid
Labelsandroid
ReporterDon Thorp
AssigneeDon Thorp
Created2011-04-15T02:23:31.000+0000
Updated2011-04-17T01:51:56.000+0000

Description

If release was called just as sound finished it could cause the MediaPlayer to throw an IllegalState exception 'prepareAsync called in state 128'. Being an unchecked exception, it would cause the application to terminate.

Comments

  1. Don Thorp 2011-04-15

    (from [73c36134d78e207ef2075d27f7452f363d76c23e]) [#86 state:resolved] Removed call to stop in release. It was causing an IllegalStateException to be thrown in some cases. Also put throwable catches around all audio calls to prevent it from taking the app down. http://github.com/appcelerator/titanium_mobile/commit/73c36134d78e207ef2075d27f7452f363d76c23e"> http://github.com/appcelerator/titanium_mobile/commit/73c36134d78e2...

JSON Source