Renanse / Ardor3D

Ardor3D is a free Java based, professionally oriented, open source 3D graphics engine.
Other
227 stars 77 forks source link

Out of bounds exception when running the MountainShadowTerrainExample ... #82

Closed jfelrod1960 closed 6 years ago

jfelrod1960 commented 6 years ago

"C:\Program Files\Java\jdk1.8.0_121\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.1.1\lib\idea_rt.jar=50377:C:\Program Files\JetBrains\IntelliJ IDEA 2018.1.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_121\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\rt.jar;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-examples\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-tools\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-lwjgl\out\production\classes;C:\Users\jfe.CAMPUS.m2\repository\org\lwjgl\lwjgl\lwjgl_util\2.9.3\lwjgl_util-2.9.3.jar;C:\Users\jfe.CAMPUS.m2\repository\org\lwjgl\lwjgl\lwjgl\2.9.3\lwjgl-2.9.3.jar;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-terrain\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-awt\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-swt\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-jogl\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-effects\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-extras\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-collada\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-ui\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-animation\out\production\classes;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-core\out\production\classes;C:\Users\jfe.CAMPUS.m2\repository\org\lwjgl\lwjgl\lwjgl-platform\2.9.3\lwjgl-platform-2.9.3-natives-windows.jar;C:\Users\jfe.CAMPUS.m2\repository\org\lwjgl\lwjgl\lwjgl-platform\2.9.3\lwjgl-platform-2.9.3-natives-linux.jar;C:\Users\jfe.CAMPUS.m2\repository\org\lwjgl\lwjgl\lwjgl-platform\2.9.3\lwjgl-platform-2.9.3-natives-osx.jar;C:\Users\jfe.CAMPUS.m2\repository\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;C:\Users\jfe.CAMPUS.m2\repository\org\eclipse\swt\org.eclipse.swt.win32.win32.x86_64\4.3\org.eclipse.swt.win32.win32.x86_64-4.3.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt-main\2.1.4-rc-20140126\gluegen-rt-main-2.1.4-rc-20140126.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all-main\2.1.4-rc-20140126\jogl-all-main-2.1.4-rc-20140126.jar;C:\Users\jfe.CAMPUS.m2\repository\org\eclipse\swt\org.eclipse.swt.gtk.linux.x86_64\4.3\org.eclipse.swt.gtk.linux.x86_64-4.3.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jdom\jdom2\2.0.4\jdom2-2.0.4.jar;C:\Users\jfe.CAMPUS.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-math\out\production\classes;C:\Users\jfe.CAMPUS.m2\repository\com\google\guava\guava\14.0.1\guava-14.0.1.jar;C:\Users\jfe.CAMPUS.m2\repository\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;C:\Users\jfe.CAMPUS.m2\repository\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-linux.jar;C:\Users\jfe.CAMPUS.m2\repository\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;C:\Users\jfe.CAMPUS.m2\repository\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-osx.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-android-armv6.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-linux-amd64.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-linux-armv6.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-linux-armv6hf.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-linux-i586.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-macosx-universal.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-solaris-amd64.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-solaris-i586.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-windows-amd64.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\gluegen\gluegen-rt\2.1.4-rc-20140126\gluegen-rt-2.1.4-rc-20140126-natives-windows-i586.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-android-armv6.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-linux-amd64.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-linux-armv6.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-linux-armv6hf.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-linux-i586.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-macosx-universal.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-solaris-amd64.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-solaris-i586.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-windows-amd64.jar;C:\Users\jfe.CAMPUS.m2\repository\org\jogamp\jogl\jogl-all\2.1.4-rc-20140126\jogl-all-2.1.4-rc-20140126-natives-windows-i586.jar;C:\Users\jfe.CAMPUS\Documents\GitHub\Ardor3D\ardor3d-savable\out\production\classes" com.ardor3d.example.terrain.MountainShadowTerrainExample Apr 25, 2018 11:42:46 AM com.ardor3d.example.ExampleBase init INFO: Display Vendor: Intel Apr 25, 2018 11:42:46 AM com.ardor3d.example.ExampleBase init INFO: Display Renderer: Intel(R) HD Graphics 4600 Apr 25, 2018 11:42:46 AM com.ardor3d.example.ExampleBase init INFO: Display Version: 4.3.0 - Build 20.19.15.4531 Apr 25, 2018 11:42:46 AM com.ardor3d.example.ExampleBase init INFO: Shading Language Version: 4.30 - Build 20.19.15.4531 Apr 25, 2018 11:42:47 AM com.ardor3d.extension.model.collada.jdom.ColladaAnimUtils parseLibraryAnimations WARNING: No animations found in collada file! Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTerrainSystem INFO: TerrainConfiguration [cacheGridSize=128, heightRangeMax=0.34, heightRangeMin=0.0, onlyPositiveQuadrant=true, scale=com.ardor3d.math.Vector3 [X=5.0, Y=2048.0, Z=5.0], totalNrClipmapLevels=7] Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTerrainSystem INFO: server clipmapLevels: 7 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTerrainSystem INFO: baseLevel: 0 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTerrainSystem INFO: meshLevel: 6 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTerrainSystem INFO: client clipmapLevels: 7 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: TextureConfiguration [cacheGridSize=128, onlyPositiveQuadrant=true, textureDataTypes={0=Luminance8}, textureDensity=1.0, totalNrClipmapLevels=7, useAlpha=false] Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: server clipmapLevels: 7 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: baseLevel: 0 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: meshLevel: 6 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: client clipmapLevels: 7 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TextureClipmap INFO: Texture size: 128 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TextureClipmap INFO: ValidLevels: 7 Apr 25, 2018 11:42:48 AM com.ardor3d.extension.terrain.client.TextureClipmap INFO: 3D Texture depth: 8 Apr 25, 2018 11:42:49 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: TextureConfiguration [cacheGridSize=128, onlyPositiveQuadrant=true, textureDataTypes={0=RGB8}, textureDensity=1.0, totalNrClipmapLevels=7, useAlpha=false] Apr 25, 2018 11:42:49 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: server clipmapLevels: 7 Apr 25, 2018 11:42:49 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: baseLevel: 0 Apr 25, 2018 11:42:49 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: meshLevel: 6 Apr 25, 2018 11:42:49 AM com.ardor3d.extension.terrain.client.TerrainBuilder buildTextureSystem INFO: client clipmapLevels: 7 Apr 25, 2018 11:42:49 AM com.ardor3d.extension.terrain.client.TextureClipmap INFO: Texture size: 128 Apr 25, 2018 11:42:49 AM com.ardor3d.extension.terrain.client.TextureClipmap INFO: ValidLevels: 7 Apr 25, 2018 11:42:49 AM com.ardor3d.extension.terrain.client.TextureClipmap INFO: 3D Texture depth: 8 Throwable caught in MainThread - exiting java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at com.ardor3d.extension.ui.text.TextFactory.generateText(TextFactory.java:299) at com.ardor3d.extension.ui.AbstractLabelUIComponent.setText(AbstractLabelUIComponent.java:97) at com.ardor3d.extension.ui.AbstractLabelUIComponent.fireStyleChanged(AbstractLabelUIComponent.java:246) at com.ardor3d.extension.ui.UIComponent.addFontStyle(UIComponent.java:208) at com.ardor3d.example.terrain.MountainShadowTerrainExample.initExample(MountainShadowTerrainExample.java:317) at com.ardor3d.example.ExampleBase.init(ExampleBase.java:220) at com.ardor3d.framework.FrameHandler.init(FrameHandler.java:178) at com.ardor3d.example.ExampleBase.run(ExampleBase.java:145) at java.lang.Thread.run(Thread.java:745)

@Renanse I tried to drill down into the code but could see how this is happening.

Jeff

Renanse commented 6 years ago

Turns out the issue is a negative size in the bmfont picked due to the combination of BOLD and font size 16. arial-16-bold-regular.fnt has size="-16", which looks like it is meant to indicate cell height rather than character height. So we'll need to regen that font. I'll look into that today.

Renanse commented 6 years ago

Fixed with commit 2172c9c by re-exporting the font. I also re-exported the other arial fonts in the same package. I stuffed them with additional glyphs as well. :) Thanks for bringing it up @jfelrod1960!