Uncontrolled flicker

With your newest jar and -DATI_WORKAROUND=false I appear to be running fine whenever I manage to start up. The Animator starts up and keyboard inputs are accepted.

50% of the time, however, I now throw that exception outside of the VM.

Unfortunately, this is the last test I can do on this today.

Here’s the complete report on the exception I get outside the VM. This only happens when I use -DATI_WORKAROUND=false. If I don’t use that parameter, the app freezes on the first frame. When I do use the parameter, it’s a crap shoot as to whether or not the app is going to start up.

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x6902FD5E
Function=glPushClientAttrib+0x11AE
Library=C:\WINDOWS\SYSTEM32\atioglaa.dll

Current Java thread:
at net.java.games.jogl.impl.windows.WindowsGLImpl.dispatch_wglChoosePixelFormatARB(Native Method)
at net.java.games.jogl.impl.windows.WindowsGLImpl.wglChoosePixelFormatARB(WindowsGLImpl.java:33092)
at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:354)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:211)
at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:133)
- locked <0x10525d28> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
- locked <0x10525d28> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
- locked <0x10525d28> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:208)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
at net.java.games.jogl.Animator$1.run(Animator.java:107)
at java.lang.Thread.run(Unknown Source)

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 - 0x78087000 C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08138000 C:\Program Files\Java\j2re1.4.2_04\bin\client\jvm.dll
0x77D40000 - 0x77DCC000 C:\WINDOWS\system32\USER32.dll
0x7E090000 - 0x7E0D1000 C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\SYSTEM32\WINMM.dll
0x10000000 - 0x10007000 C:\Program Files\Java\j2re1.4.2_04\bin\hpi.dll
0x00390000 - 0x0039E000 C:\Program Files\Java\j2re1.4.2_04\bin\verify.dll
0x003A0000 - 0x003B9000 C:\Program Files\Java\j2re1.4.2_04\bin\java.dll
0x003C0000 - 0x003CD000 C:\Program Files\Java\j2re1.4.2_04\bin\zip.dll
0x02C60000 - 0x02D6F000 C:\Program Files\Java\j2re1.4.2_04\bin\awt.dll
0x73000000 - 0x73023000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
0x76390000 - 0x763AC000 C:\WINDOWS\SYSTEM32\IMM32.dll
0x771B0000 - 0x772D4000 C:\WINDOWS\system32\ole32.dll
0x5AD70000 - 0x5ADA4000 C:\WINDOWS\SYSTEM32\uxtheme.dll
0x02DD0000 - 0x02E20000 C:\Program Files\Java\j2re1.4.2_04\bin\fontmanager.dll
0x51000000 - 0x5104D000 C:\WINDOWS\SYSTEM32\ddraw.dll
0x73BC0000 - 0x73BC6000 C:\WINDOWS\SYSTEM32\DCIMAN32.dll
0x5C000000 - 0x5C0C8000 C:\WINDOWS\SYSTEM32\D3DIM700.DLL
0x040B0000 - 0x040C0000 C:\PROGRA~1\PANICW~1\POP-UP~1\DPHOOK32.DLL
0x040D0000 - 0x040DB000 C:\WINDOWS\PANICNT.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\SYSTEM32\PSAPI.DLL
0x040F0000 - 0x040F5000 C:\Program Files\Java\j2re1.4.2_04\bin\jawt.dll
0x666C0000 - 0x6676D000 C:\Program Files\Java\j2re1.4.2_04\lib\ext\jogl.dll
0x5ED00000 - 0x5EDC6000 C:\WINDOWS\SYSTEM32\OPENGL32.DLL
0x68B20000 - 0x68B3E000 C:\WINDOWS\SYSTEM32\GLU32.dll
0x69000000 - 0x69125000 C:\WINDOWS\SYSTEM32\atioglaa.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll

