Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (602)
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  
  Multi-window with JOGL  (Read 1172 times)
0 Members and 1 Guest are viewing this topic.
Offline dominic

Innocent Bystander




Java games rock!


« Posted 2004-03-08 06:02:44 »

Hi,

I'm trying to create a multiwindow application with JOGL. What I want to do is when the user clicks on an entity in the window, a new window will be created and shown containing the information of that entity.

I use the OpenGL selection mechanism to select the entity, and this works fine. When my program recognizes there is something selected, it will create a new frame, which contains a GLCanvas, and show it.

I have two problems when showing this frame:
1. If the original window is not occupying the whole screen, it will throw an exception when the new window is called. The exception message is as follow:

======================================

net.java.games.jogl.GLException: Error freeing OpenGL context
       at net.java.games.jogl.impl.windows.WindowsGLContext.free(WindowsGLConte
xt.java:151)
       at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.free(Window
sOnscreenGLContext.java:132)
       at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:203)
       at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
       at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
       at net.java.games.jogl.GLCanvas.paint(GLCanvas.java:89)
       at net.java.games.jogl.GLCanvas.update(GLCanvas.java:116)
       at sun.awt.RepaintArea.paint(RepaintArea.java:169)
       at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
       at java.awt.Component.dispatchEventImpl(Component.java:3699)
       at java.awt.Component.dispatchEvent(Component.java:3480)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
       at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

======================================

2. If the original window is maximized, the program will crash immediately after the second window is shown. The error message given: (a long one)

======================================

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6956B5EA
Function=[Unknown.]
Library=C:\WINDOWS\system32\nvoglnt.dll

NOTE: We are unable to locate the function name symbol for the error
     just occurred. Please refer to release documentation for possible
     reason and solutions.


Current Java thread:
       at net.java.games.jogl.impl.windows.WGL.SwapBuffers(Native Method)
       at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.swapBuffers
(WindowsOnscreenGLContext.java:139)
       - locked <030186F0> (a net.java.games.jogl.impl.windows.WindowsOnscreenG
LContext)
       at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:193)
       - locked <030186F0> (a net.java.games.jogl.impl.windows.WindowsOnscreenG
LContext)
       at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
       at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
       at net.java.games.jogl.GLCanvas.paint(GLCanvas.java:89)
       at net.java.games.jogl.GLCanvas.update(GLCanvas.java:116)
       at sun.awt.RepaintArea.paint(RepaintArea.java:169)
       at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
       at java.awt.Component.dispatchEventImpl(Component.java:3699)
       at java.awt.Component.dispatchEvent(Component.java:3480)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

       at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

