Ticket #423 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago


Reported by: kmaclean Owned by: kmaclean
Priority: major Milestone: SpeechSubmission 0.1.6
Component: SpeechSubmission Version: SpeechSubmission0.1.5
Keywords: Cc:


The following error occurs when using a language with a small number of prompts (e.g. Russian, Spanish) and clicking refresh many times in the browser:

	at java.lang.Object.wait(Native Method)
	at java.lang.Thread.join(Thread.java:1143)
	at java.lang.Thread.join(Thread.java:1196)
	at sun.applet.AppletPanel.run(AppletPanel.java:404)
	at java.lang.Thread.run(Thread.java:619)

Change History

comment:1 Changed 14 years ago by kmaclean

Changed this code:

	// !!!!!!
	//int arrayLength = promptList.length - 1;
	int arrayLength = promptList.length;
    System.err.println("arrayLength " + arrayLength);
	int nextPrompt = randomGenerator.nextInt(arrayLength);
    System.err.println("nextPrompt " + nextPrompt);
	for (int idx=0;idx<NumberofPrompts; idx++) {
	    System.err.println("nextPrompt " + nextPrompt + "idx " + idx);
		if (nextPrompt <= arrayLength) {		
			getPromptLine(nextPrompt, idx);
		} else {
			nextPrompt = 0;
			getPromptLine(nextPrompt, idx);
	// !!!!!!

Got this error:

PromptList Character Encoding:UTF8
arrayLength 43
nextPrompt 39
nextPrompt 39idx 0
nextPrompt 40idx 1
nextPrompt 41idx 2
nextPrompt 42idx 3
nextPrompt 43idx 4
java.lang.ArrayIndexOutOfBoundsException: 43
	at speechrecorder.Prompts.getPromptLine(Prompts.java:123)
	at speechrecorder.Prompts.<init>(Prompts.java:106)
	at speechrecorder.CapturePlayback.<init>(CapturePlayback.java:266)
	at speechrecorder.RecorderApplet.init(RecorderApplet.java:43)
	at sun.applet.AppletPanel.run(AppletPanel.java:436)
	at java.lang.Thread.run(Thread.java:636)

comment:2 Changed 14 years ago by kmaclean

public class InterruptedException? extends Exception

Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it using the interrupt method in class Thread.

comment:3 Changed 14 years ago by kmaclean

  • Status changed from new to closed
  • Resolution set to fixed

Workaround: close and reopen browser

Note: See TracTickets for help on using tickets.