Heap at VM Abort:
Heap
def new generation total 576K, used 77K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 2% used [0x10010000, 0x10013678, 0x10090000)
from space 64K, 100% used [0x10090000, 0x100a0000, 0x100a0000)
to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
tenured generation total 1408K, used 894K [0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 63% used [0x104f0000, 0x105cf9d8, 0x105cfa00, 0x10650000)
compacting perm gen total 4608K, used 4550K [0x14010000, 0x14490000, 0x18010000)
the space 4608K, 98% used [0x14010000, 0x14481810, 0x14481a00, 0x14490000)

Local Time = Tue Jul 13 08:00:39 2004
Elapsed Time = 1

The exception above was detected in native code outside the VM

Java VM: Java HotSpot™ Client VM (1.4.2_04-b05 mixed mode)

An error report file has been saved as hs_err_pid1908.log.

Please refer to the file for further information.

So sometimes you get the wglChoosePixelFormat path and sometimes you get the ChoosePixelFormat path. Wonderfu.

Something like that, yes. Take a look at these two log files. Bad.txt shows the exception. Good.txt shows that at the logging point where Bad failed it seems the tests are being performed a second time. Is this expected?

Yeah that is the zombie context being created so it goes through the creating sequence twice. Unfortunately I don’t htink we can guarentee that the zombie context will be created before any other contexts are created which is why you sometimes get the windows path and sometimes the ARB path. I just uploaded a new jar so give that one a try, it will force the zombie context to be created first. It may bring back the old link error though.

Crash and burn… with and without ATI_WORKAROUND

C:\Development\Projects\jogl\nehe\lesson07>java -DATI_WORKAROUND=false Lesson07
GL_ARB_multitexture GL_ARB_texture_border_clamp GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_window_pos GL_ATI_texture_mirror_once
GL_ATI_vertex_streams GL_ATIX_vertex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_draw_range_ele
ments GL_EXT_fog_coord GL_EXT_packed_pixels GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_stencil_wrap GL_EXT_texgen_reflec
tion GL_EXT_texture_env_add GL_EXT_texture3D GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_object GL_EXT_vertex_array GL_KTX_buffer_region
GL_NV_texgen_reflection GL_SGI_texture_edge_clamp GL_SGIS_texture_border_clamp GL_SGIS_texture_lod GL_SGIS_multitexture GL_WIN_swap_hint WGL_EXT_extensions_str
ing WGL_EXT_swap_control WGL_ARB_make_current_read WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_EXT_swap_control
null
DummyGL is not null
haveWGLChoosePixelFormatARB is true
wglChoosePixelFormat
Current DC: 0
Current RC: 0
net.java.games.jogl.GLException: Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB: 0
at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:399)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:211)
at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:133)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:208)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
at net.java.games.jogl.Animator$1.run(Animator.java:107)
at java.lang.Thread.run(Unknown Source)

Try this new one, it should have a current rendering context when it trys to use wglChoosePixelFormatARB so hopefully it won’t puke.

Marvelous! I’ve tested this about 40 times and it’s run perfectly except for one, where I may have forgotten to pass in ATI_WORKAROUND. This card depends on that flag. I’ve tried both fullscreen and windowed – both work flawlessly.

Sorry for the late reply, I was trapped in a 2-hour meeting.

Before anything’s commited to source, let me test this out on my Radeon 9600 this evening. I can also try it on a GeForce-2 MX400 and GeForce-2 GO. It’d also be good to know if daymark and others also have success with it.

Sorry for not being able to test sooner. I’m getting this every time I run Gears:

CANVAS GL IS: net.java.games.jogl.impl.windows.WindowsGLImpl
CANVAS GLU IS: net.java.games.jogl.impl.GLUImpl
GL_ARB_multitexture GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_
ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_ARB_transpose_matrix GL_EXT_abgr GL_EXT_bgra G
L_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compile
d_vertex_array GL_EXT_cull_vertex GL_EXT_fog_coord GL_EXT_packed_pixels GL_EXT_packed_pixels_12 GL_EXT_rescale_normal GL_EXT_
secondary_color GL_EXT_separate_specular_color GL_EXT_stencil_wrap GL_EXT_texture_compression_s3tc GL_EXT_texture_env_add GL_
EXT_texture_env_combine GL_EXT_texture_filter_anisotropic GL_3DFX_texture_compression_FXT1 GL_IBM_texture_mirrored_repeat GL_
NV_texgen_reflection GL_WIN_swap_hint

WGL_ARB_extensions_string WGL_ARB_pixel_format WGL_ARB_pbuffer WGL_ARB_make_current_read WGL_EXT_swap_control WGL_ARB_buffer_
region
DummyGL is not null
WGLC Current
haveWGLChoosePixelFormatARB is true
wglChoosePixelFormat
Current DC: 1711346055
Current RC: 131072
wglChoosePixelFormatARB == true
net.java.games.jogl.GLException: Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB: 0
at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:422)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:211)
at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:133)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:208)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
at net.java.games.jogl.Animator$1.run(Animator.java:107)
at java.lang.Thread.run(Thread.java:534)

Atleast I got one of the two oof you. I am out of town for the next couple days so I won’t be able to look at this again until Friday. Maybe I need a different RC.

I still have the problem on Intel 82852/82855 GM/GME.


