Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (575)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Having two views freezes my comp :(  (Read 745 times)
0 Members and 1 Guest are viewing this topic.
Offline cascade

Junior Duke




Java games rock!


« Posted 2004-12-06 14:33:47 »

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$
Offline arne

Senior Duke




money is the worst drug- we should not let it rule


« Reply #1 - Posted 2004-12-06 15:12:07 »

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

:: JOODE :: Xith3d :: OdeJava ::
Offline zparticle

Senior Duke




Thick As A Brick


« Reply #2 - Posted 2004-12-06 17:08:16 »

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.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
    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



Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cascade

Junior Duke




Java games rock!


« Reply #3 - Posted 2004-12-07 05:58:07 »

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

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

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (33 views)
2014-10-17 03:59:02

Norakomi (25 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (26 views)
2014-10-15 16:18:58

TehJavaDev (50 views)
2014-10-14 00:39:48

TehJavaDev (50 views)
2014-10-14 00:35:47

TehJavaDev (40 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (74 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!