Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEPTION_ACCESS_VIOLATION (GDI32.DLL)

Status
Not open for further replies.

abc73

Programmer
Apr 28, 2004
89
US
Hi,
Can someone please help me what exactly and where it might be a problem. Thanks

Code:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x77D4E167
Function=GetEnhMetaFileHeader+0x30F
Library=C:\WINNT\system32\GDI32.DLL 

Current Java thread:
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:262)
at java.lang.Thread.run(Thread.java:534)

...
.......
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Server VM (1.4.2_03-b02 mixed mode)

Thanks
 
That has few to do with Java.

It seems that you're using some native code through a dll (I don't know if GI32.DLL is a system library or you put it in that directory).

That native code is trying to access a memory space that hasn't been reserved by it.

Cheers.

Dian
 
GDI32 is a system library. Actually I am trying to print some Images i.e. can upto 1000 pages. No problem on Desktop but If running on server gives this exception. Any ideas.

Thanks
 
I don't know what kind of library is it, but I'd check if the versions of that library are compatible with your code, in case you're using them directly or with the products you use.

Cheers.

Dian
 
The stack dump starts with a native method invoked within some internal JRE code from sun :

sun.awt.windows.WToolkit.eventLoop(Native Method)

eventLoop() is a native method, which I expect calls the GDI interface - in this case to look up some native windowing event queue I would imagine. So for some reason Sun's shared object/DLL native code is barfing when interacing with the OS via the GDI lib.

Now why that is happening, I'm not sure, but that is what is happening !

--------------------------------------------------
Free Database Connection Pooling Software
 
the GDI32 versions are different on my Desktop and server. I have the latest GDI32 but on the server it's old. Can it be a problem. I found out that Microsoft upgraded GDI32 six months ago.

Thanks
 
I think there's a bug related to this, I'd google it to find out more.

Cheers.

Dian
 
If your code uses a method in GDI32 that wasn't in the older version, then you'll get this error.

In the MSDN help, look at the bottom of the entry for each method you'll see a section called "Requirements", which should tell you at what version of Windows the function became available. A good example is the EnumDisplayMonitors, which has this requirements block:
MSDN said:
Windows NT/2000/XP: Included in Windows 2000 and later.
Windows 95/98/Me: Included in Windows 98 and later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
Which tells you that this method is not available on Win95 or WinNT, since it first appeared in Win98 and Win2k.

So, check all the methods that you're calling against this info.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Chip,
The problem is that the GDI method will be invoked from a Sun written native method in one of Sun's shipped supporting DLLS, which is then called by the offending Java native method eventLoop() in this class : sun.awt.windows.WToolkit

So its hard to tell, as Sun does not provide the src for this class.

--------------------------------------------------
Free Database Connection Pooling Software
 
Ahh, I missed that. Yup, if it's Sun making this call, there's not a lot you can do about it.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
any idea of how to fix this. Or is it really GDI32.dll problem. Thanks for any updates.
 
I think you should contact Sun or Microsoft - its their code thats barfing ...

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top