WIN32OOSD Internal Error.

I migrated to 1.5.0_05 from 1.4.2 on a Windows Xp.Sometime in my application I get a recursive error : "WIN32OSSD can't nest locks" and the application hangs.Could someone suggest the reason and/or a workaround?TksTullio
[256 byte] By [tullio0106a] at [2007-10-3 3:48:15]
# 1
We're not mind readers. What *exactly* is your code trying to do when this error occurs?
bckrispia at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 2
I would suggest not downgrading your application. Since concurrent locking etc was introduced in Java 1.5 I think your application sounds like it is 1.5 dependent.
cotton.ma at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 3

> I would suggest not downgrading your application.

> Since concurrent locking etc was introduced in Java

> 1.5 I think your application sounds like it is 1.5

> dependent.

Whoops. You upgraded not downgraded.

It would be helpful to know as the last poster said what code is casuing your this error.

cotton.ma at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 4

The problem come randomly and then I don't know what it does when the problem comes out.

The only thing I know is that, when it happens, it loops until I kill the program.

The full stack trace is :

java.lang.InternalError: Win32OSSD_Lock cannot nest locks

at sun.java2d.loops.DrawGlyphList.DrawGlyphList(Native Method)

at sun.java2d.pipe.SolidTextRenderer.drawGlyphList(SolidTextRenderer.java:36)

at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:53)

at sun.java2d.pipe.ValidatePipe.drawString(ValidatePipe.java:147)

at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2642)

at com.sun.java.swing.SwingUtilities2.drawString(SwingUtilities2.java:421)

at com.sun.java.swing.SwingUtilities2.drawStringUnderlineCharAt(SwingUtilities2.java:439)

at com.sun.java.swing.plaf.windows.WindowsLabelUI.paintEnabledText(WindowsLabelUI.java:54)

at javax.swing.plaf.basic.BasicLabelUI.paint(BasicLabelUI.java:172)

at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)

at javax.swing.JComponent.paintComponent(JComponent.java:742)

at javax.swing.JComponent.paint(JComponent.java:1005)

at javax.swing.JComponent.paintChildren(JComponent.java:842)

at javax.swing.JComponent.paint(JComponent.java:1014)

at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)

at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)

at javax.swing.JComponent._paintImmediately(JComponent.java:4859)

at javax.swing.JComponent.paintImmediately(JComponent.java:4666)

at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)

at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)

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

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

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

tullio0106a at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 5
This looks like a bug.
cotton.ma at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 6
Shoud I do something in order to inform Sun ?TksTullio
tullio0106a at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 7
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4599654Although why you should get it on 1.5 and not 1.4 is bothersome. But something to do with double buffering it looks like.
cotton.ma at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 8
> Shoud I do something in order to inform Sun ?> Tks> TullioNo. You should see if you can workaround using the advice given in the bug report.
cotton.ma at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 9

You have had this bug for quite some time it appears http://forums.oracle.com/forums/thread.jspa?threadID=363539

I think by perusing other threads on this subject that you should post your code. It looks like while there is a bug in 2d something that it only manifests itself when people try and get cute with code overriding paint of JComponent or the like.

Probably your problem is solvable by fixing your own code.

cotton.ma at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 10

I was the same man who wrote that thread in Oracle forum because I suspected it was related to debugger.

After that I discovered the debbuger was not implied (it happens also when I don't debug).

In my code I don't do anything special with graphics nor use buffering and then I don't know how I can try to solve it.

Could You suggest any test I can do ?

Tks

Tullio

tullio0106a at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 11
Well you're doing something because not everyone has this problem!It really is time to consider posting formatted relevent code that can recreate the problem.
cotton.ma at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 12
I've no specific graphic cade at all.I only use many Jide components , but I don't have any source code for them.Tks.Tullio
tullio0106a at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...
# 13

> It really is time to consider posting formatted relevent code that can recreate the problem.

I have a similar problem (java.lang.InternalError: Win32OSSD_Lock cannot nest locks) and I have been trying to nail this problem down for weeks now. If I could understand exactly what code it is that creates this problem I could fix it myself!

I have been developing programs for 30 years now and been involved with java since it came. If I could get this wonderful "some formatted relevant code" it would be easy for me to fix the problem or work around it.

But the problem is 100% sporadic and the only common feature of the occurence of the problem is that it occurs! If I at least knew that when I did that and then that etc with my program - then the problem would occur I would have something to go on.

However, there is no common behaviour - that is running my program in any particular order - that creates this sporadic error.

I can sometimes run my program 4-5 times without problems and then suddenly - me doing exactly the same things - the error occurs - out of the blue which is of course extremely irritating.

I have been able to find out that the error SPORADICALLY occurs when doing a drawString() for instance. I can catch some of these sporadic exceptions this way:

try {

g2.drawString(attrItr, upperX , upperY );

} catch (InternalError ier) { // Bug hunting!

// Here is my code for reporting the problem - code left out

}

-

> Shoud I do something in order to inform Sun ?

> Tks

> Tullio

No. You should see if you can workaround using the advice given in the bug report.

There is no workaround advice given in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4599654

It says N/A!!

-

So it is time to ask some relevant questions:

1) Does anyone know if this is a java bug (only)?