GL_ARB_multitexture GL_ARB_point_parameters GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_ARB_transpose_matrix GL_ARB_vertex_program GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_cull_vertex GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_stencil_wrap GL_EXT_texture_compression_s3tc GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_lod_bias GL_EXT_texture_filter_anisotropic GL_3DFX_texture_compression_FXT1 GL_IBM_texture_mirrored_repeat GL_NV_blend_square GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_WIN_swap_hint 
WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_pixel_format WGL_ARB_pbuffer WGL_EXT_extensions_string WGL_EXT_swap_control 
WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_pixel_format WGL_ARB_pbuffer WGL_EXT_extensions_string WGL_EXT_swap_control 
DummyGL is not null
WGLC Current
haveWGLChoosePixelFormatARB is true
wglChoosePixelFormat
Current DC: 201395163
Current RC: 131072
wglChoosePixelFormatARB == true
net.java.games.jogl.GLException: Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB: 0
      at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:422)
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:211)
      at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:133)
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
      at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
      at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:112)
      at java.awt.Component.setBounds(Unknown Source)
      at java.awt.BorderLayout.layoutContainer(Unknown Source)
      at java.awt.Container.layout(Unknown Source)
      at java.awt.Container.doLayout(Unknown Source)
      at java.awt.Container.validateTree(Unknown Source)
      at java.awt.Container.validateTree(Unknown Source)
      at java.awt.Container.validateTree(Unknown Source)
      at java.awt.Container.validateTree(Unknown Source)
      at java.awt.Container.validate(Unknown Source)
      at java.awt.Window.show(Unknown Source)
      at java.awt.Component.show(Unknown Source)
      at java.awt.Component.setVisible(Unknown Source)
      at com.giddyplanet.gameengine.TestGame.<init>(TestGame.java:62)
      at com.giddyplanet.gameengine.TestGame.main(TestGame.java:173)

Looks like we are down to Intel. I have an idea I want to try so hopefully I will have time on friday.

I’ve had great success on my laptop’s ATI Radeon Mobility 9600, with and without the ATI_WORKAROUND flag. I haven’t had time to try the nVidia cards yet.

I had another go installing the latest Intel display driver. I tried this a week or so ago and it went unstable and I had to restore, so fingers crossed…

Original Dell-provided driver:
GL_VENDOR: Intel
GL_RENDERER: Intel Montara-GM
GL_VERSION: 1.3.0 - Build 4.14.10.3701

New Intel driver:
GL_VENDOR: Intel
GL_RENDERER: Intel 855GM
GL_VERSION: 1.3.0 - Build 4.14.10.3865

Machine spec:
Model: Dell Inspiron 510m laptop, 1.4GHz Pentium M, 512MB
OS: XP-Pro SP1.
Graphics adapter: Intel 82852/82855 GM/GME, 64MB
Graphics driver: Intel Corporation 6.14.10.3865

Its looking good, both with GKW’s 2004-July-13 dev version of jogl and with 1.1b04 released 2004-July-16.

Results testing Gears demo:
GKW’s jogl mods have corrected the problem of the generic Microsoft GDI renderer being selected instead of the Intel renderer, thus fixing the flicker problem. Well done GKW! :smiley:
Upgrading the driver seems to have cured the occasional exception thrown on startup. :smiley:

Also tested an nvidia geforce 256 DDR (latest nvidia driver 56.72 2004-Apr-01) which also works fine, as it always did.

One question though: the framerate on the nvidia is fixed at the refresh rate of the display (70Hz) whereas the Intel’s framerate varies depending on window size. Is there a way to set which mode is used?

Cheers
David

Cool. It is unfortunate that the ATI driver wants a current context to use wglChoosePixelFormat but that seems to be the case, at least for the 128 my M7 seems to work just fine with the old code. I am going to clean up my code a bit but hopefully this will resolve most of the context creating problems. Thanks for the help.

Yeah, it seems to be the 128 that needs that. My Radeon didn’t have a problem with the earlier betas.

I haven’t had a chance to test on my GeForce cards yet. I’ll try to get that done tonight.

I am sorry to say this, but even though the new JOGL seems to run most of the time, it still fails to setup the pixel formats some times. :frowning:


net.java.games.jogl.GLException: Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB
      at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:391)
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:211)
      at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:133)
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
      at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
      at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:208)
      at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
      at net.java.games.jogl.Animator$1.run(Animator.java:107)
      at java.lang.Thread.run(Unknown Source)

Giddy, is this on your Intel 82852/82855 GM/GME?

What’s the driver version?

I was getting occasional exceptions on startup until I upgraded to latest driver (6.14.10.3865).

Daymark, yes it was with my Intel board.

I have upgraded the drivers, and that seems to have fixed the problem.

Thanks