Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (527)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (594)
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  
  Multiple Canvas errors  (Read 1674 times)
0 Members and 1 Guest are viewing this topic.
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Posted 2005-05-28 12:00:14 »

I have a runtime error when I actualise for the 7th time two View/Canvas.
This is very strange.
I've created a JFrame and have added to JPanel to it. I made Canvas of them, and then render a scene with two different views in them.
What's the problem ?
Maybe cylab ( Xith3D in Netbeans thread ) can help me... Smiley

Here's the log of the VM :


#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0xaf930b32, pid=13772, tid=3086776800
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_02-b09 mixed mode, sharing)
# Problematic frame:
# C  0xaf930b32
#

---------------  T H R E A D  ---------------

Current thread (0x0805b880):  JavaThread "main" [_thread_in_native, id=13772]

siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000000

Registers:
EAX=0xb050b9a0, EBX=0x0821b9c0, ECX=0x00000000, EDX=0x00000024
ESP=0xbfffd008, EBP=0xbfffd014, ESI=0x00000000, EDI=0x00000000
EIP=0xaf930b32, CR2=0x00000000, EFLAGS=0x00010296

Top of Stack: (sp=0xbfffd008)
0xbfffd008:   af930b00 0821b9c0 00000024 00000000
0xbfffd018:   b0fed154 0821b9c0 b050b99c 00000000
0xbfffd028:   00000024 0837eef0 0821b9c0 00000000
0xbfffd038:   00000024 00000000 00000006 00000055
0xbfffd048:   af930b00 0837eef0 082248e8 b0feebb7
0xbfffd058:   0821b9c0 00000004 00000000 00000024
0xbfffd068:   0821b9c0 00000024 00000000 00000004
0xbfffd078:   00000000 082248e8 b0e21271 0821b9c0

Instructions: (pc=0xaf930b32)
0xaf930b22:   04 8b 35 dc 4d 22 08 8b 76 54 8d 3c 49 8d 34 be
0xaf930b32:   8b 3e 8b 6e 04 89 38 89 68 04 8b 7e 08 89 78 08

Stack: [0xbfe00000,0xc0000000),  sp=0xbfffd008,  free space=2036k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0xaf930b32

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/CanvasPeer;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+543
j  com.xith3d.render.CanvasPeerBase.render(Lcom/xith3d/render/RenderAtom;)V+76
j  com.xith3d.render.jogl.CanvasPeerImpl.drawBin(Lnet/java/games/jogl/GL;Lcom/xith3d/render/RenderBin;)V+32
j  com.xith3d.render.jogl.CanvasPeerImpl.display(Lnet/java/games/jogl/GLDrawable;)V+327
j  net.java.games.jogl.impl.GLDrawableHelper.display(Lnet/java/games/jogl/GLDrawable;)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/Runnable;)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+79
j  com.xith3d.scenegraph.View.renderOnce(Lcom/xith3d/scenegraph/Canvas3D;)V+53
j  org.magicspark.gamma.universe.PointOfView.render()V+11
j  org.magicspark.gamma.test.RSTest.run()V+67
j  org.magicspark.gamma.test.RSTest.main([Ljava/lang/String;)V+9
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
 0x081bdb68 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=13785]
 0x081bcdc0 JavaThread "AWT-Shutdown" [_thread_blocked, id=13784]
 0x08431228 JavaThread "AWT-XAWT" daemon [_thread_blocked, id=13781]
 0x0836a8d0 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=13780]
 0x080a0cc8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=13778]
 0x0809f778 JavaThread "CompilerThread0" daemon [_thread_blocked, id=13777]
 0x0809e868 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=13776]
 0x08099ad0 JavaThread "Finalizer" daemon [_thread_blocked, id=13775]
 0x08098da8 JavaThread "Reference Handler" daemon [_thread_blocked, id=13774]
=>0x0805b880 JavaThread "main" [_thread_in_native, id=13772]

Other Threads:
 0x08096300 VMThread [id=13773]
 0x080a2158 WatcherThread [id=13779]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation   total 576K, used 176K [0x88ad0000, 0x88b70000, 0x88fb0000)
 eden space 512K,  21% used [0x88ad0000, 0x88aec1d0, 0x88b50000)
 from space 64K, 100% used [0x88b50000, 0x88b60000, 0x88b60000)
 to   space 64K,   0% used [0x88b60000, 0x88b60000, 0x88b70000)
tenured generation   total 2808K, used 2460K [0x88fb0000, 0x8926e000, 0x8cad0000)
  the space 2808K,  87% used [0x88fb0000, 0x89217258, 0x89217400, 0x8926e000)
compacting perm gen  total 8192K, used 3387K [0x8cad0000, 0x8d2d0000, 0x90ad0000)
  the space 8192K,  41% used [0x8cad0000, 0x8ce1efd8, 0x8ce1f000, 0x8d2d0000)
   ro space 8192K,  68% used [0x90ad0000, 0x91048958, 0x91048a00, 0x912d0000)
   rw space 12288K,  47% used [0x912d0000, 0x91886148, 0x91886200, 0x91ed0000)

Dynamic libraries:
...

VM Arguments:
java_command: org.magicspark.gamma.test.RSTest

