Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4329100

Applications hang when switching screen modes on Win32

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.1
    • 1.4.0
    • client-libs
    • None
    • ladybird
    • x86
    • windows_nt

        This bug is consistently reproducible on win32:
        - run SwingMark
        - make a DOS box active
        - hit Alt-Enter (causing the DOS box to go to fullscreen mode)
        - hit Alt-Enter again (causing the DOS box to return to windowed mode)
        Do this until you notice that the app fails to repaint.
        If you do a stack trace, you'll see that the Awt-Windows thread is hung in
        Window.resetGC(). The Awt-EventQueue thread is usually hung in
        GlobalCursorManager.findHeavyweightUnderCursor(), but I've seen it hung
        in other places as well.


        ck.prasad@eng 2001-02-06

        Customer Problem Description:

        I've created a Java application that consists of a single class called MyClass. MyClass extends javax.swing.JFrame and has about 10 JLabels that it cycles through to create an animation. My application runs just fine on Windows 2000. If, however, you right click on the Windows Desktop and change the Display Settings while the application is running, it will freeze. Any time a java application is painting while the Display Settings are being changed, it will freeze. If you can't reproduce the bug the first time, try again. Remember, the application must be painting while the display settings are being changed. Please take a few minutes to run the code that I've included in my "TEST CASE". You will need to provide a few ".jpg" files of your own. I would greatly appreciate anything you could do to fix the problem in the Virtual Machine. Our software natively changes the Display Settings a number of times during execution, and as a result, freezes frequently.

        Stack trace when the app hangs:
        I reproduced the bug on my machine, and forced a call stack dump. Here
        are the results:

        "Thread-1" prio=5 tid=0x234618 nid=0x600 waiting on monitor [0..0x6fb38]

        "TimerQueue" daemon prio=5 tid=0x89ccf78 nid=0x5fc runnable
        [0xd8cf000..0xd8cfdc4]
                at java.lang.Object.wait(Native Method)
                at javax.swing.TimerQueue.postExpiredTimers(TimerQueue.java:215)

                at javax.swing.TimerQueue.run(TimerQueue.java:230)
                at java.lang.Thread.run(Thread.java:484)

        "AWT-Windows" prio=5 tid=0x825928 nid=0x5d0 runnable
        [0xd55f000..0xd55fdc4]
                at java.awt.Window.resetGC(Window.java:1167)
                at sun.awt.Win32GraphicsDevice.resetComponentGC(Native Method)
                at
        sun.awt.Win32GraphicsDevice.invalidateGCs(Win32GraphicsDevice.java:173)
                at
        sun.awt.Win32GraphicsDevice.displayModeChanged(Win32GraphicsDevice.java:148)

                at sun.awt.windows.WToolkit.displayChange(WToolkit.java:640)
                at sun.awt.windows.WToolkit.eventLoop(Native Method)
                at sun.awt.windows.WToolkit.run(WToolkit.java:186)
                at java.lang.Thread.run(Thread.java:484)

        "SunToolkit.PostEventQueue-0" prio=5 tid=0x89bcec8 nid=0x5e0 waiting on
        monitor[0xd51f000..0xd51fdc4]
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at sun.awt.PostEventQueue.run(SunToolkit.java:496)

        "AWT-EventQueue-0" prio=7 tid=0x89bc530 nid=0x5dc runnable
        [0xd4df000..0xd4dfdc4]
                at
        sun.awt.windows.WGlobalCursorManager.findHeavyweightUnderCursor(Native
        Method)
                at
        sun.awt.GlobalCursorManager._updateCursor(GlobalCursorManager.java:182)
                at
        sun.awt.GlobalCursorManager.updateCursorImmediately(GlobalCursorManager.java:91)

                at java.awt.Component.show(Component.java:923)
                at java.awt.Component.show(Component.java:946)
                at java.awt.Component.setVisible(Component.java:903)
                at javax.swing.JComponent.setVisible(JComponent.java:1885)
                at org.waterford.sm.MyClass.actionPerformed(MyClass.java:54)
                at javax.swing.Timer.fireActionPerformed(Timer.java:150)
                at javax.swing.Timer$DoPostEvent.run(Timer.java:108)
                at
        java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
                at java.awt.EventQueue.dispatchEvent(EventQueue.java:317)
                at
        java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
                at
        java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
                at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)

        "Signal Dispatcher" daemon prio=10 tid=0x7ebdf0 nid=0x5d8 waiting on
        monitor [0..0]

        "Finalizer" daemon prio=9 tid=0x7e9d90 nid=0x5f4 waiting on monitor
        [0x8c4f000..0x8c4fdc4]
                at java.lang.Object.wait(Native Method)
                at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
                at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
                at
        java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)

        "Reference Handler" daemon prio=10 tid=0x848d68 nid=0x5e4 waiting on
        monitor [0x8c0f000..0x8c0fdc4]
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at
        java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)

        "VM Thread" prio=5 tid=0x7e8978 nid=0x11c runnable

        "VM Periodic Task Thread" prio=10 tid=0x7eb508 nid=0x5d4 waiting on
        monitor

              dmikhalksunw Denis Mikhalkin (Inactive)
              chaasesunw Chet Haase (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: