Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

26. May 2012, 11:20:20 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)AIOOBE :) sometimes
Pages: [1]
Print
Author Topic: AIOOBE :) sometimes  (Read 900 times)
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« on: 30. June 2007, 02:45:21 pm »

This exception sometimes happen :

Code:
java.lang.ArrayIndexOutOfBoundsException: 8
at org.xith3d.scenegraph.GeomData.setCacheHandle(GeomData.java:178)
at org.xith3d.render.lwjgl.ShapeAtomPeer.bindGeometryComponent(ShapeAtomPeer.java:442)
at org.xith3d.render.lwjgl.ShapeAtomPeer.setupTextureCoords(ShapeAtomPeer.java:540)
at org.xith3d.render.lwjgl.ShapeAtomPeer.renderAtom(ShapeAtomPeer.java:1282)
at org.xith3d.render.CanvasPeer.renderAtom(CanvasPeer.java:667)
at org.xith3d.render.lwjgl.CanvasPeerImplBase.drawBin(CanvasPeerImplBase.java:463)
at org.xith3d.render.lwjgl.CanvasPeerImplBase.renderBackground(CanvasPeerImplBase.java:838)
at org.xith3d.render.lwjgl.CanvasPeerImplBase.display(CanvasPeerImplBase.java:1058)
at org.xith3d.render.lwjgl.CanvasPeerImplNative.doRender(CanvasPeerImplNative.java:317)
at org.xith3d.render.lwjgl.CanvasPeerImplBase.render(CanvasPeerImplBase.java:1143)
at org.xith3d.render.DefaultRenderer.doRender(DefaultRenderer.java:391)
at org.xith3d.render.DefaultRenderer.renderOnceInternal(DefaultRenderer.java:496)
at org.xith3d.render.DefaultRenderer.renderOnce(DefaultRenderer.java:566)
at org.xith3d.base.Xith3DEnvironment.render(Xith3DEnvironment.java:442)
at org.xith3d.loop.RenderLoop.renderNextFrame(RenderLoop.java:596)
at org.xith3d.loop.RenderLoop.loopIteration(RenderLoop.java:619)
at org.xith3d.loop.RenderLoop.update(RenderLoop.java:673)
at org.xith3d.loop.UpdatingThread.nextIteration(UpdatingThread.java:247)
at org.xith3d.loop.RenderLoop.loop(RenderLoop.java:731)
at org.xith3d.loop.UpdatingThread.run(UpdatingThread.java:295)
at org.xith3d.loop.RenderLoop.run(RenderLoop.java:754)
at org.xith3d.loop.RenderLoop.begin(RenderLoop.java:807)
at org.xith3d.test.loaders.MD2LoaderTest.<init>(MD2LoaderTest.java:262)
at org.xith3d.test.ui.HUD3DTest.<init>(HUD3DTest.java:709)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.xith3d.test.Xith3DTestLauncher.runTest(Xith3DTestLauncher.java:679)
at org.xith3d.test.Xith3DTestLauncher.onStartButtonClicked(Xith3DTestLauncher.java:172)
at org.xith3d.utility.launching.DisplayOptions.waitForStart(DisplayOptions.java:1030)
at org.xith3d.test.Xith3DTestLauncher.onTestFinished(Xith3DTestLauncher.java:163)
at org.xith3d.test.ui.FourViewsPanelTest.exit(FourViewsPanelTest.java:77)
at org.xith3d.loop.RenderLoop.destroyAndExit(RenderLoop.java:431)
at org.xith3d.loop.RenderLoop.run(RenderLoop.java:775)
at java.lang.Thread.run(Thread.java:619)

Sorry not to be more precise, here you can see it's when launching the HUD3DTest but it doesn't happen each time so...
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 01. July 2007, 12:06:15 am »

I think, I know, where this Exception comes from. The array has a fixed length of 8, which should be sufficient, since you won't ever have more than eight canvases in your scene (for a game). The index for this array is the CanvasPeer's ID - 1. This ID is autogenerated by an auto-increment number starting at 1. This auto-increment number is a private static field of CanvasPeer.
So if you create more than one CanvasPeer (e.g. by restarting the application without restarting the JVM) this ID get higher and higher until it exceeds 8.

I have solved this problem (which should not be a real problem for productive apps/games) by freeing the CanvasID to be reused if it is the last assigned ID (e.g. in case of a one-Canvas-app). So this problem should not happen again. But there are other things, that we would need to cleanup, if we want xith to be relaunchable without relaunching the JVM.

Marvin
Logged
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #2 on: 01. July 2007, 02:53:46 pm »

I have solved this problem (which should not be a real problem for productive apps/games) by freeing the CanvasID to be reused if it is the last assigned ID (e.g. in case of a one-Canvas-app). So this problem should not happen again. But there are other things, that we would need to cleanup, if we want xith to be relaunchable without relaunching the JVM.
Ah, that'd be really important for me, Marvin. For the development tools I'm planning to code, I'd need relaunchability.
And please don't make such assumptions that one would never use more than 8 canvases at once : who said Xith3D is used for games only ??
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 01. July 2007, 03:00:18 pm »

Ah, that'd be really important for me, Marvin. For the development tools I'm planning to code, I'd need relaunchability.

OK. But it is certainly not a task for now. Sorry.

And please don't make such assumptions that one would never use more than 8 canvases at once : who said Xith3D is used for games only ??

Well, this assumption definitely makes sense. Having more and more Canvases will knock down performance and you can do a lot by using multiple ViewPorts without loosing any performance.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic