JDK-6178323 : REGRRESSION: sun.awt.windows.WComponentPeer throws exception "couldn't create component peer"
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0u1
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-10-13
  • Updated: 2011-01-19
  • Resolved: 2004-10-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u1Fixed 6 b10Fixed
Related Reports
Duplicate :  
Relates :  
Description
Regression since 1.5.0_01 build02.
Found on WinXP, not seen on Solaris and Linux.

test case: /java/j2se-sqe/i18n/workspaces/i18n_tiger_ws/i18n/bundles/b08/gs15-b08.tar.gz
test procedure:
1. de-archive the test case.
2. go to i18n_tiger_ws/i18n/src/GS
3. sh run_gs.sh -jdk:$JAVA_HOME other-functional/awt/print/PrintTest.java
4. Click on "Plain" button to reproduce the problem.

----------System.err:(25/1663)----------^M
java.lang.InternalError: couldn't create component peer^M
        at sun.awt.windows.WComponentPeer.checkCreation(WComponentPeer.java:549)
^M
        at sun.awt.windows.WComponentPeer.<init>(WComponentPeer.java:529)^M
        at sun.awt.windows.WCanvasPeer.<init>(WCanvasPeer.java:35)^M
        at sun.awt.windows.WPanelPeer.<init>(WPanelPeer.java:54)^M
        at sun.awt.windows.WWindowPeer.<init>(WWindowPeer.java:79)^M
        at sun.awt.windows.WPrintDialogPeer.<init>(WPrintDialogPeer.java:23)^M
        at sun.awt.windows.WPageDialogPeer.<init>(WPageDialogPeer.java:13)^M
        at sun.awt.windows.WToolkit.createWPageDialog(WToolkit.java:445)^M
        at sun.awt.windows.WPageDialog.addNotify(WPageDialog.java:30)^M
        at java.awt.Dialog.conditionalShow(Dialog.java:441)^M
        at java.awt.Dialog.show(Dialog.java:506)^M
        at sun.awt.windows.WPrinterJob.pageDialog(WPrinterJob.java:355)^M
        at PrintTest$_PrintTest.actionPerformed(PrintTest.java:218)^M
        at java.awt.Button.processActionEvent(Button.java:388)^M
        at java.awt.Button.processEvent(Button.java:356)^M
        at java.awt.Component.dispatchEventImpl(Component.java:3955)^M
        at java.awt.Component.dispatchEvent(Component.java:3803)^M
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)^M
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:234)^M
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)^M
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
^M
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
^M
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)^M
STATUS:Failed.Applet thread threw exception: java.lang.InternalError: couldn't c
reate component peer^M
###@###.### 10/13/04 08:29 GMT

Comments
SUGGESTED FIX ------- WPrintDialogPeer.java ------- *** /tmp/sccs.NwayoQ Wed Oct 13 12:55:10 2004 --- WPrintDialogPeer.java Wed Oct 13 12:44:33 2004 *************** *** 27,32 **** --- 27,36 ---- this.parent = parent; } + // don't use checkCreation() from WComponentPeer to avoid hwnd check + protected void checkCreation() { + } + protected void disposeImpl() { WToolkit.targetDisposedPeer(target, this); } ###@###.### 10/13/04 08:58 GMT
13-10-2004

EVALUATION Since AWT print and page dialogs are native windows dialogs we should skip window creation check introduced with 5088782 for them. For now it is skipped only for file dialogs. ###@###.### 10/13/04 08:58 GMT
13-10-2004