Having two views freezes my comp :(

Hi,

I just tried to get multiple views with each having a JPanel as CanvasPeer. Each view represents a local simulated vehicle based camera.

However, after a couple of frames my linux comp freezes and must be rebooted. The JavaVM (1.5beta32) is dumping their bug report stuff at the moment the freeze occurs (deterministically and reproducible).

Has someone experienced a similar problem ? Or more important, has someone used multiple views and JPanels added to a single VirtualUniverse successfully?

That info would help me determine where to locate the problem as there are multiple candidates … xith … jogl … javaVM(beta) … myCode_messing_things_up.

Thanks,
Ca$

Hi cascade

I did. When I try to add two canvases to the same View, the VM crashes with a HotSpot Error. I haven’t solved why yet, but it works fine with different Views added to the same VirtualUniverse. see http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1102189007;start=0

Maybe your linux would’nt freeze, if you use java1.5.0 (it’s no beta anymore)

Arne

I had trouble getting two views to render as well, don’t knwo if this applies to your issue but I had to modify the com.xith3d.render.jogl.CanvasPeerImpl class to get it to work. This was a long time ago so the code may not even look the same any more. Think what I changed was commenting out the first if in the mehtod below.

    public void render(RenderFrame frame) {
        ProfileTimer.startProfile("CanvasPeerImpl::render");
        //if (renderFrame == null) canvas.setRenderingThread(Thread.currentThread());
        renderFrame = frame;

        if (pickMode)
        {
          Thread renderingThread = canvas.getRenderingThread();
          if ((renderingThread != null) && (Thread.currentThread() != renderingThread))
            throw new Error("Pick initiated not from rendering thread");
          canvas.display();
        }
        else
          canvas.display();
        ProfileTimer.endProfile();
    }

This is the program that I had to do it for and the changed source is in the zip.

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1075405999

thanks for your help but I could not yet get it to work :frowning:

To finally test the possibility of rendering multiple Xith-based views I started the single-view process twice and got two views.
This worked of course, but I get a lot of flickering in both windows. I wonder if this is a problem of the graphics card, the driver, jogl or xith ?

hmm, just tried the CubeTest demo and this does not flicker when active several times … OK the flicker has been caused by the view.startView call (removing this call removed the flicker)

update:
I just installed the latest nvidia driver (6629) and now my machine does just crash but not freeze (this speeds up debugging a lot :wink: )

here is the dump:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j net.java.games.jogl.impl.x11.X11GLImpl.glDrawArrays(III)V+0
j com.xith3d.render.jogl.ShapeAtomPeer.drawGeometry(Lcom/xith3d/render/CanvasPe
er;Lnet/java/games/jogl/GL;Lcom/xith3d/scenegraph/GeometryArray;)V+445
j com.xith3d.render.jogl.ShapeAtomPeer.renderAtom(Lcom/xith3d/render/CanvasPeer
;Lcom/xith3d/render/RenderAtom;)V+442
J com.xith3d.render.CanvasPeerBase.render(Lcom/xith3d/render/RenderAtom;)V
j com.xith3d.render.jogl.CanvasPeerImpl.drawBin(Lnet/java/games/jogl/GL;Lcom/xi
th3d/render/RenderBin;)V+37
j com.xith3d.render.jogl.CanvasPeerImpl.display(Lnet/java/games/jogl/GLDrawable
;)V+200
j net.java.games.jogl.impl.GLDrawableHelper.display(Lnet/java/games/jogl/GLDraw
able;)V+29
j net.java.games.jogl.GLCanvas$DisplayAction.run()V+11
j net.java.games.jogl.impl.GLContext.invokeGL(Ljava/lang/Runnable;ZLjava/lang/R
unnable;)V+268
j net.java.games.jogl.GLCanvas.displayImpl()V+13
j net.java.games.jogl.GLCanvas.display()V+1
j com.xith3d.render.jogl.CanvasPeerImpl.render(Lcom/xith3d/render/RenderFrame;)
V+78
j com.xith3d.scenegraph.View.renderOnce(Lcom/xith3d/scenegraph/Canvas3D;)V+53
j com.xith3d.scenegraph.View.renderOnce()V+55
j ext.xith3d.base.XithWorld.updatePostwork(D)V+112