litiengine icon indicating copy to clipboard operation
litiengine copied to clipboard

Importing some .WAV files fails

Open Gamebuster19901 opened this issue 1 year ago • 1 comments

Describe the bug Utiliti fails to import some .WAV files

Stack Trace The error message you get either in your console or the crash.txt located in your program's root directory.

java.lang.ArrayIndexOutOfBoundsException: Index 580 out of bounds for length 580
	at javazoom.jl.decoder.LayerIIIDecoder.huffman_decode(LayerIIIDecoder.java:795)
	at javazoom.jl.decoder.LayerIIIDecoder.decode(LayerIIIDecoder.java:278)
	at javazoom.jl.decoder.LayerIIIDecoder.decodeFrame(LayerIIIDecoder.java:219)
	at javazoom.jl.decoder.Decoder.decodeFrame(Decoder.java:147)
	at javazoom.spi.mpeg.sampled.convert.DecodedMpegAudioInputStream.execute(DecodedMpegAudioInputStream.java:185)
	at org.tritonus.share.TCircularBuffer.read(TCircularBuffer.java:138)
	at org.tritonus.share.sampled.convert.TAsynchronousFilteredAudioInputStream.read(TAsynchronousFilteredAudioInputStream.java:197)
	at org.tritonus.share.sampled.convert.TAsynchronousFilteredAudioInputStream.read(TAsynchronousFilteredAudioInputStream.java:182)
	at de.gurkenlabs.litiengine.util.io.StreamUtilities.copy(StreamUtilities.java:40)
	at de.gurkenlabs.litiengine.util.io.StreamUtilities.getBytes(StreamUtilities.java:56)
	at de.gurkenlabs.litiengine.sound.Sound.<init>(Sound.java:56)
	at de.gurkenlabs.litiengine.resources.SoundResource.<init>(SoundResource.java:33)
	at de.gurkenlabs.utiliti.components.Editor.importSounds(Editor.java:537)
	at de.gurkenlabs.utiliti.components.Editor.importSounds(Editor.java:447)
	at de.gurkenlabs.utiliti.swing.menus.ResourcesMenu.lambda$7(ResourcesMenu.java:65)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
	at com.github.weisj.darklaf.ui.menu.DarkMenuItemUIBase.doClick(DarkMenuItemUIBase.java:165)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
	at java.desktop/java.awt.Component.processEvent(Component.java:6391)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

To Reproduce Steps to reproduce the behavior:

  1. In Utiliti, Click on [Resources] -> [Import] -> [Sounds] -> Select [notWorking.wav]
  2. See error

Expected behavior The file should import correctly

Your System:

Operating System: Linux
	Architecture: amd64
	Version: 5.15.0-58-generic
Memory:
	Max heap size: 7.8 GiB
	Current heap size: 148.0 MiB
	Heap used: 73.7 MiB
	Free heap: 74.3 MiB
Java Version: OpenJDK Runtime Environment 17.0.5+8-Ubuntu-2ubuntu122.04 
	Vendor: Private Build
Uptime: PT59.367S
Screens: 2
	Screen 0: 5760x2160@50hz
	Screen 1: 1920x1080

Additional context sounds.zip

Gamebuster19901 avatar Jan 24 '23 16:01 Gamebuster19901