Conflict w/ JAI... HELP!

It’s a longshot, but here goes (any clues appreciated)…

My software uses a combination of JOGL and JAI (Java Advanced Imaging) to perform imaging operations.

JAI can run in two modes, hardware accelerated and pure software.
When hardware accelarated JAI runs after JOGL stuff, I get the crash below in certain circumstances. I assume it’s some type of hardware conflict, becuase when I run JAI in software mode (non-hardware accelarated) it runs fine, without crashing.

Any Ideas?

PS I am running on Windows.

Thanks,
Gil

Below is the output.

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x2793CCAD
Function=[Unknown.]
Library=E:\primordial\ooze\tools\windows\jai-1_1_2\lib\mlib_jai_mmx.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 com.sun.medialib.mlib.Image.ZoomTranslate_Fp(Native Method)
at com.sun.media.jai.mlib.MlibScaleBicubicOpImage.computeRect(MlibScaleBicubicOpImage.java:152)
at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1418)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:912)
at javax.media.jai.OpImage.getTile(OpImage.java:1139)
at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2356)
at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2310)
at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2538)
at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2559)
at com.primordialsoftware.ooze.algorithm.dissolvers.ThinPlateDissolver.dissolve(ThinPlateDissolver.java:102)
at com.primordialsoftware.ooze.algorithm.SimpleAlgorithm.render(SimpleAlgorithm.java:95)
at com.primordialsoftware.ooze.renderer.Renderer.render(Renderer.java:72)
at com.primordialsoftware.ooze.ui.actions.UpdatePreviewFrameAction$1.safeRun(UpdatePreviewFrameAction.java:63)
at com.primordialsoftware.ooze.util.error.SafeRunnable.run(SafeRunnable.java:25)
at com.primordialsoftware.ooze.ui.component.progress.TaskThread.run(TaskThread.java:36)

Dynamic libraries:
0x00400000 - 0x00406000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\bin\javaw.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
0x77D40000 - 0x77DC6000 C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x6D330000 - 0x6D45A000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\client\jvm.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\verify.dll
0x6D210000 - 0x6D229000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\java.dll
0x6D320000 - 0x6D32D000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\zip.dll
0x6D260000 - 0x6D27C000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\jdwp.dll
0x003F0000 - 0x003F5000 C:\Program Files\Java\j2re1.4.2\bin\dt_socket.dll
0x71AB0000 - 0x71AC5000 C:\WINDOWS\System32\ws2_32.dll
0x71AA0000 - 0x71AA8000 C:\WINDOWS\System32\WS2HELP.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
0x6D100000 - 0x6D123000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\cmm.dll
0x6D280000 - 0x6D29E000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\jpeg.dll
0x6D000000 - 0x6D0FB000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\awt.dll
0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV
0x76390000 - 0x763AC000 C:\WINDOWS\System32\IMM32.dll
0x771B0000 - 0x772D1000 C:\WINDOWS\system32\ole32.dll
0x5AD70000 - 0x5ADA4000 C:\WINDOWS\System32\uxtheme.dll
0x6D180000 - 0x6D1D0000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\fontmanager.dll
0x73760000 - 0x737A4000 C:\WINDOWS\System32\ddraw.dll
0x73BC0000 - 0x73BC6000 C:\WINDOWS\System32\DCIMAN32.dll
0x6D910000 - 0x6D981000 C:\WINDOWS\System32\D3DIM.DLL
0x23680000 - 0x23687000 C:\Program Files\Yahoo!\Messenger\idle.dll
0x6D130000 - 0x6D152000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\dcpr.dll
0x277F0000 - 0x27BDD000 E:\primordial\ooze\tools\windows\jai-1_1_2\lib\mlib_jai_mmx.dll
0x773D0000 - 0x77BC2000 C:\WINDOWS\system32\shell32.dll
0x63180000 - 0x631E5000 C:\WINDOWS\system32\SHLWAPI.dll
0x71950000 - 0x71A34000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
0x77340000 - 0x773CB000 C:\WINDOWS\system32\comctl32.dll
0x71C20000 - 0x71C6E000 C:\WINDOWS\System32\netapi32.dll
0x76670000 - 0x76757000 C:\WINDOWS\System32\SETUPAPI.dll
0x77120000 - 0x771AB000 C:\WINDOWS\system32\OLEAUT32.dll
0x76990000 - 0x769B4000 C:\WINDOWS\System32\ntshrui.dll
0x76B20000 - 0x76B35000 C:\WINDOWS\System32\ATL.DLL
0x75A70000 - 0x75B15000 C:\WINDOWS\system32\USERENV.dll
0x75F40000 - 0x75F5F000 C:\WINDOWS\system32\appHelp.dll
0x71B20000 - 0x71B31000 C:\WINDOWS\system32\MPR.dll
0x75F60000 - 0x75F66000 C:\WINDOWS\System32\drprov.dll
0x71C10000 - 0x71C1D000 C:\WINDOWS\System32\ntlanman.dll
0x71CD0000 - 0x71CE6000 C:\WINDOWS\System32\NETUI0.dll
0x71C90000 - 0x71CCC000 C:\WINDOWS\System32\NETUI1.dll
0x71C80000 - 0x71C86000 C:\WINDOWS\System32\NETRAP.dll
0x71BF0000 - 0x71C01000 C:\WINDOWS\System32\SAMLIB.dll
0x75F70000 - 0x75F79000 C:\WINDOWS\System32\davclnt.dll
0x6D230000 - 0x6D235000 E:\primordial\ooze\tools\windows\j2sdk1.4.1_01\jre\bin\jawt.dll
0x27D40000 - 0x27DB7000 C:\JOGL\jogl-win32\jogl.dll
0x5ED00000 - 0x5EDC6000 C:\WINDOWS\System32\OPENGL32.dll
0x68B20000 - 0x68B3E000 C:\WINDOWS\System32\GLU32.dll
0x69500000 - 0x698AC000 C:\WINDOWS\System32\nvoglnt.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 = Thu Sep 18 11:18:17 2003
Elapsed Time = 53

The exception above was detected in native code outside the VM

Java VM: Java HotSpot™ Client VM (1.4.1_01-b01 mixed mode)

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

Please refer to the file for further information.

I wasn’t aware of hardware acceleration in JAI. Does it actually use DirectX? The stack trace you included shows a routine with ‘MMX’ in the name… that to me indicates that it is just native machine code acceleration and isn’t using the graphics hardware, at least in this case. In general “hardware” acceleration isn’t going to be useful for image processing because it is so slow to read back the data from the graphics card… it would be useful for rendering to the screen only. For that reason I suspect the acceleration in JAI is only tune machine code loops that make use of SIMD instructions like MMX, SSE/SSE2.

It looks like a normal user-mode software fault. A bad pointer in the MMX routines included with the accelerate version of JAI. If you try the same operation without doing any JOGL stuff at all does it still crash?