2) If it is such a bug, does anyone know if it has been fixed in anything later than what I use 1.5.0_6?

3) If it is not a bug but caused by some incorrect way of using java code does anyone know what that incorrect usage is? I am certainly not without faults so perhaps I and others that get this error is doing something wrong? But what then?

By the way, here is a sample error readout:

Exception occurred during event dispatching:

java.lang.InternalError: Win32OSSD_Lock cannot nest locks

at sun.java2d.loops.DrawGlyphList.DrawGlyphList(Native Method)

at sun.java2d.pipe.SolidTextRenderer.drawGlyphList(SolidTextRenderer.java:36)

at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:53)

at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2642)

at com.sun.java.swing.SwingUtilities2.drawString(SwingUtilities2.java:421)

at com.sun.java.swing.SwingUtilities2.drawStringUnderlineCharAt(SwingUtilities2.java:439)

at javax.swing.plaf.metal.MetalButtonUI.paintText(MetalButtonUI.java:179)

at javax.swing.plaf.basic.BasicButtonUI.paintText(BasicButtonUI.java:312)

at javax.swing.plaf.basic.BasicButtonUI.paint(BasicButtonUI.java:218)

at javax.swing.plaf.metal.MetalButtonUI.update(MetalButtonUI.java:114)

at javax.swing.JComponent.paintComponent(JComponent.java:742)

at javax.swing.JComponent.paint(JComponent.java:1005)

at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)

at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)

at javax.swing.JComponent._paintImmediately(JComponent.java:4859)

at javax.swing.JComponent.paintImmediately(JComponent.java:4666)

at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)

at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:154)

at java.awt.Dialog$1.run(Dialog.java:513)

at java.awt.Dialog.show(Dialog.java:536)

at java.awt.Component.show(Component.java:1300)

at java.awt.Component.setVisible(Component.java:1253)

at mm.main.MusicalMediatorDialog.setVisible(MusicalMediatorDialog.java:178)

at mm.utilities.MidiUtilities.selectAnInstrumentFor(MidiUtilities.java:514)

at mm.editors.editing.shapes.InstrumentSelectionEditingShape.selectAnInstrument(InstrumentSelectionEditingShape.java:201)

at mm.editors.editing.shapes.InstrumentSelectionEditingShape.handleMousePressOrReleaseEvent(InstrumentSelectionEditingShape.java:257)

at mm.editors.editing.shapes.DataEditingShape.mousePressOrReleaseEventPassedOnEvent(DataEditingShape.java:179)

at mm.editors.editing.InsideMidiTrackDataEditing.mousePressOrReleaseEvent(InsideMidiTrackDataEditing.java:173)

at mm.main.eventsets.MusicalMouseAndKeyInputSource.fireMousePressedOrReleasedEvent(MusicalMouseAndKeyInputSource.java:53)

at mm.main.eventsets.util.ShapePanelMouseAndKeyInputSource.mouseReleased(ShapePanelMouseAndKeyInputSource.java:190)

at java.awt.Component.processMouseEvent(Component.java:5488)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)

at java.awt.Component.processEvent(Component.java:5253)

at java.awt.Container.processEvent(Container.java:1966)

at java.awt.Component.dispatchEventImpl(Component.java:3955)

at java.awt.Container.dispatchEventImpl(Container.java:2024)

at java.awt.Component.dispatchEvent(Component.java:3803)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)

at java.awt.Container.dispatchEventImpl(Container.java:2010)

at java.awt.Window.dispatchEventImpl(Window.java:1774)

at java.awt.Component.dispatchEvent(Component.java:3803)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)

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

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

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

Javauser5a at 2007-7-14 21:45:16 > top of Java-index,Java Essentials,Java Programming...