Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6523] Android: Titanium.Media.Sound - V8/Rhino - Android 2.x - player crashes on play or repeated play

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-07T22:42:48.000+0000
Affected Version/sRelease 1.7.5, Release 1.8.0.1
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterDustin Hyde
AssigneeIngo Muschenetz
Created2011-12-08T17:32:21.000+0000
Updated2017-06-07T22:42:48.000+0000

Description

Titanium.Media.Sound using V8/Rhino crashes on play or repeated play. This occurs in 1.7.5 and 1.8.0.1. The crashes occur in 2.x (occurs after less clicks in V8). Android 3.x/4.0 haven't crashed, but in 3.x the app locked-up. There were instances of 2.x losing sound capabilities (in the app) without a crash, but with similar logs. None of this occurs in iOS. Crash log attached. Steps to Reproduce: 1. Run the following code in a new app (sound file attached).
var playCounter = 0;

var win = Titanium.UI.createWindow({  
    backgroundColor:'#fff',
    orientationModes:[Ti.UI.LANDSCAPE_RIGHT]
});

var button = Ti.UI.createButton({
	title:'click'
});
button.addEventListener('click', Playsound);
win.add(button);

win.open();

function Playsound(){
	playCounter++;
	Ti.API.info("Playing sound, nr: " + playCounter);
	var player =Ti.Media.createSound({
		url: "cat.mp3"
	});
	
	player.addEventListener('complete', function(e) {
		player.release();
		player = null;
		Ti.API.info("Sound played correctly");
	});
	player.play();
}
2. Press the 'click' button repeatedly (a dozen times). Expected Result: The sounds should play. Actual Result: The app crashes, sometimes on the first click. Alternately, the click button will no longer play sounds, or no longer register click events.

Attachments

FileDateSize
android sound crash.txt2011-12-08T17:32:21.000+00007530
cat.mp32011-12-08T17:32:21.000+000023822

Comments

  1. Lee Morris 2017-06-07

    Closing ticket due to the time passed and lack of progress.

JSON Source