This site requires JavaScript, please enable it in your browser!
Greenfoot back
minetruck
minetruck wrote ...

2020/2/3

Exception in Thread and ArrayIndexOutOfBoundsException

minetruck minetruck

2020/2/3

#
hi, i have a start screen menu where you can press left to see instructions, press tab to start 1v1 game and press up to start singleplayer game. sometimes it works fine but sometimes i have the "Exception in Thread" problem (with a soundfile) and the "ArrayIndexOutOfBoundsException" problem.
Exception in thread "SoundStream:file:/D:/informatik/TieVSXfighter/Space%20Shooter%20-%20Besprechen/sounds/startmusic.mp3" Exception in thread "SoundStream:file:/D:/informatik/TieVSXfighter/Space%20Shooter%20-%20Besprechen/sounds/startmusic.mp3" java.lang.ArrayIndexOutOfBoundsException: Index 2305 out of bounds for length 2304
	at javazoom.jl.decoder.SampleBuffer.appendSamples(SampleBuffer.java:96)
	at javazoom.jl.decoder.SynthesisFilter.compute_pcm_samples(SynthesisFilter.java:1510)
	at javazoom.jl.decoder.SynthesisFilter.calculate_pcm_samples(SynthesisFilter.java:1550)
	at javazoom.jl.decoder.LayerIIIDecoder.decode(LayerIIIDecoder.java:324)
	at javazoom.jl.decoder.LayerIIIDecoder.decodeFrame(LayerIIIDecoder.java:219)
	at javazoom.jl.decoder.Decoder.decodeFrame(Decoder.java:147)
	at greenfoot.sound.Mp3AudioInputStream.read(Mp3AudioInputStream.java:230)
	at greenfoot.sound.SoundStream.run(SoundStream.java:255)
	at java.base/java.lang.Thread.run(Thread.java:834)
java.lang.ArrayIndexOutOfBoundsException: Index 2305 out of bounds for length 2304
	at javazoom.jl.decoder.SampleBuffer.appendSamples(SampleBuffer.java:96)
	at javazoom.jl.decoder.SynthesisFilter.compute_pcm_samples(SynthesisFilter.java:1510)
	at javazoom.jl.decoder.SynthesisFilter.calculate_pcm_samples(SynthesisFilter.java:1550)
	at javazoom.jl.decoder.LayerIIIDecoder.decode(LayerIIIDecoder.java:324)
	at javazoom.jl.decoder.LayerIIIDecoder.decodeFrame(LayerIIIDecoder.java:219)
	at javazoom.jl.decoder.Decoder.decodeFrame(Decoder.java:147)
	at greenfoot.sound.Mp3AudioInputStream.read(Mp3AudioInputStream.java:230)
	at greenfoot.sound.SoundStream.run(SoundStream.java:255)
	at java.base/java.lang.Thread.run(Thread.java:834)
the problem is, it doesnt show me where the problem is, so i dont know whats wrong. it would be nice if someone could help me :)
nccb nccb

2020/2/3

#
This looks like a problem in our MP3 library while it is trying to play that file. I would try converting the file to WAV in a program like Audacity, then see if using the WAV instead fixes the problem.
You need to login to post a reply.