Environment Variables:
PATH=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games
USERNAME=bluesky
LD_LIBRARY_PATH=/usr/lib/sun-j2sdk1.5.0/jre/lib/i386/client:/usr/lib/sun-j2sdk1.5.0/jre/lib/i386:/usr/lib/sun-j2sdk1.5.0/jre/../lib/i386
SHELL=/bin/bash
DISPLAY=:0.0


---------------  S Y S T E M  ---------------

OS:3.1

uname:Linux 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686
libc:glibc 2.3.2 NPTL 0.60
rlimit: STACK 8192k, CORE 0k, NPROC infinity, NOFILE 1024, AS infinity
load average:0.99 0.45 0.47

CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse

Memory: 4k page, physical 256812k(2908k free), swap 506008k(274328k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0_02-b09) for linux-x86, built on Mar  4 2005 03:08:25 by java_re with gcc 3.2.1-7a (J2SE release)

Grin Grin

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2005-05-28 16:32:00 »

It looks like you're using an old version of JOGL. I think that if you download the current (1.1 b12) version and drop both the jogl.jar and unpack the jogl-natives-linux.jar into your thirdparty libs that it will probably fix the crash.
Offline cylab

JGO Ninja


Medals: 55



« Reply #2 - Posted 2005-05-29 20:25:53 »

I had trouble with older versions of Xith3d, the last release however fixed most of my problems. Also upgrading to the latest JOGL like ken suggests might help. I don't know if I can help, but if you still have trouble after updating the dependencies, I could take a look at your code...

Mathias - I Know What [you] Did Last Summer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #3 - Posted 2005-05-30 08:36:08 »

Thanks guys.
After reading the Xith3D in Netbeans topic, I updated Xith3D to the latest community build, but I will try to download the latest JOGL version.
Note : this does not happen when I don't render both canvas.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline arne

Senior Devvie




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


« Reply #4 - Posted 2005-05-30 11:38:20 »

I was able to render two canvases, but I had to create two RenderPeers for that. But in the end it was no good, because I got a huge perfomance slowdown, so I haven't invested anymore time in it and have probably also deleted the code.

Arne

PS: this was some time ago, before the new update (around fall/winter, I dunno)

:: JOODE :: Xith3d :: OdeJava ::
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #5 - Posted 2005-06-03 15:40:20 »

I create two renderpeers, too...
Fortunately I don't need this code now.. But if somebody know how to do ( with the latest version ), he is welcome.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline cascade

Junior Devvie




Java games rock!


« Reply #6 - Posted 2005-06-09 09:20:49 »

I had the same error when using two canvases.

The latest JOGL version should work. At least I can render two canvases if I am using two completely separate universes/scenes.

Another issue in this domain is a problem that occurs when a single texture instance is used in both canvases. This caused in my case a severe memory leak with all its consequences.

Since the (old) textureLoader class identifies textures by their respective filename (thus you can't get two instances of the same texture) I used multiple TextureLoader instances to organize the textures according to the canvas they were used in.

If someone has a better idea to solve the problems in the "multiple canvas" domain please tell me/us.

Further, I would very much like to render the same scene using different views in different canvases. But I could not get it working so far.

Ca$

 
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #7 - Posted 2005-06-09 18:09:35 »

Well, I don't use textures in the test...
Just a coloured cube.
But it's the same geometry and the same shape that is shared.
And I NEED to render the same scene from two different points of view.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline arne

Senior Devvie




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


« Reply #8 - Posted 2005-06-09 19:44:33 »

Yep this way it get's nasty to make split screen games...

(it's about gamma, right? I read there something about splitscreen there, so... - In that case we'd better skip this problem and wait until there's a good fix for that)

:: JOODE :: Xith3d :: OdeJava ::
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #9 - Posted 2005-06-09 23:26:10 »

I'm confused.  Is there still a problem with this support in Xith3D?

Please submit an Issue on the bug if there is one.  If you make it nice and detailed, and provide a small test case the chances are it will be resolved sooner.

Will.

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

Junior Devvie




Java games rock!


« Reply #10 - Posted 2005-06-10 07:31:55 »

The problem as I experienced it is as follows (with latest jogl):

Same scene multiple views with respective canvas: VM crashes with error as above (although both frames are initially rendered)

One scene per view with respective canvas: Using a single texture instance in both scenes causes a huge memory leak (appears that texture gets reallocated per render call)

One scene per view with respective canvas and texture instances: Works fine for me.

Same scene multiple views in one canvas and switching between views: don't know, have not tried it.

Ca$
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #11 - Posted 2005-06-11 08:24:06 »

Yep this way it get's nasty to make split screen games...

(it's about gamma, right? I read there something about splitscreen there, so... - In that case we'd better skip this problem and wait until there's a good fix for that)
Yes it's about Gamma.
You're right, it's not important for now... But it's important for the future...
Is there another manner to do a split-screen game than with two canvases ?

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
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.

PocketCrafter7 (13 views)
2014-11-28 16:25:35

PocketCrafter7 (9 views)
2014-11-28 16:25:09

PocketCrafter7 (10 views)
2014-11-28 16:24:29

toopeicgaming1999 (76 views)
2014-11-26 15:22:04

toopeicgaming1999 (66 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (28 views)
2014-11-24 19:59:16
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!