Dynamic libraries:
0x00400000 - 0x00406000         C:\WINDOWS\system32\java.exe
0x77F50000 - 0x77FF7000         C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F46000         C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5D000         C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000         C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000         C:\WINDOWS\system32\MSVCRT.dll
0x6D340000 - 0x6D46A000         C:\Program Files\Java\j2re1.4.1_02\bin\client\jv
m.dll
0x77D40000 - 0x77DCC000         C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000         C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6C000         C:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763AC000         C:\WINDOWS\System32\IMM32.DLL
0x629C0000 - 0x629C8000         C:\WINDOWS\system32\LPK.DLL
0x72FA0000 - 0x72FFA000         C:\WINDOWS\system32\USP10.dll
0x6D1E0000 - 0x6D1E7000         C:\Program Files\Java\j2re1.4.1_02\bin\hpi.dll
0x6D310000 - 0x6D31E000         C:\Program Files\Java\j2re1.4.1_02\bin\verify.dl
l
0x6D220000 - 0x6D239000         C:\Program Files\Java\j2re1.4.1_02\bin\java.dll
0x6D330000 - 0x6D33D000         C:\Program Files\Java\j2re1.4.1_02\bin\zip.dll
0x27070000 - 0x27093000         C:\3Dt\tsWinHandle.dll
0x773D0000 - 0x77BC2000         C:\WINDOWS\system32\SHELL32.DLL
0x70A70000 - 0x70AD5000         C:\WINDOWS\system32\SHLWAPI.dll
0x71950000 - 0x71A34000         C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-C
ontrols_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
0x77340000 - 0x773CB000         C:\WINDOWS\system32\comctl32.dll
0x274C0000 - 0x274D2000         C:\3Dt\FileUtility.dll
0x771B0000 - 0x772D1000         C:\WINDOWS\system32\ole32.dll
0x274E0000 - 0x274EC000         C:\3Dt\Timer.dll
0x27500000 - 0x275DD000         C:\3Dt\TrueTypeFont.dll
0x5ED00000 - 0x5EDC6000         C:\WINDOWS\system32\OPENGL32.dll
0x68B20000 - 0x68B3E000         C:\WINDOWS\system32\GLU32.dll
0x73760000 - 0x737A4000         C:\WINDOWS\system32\DDRAW.dll
0x73BC0000 - 0x73BC6000         C:\WINDOWS\system32\DCIMAN32.dll
0x275E0000 - 0x27665000         C:\WINDOWS\system32\MSVCR70D.dll
0x27670000 - 0x27725000         C:\WINDOWS\system32\MSVCP70D.dll
0x2B710000 - 0x2B74F000         C:\3Dt\IBService.dll
0x40530000 - 0x4058D000         C:\WINDOWS\system32\gds32.dll
0x71AD0000 - 0x71AD8000         C:\WINDOWS\system32\WSOCK32.dll
0x71AB0000 - 0x71AC5000         C:\WINDOWS\system32\WS2_32.dll
0x71AA0000 - 0x71AA8000         C:\WINDOWS\system32\WS2HELP.dll
0x71B20000 - 0x71B31000         C:\WINDOWS\system32\MPR.dll
0x2B760000 - 0x2B76A000         C:\3Dt\SystemUtility.dll
0x2B780000 - 0x2B786000         C:\3Dt\TextureUtility.dll
0x7C000000 - 0x7C054000         C:\WINDOWS\system32\MSVCR70.dll
0x6D2E0000 - 0x6D2EE000         C:\Program Files\Java\j2re1.4.1_02\bin\net.dll
0x71A50000 - 0x71A8B000         C:\WINDOWS\System32\mswsock.dll
0x76F20000 - 0x76F45000         C:\WINDOWS\system32\DNSAPI.dll
0x76FB0000 - 0x76FB7000         C:\WINDOWS\System32\winrnr.dll
0x76F60000 - 0x76F8C000         C:\WINDOWS\system32\WLDAP32.dll
0x76FC0000 - 0x76FC5000         C:\WINDOWS\system32\rasadhlp.dll
0x71A90000 - 0x71A98000         C:\WINDOWS\System32\wshtcpip.dll
0x6D000000 - 0x6D105000         C:\Program Files\Java\j2re1.4.1_02\bin\awt.dll
0x73000000 - 0x73023000         C:\WINDOWS\system32\WINSPOOL.DRV
0x6D190000 - 0x6D1E0000         C:\Program Files\Java\j2re1.4.1_02\bin\fontmanag
er.dll
0x73940000 - 0x73A07000         C:\WINDOWS\system32\D3DIM700.DLL
0x74720000 - 0x74764000         C:\WINDOWS\System32\MSCTF.dll
0x2BE40000 - 0x2BE6B000         C:\WINDOWS\System32\msctfime.ime
0x6D240000 - 0x6D245000         C:\Program Files\Java\j2re1.4.1_02\bin\jawt.dll
0x2BE70000 - 0x2BEE6000         C:\Program Files\Java\j2re1.4.1_02\bin\jogl.dll
0x69500000 - 0x6986B000         C:\WINDOWS\system32\nvoglnt.dll
0x746F0000 - 0x74716000         C:\WINDOWS\System32\Msimtf.dll
0x76C90000 - 0x76CB2000         C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000         C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000         C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000         C:\WINDOWS\system32\PSAPI.DLL

Local Time = Mon Mar 08 16:46:18 2004
Elapsed Time = 13
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1_02-b06 mixed mode)
#
# An error report file has been saved as hs_err_pid200.log.
# Please refer to the file for further information.
#

======================================

So, is there any clue to correct this problem? I didn't get any problem with single window, and I never get any error message from glGetError(). I tried to use DebugGL class but failed, so I don't know which parts of my program is going wrong. Thanks in advance!

Regards,
Dominic
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.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (49 views)
2014-11-29 21:32:03

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

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

toopeicgaming1999 (31 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

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
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!