This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | NPE from sun.awt.windows.WComponentPeer.nativeHandleEvent on JDK 1.5 | ||
---|---|---|---|
Product: | platform | Reporter: | snelson <snelson> |
Component: | Text | Assignee: | mslama <mslama> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | sustaining |
Priority: | P2 | Keywords: | JDK_SPECIFIC |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
snelson
2008-04-17 11:53:57 UTC
Please could you attach test module (or send it to me) to reproduce issue? I filed #6704417 against JDK/AWT for NPE on Windows when opening PageSetup dialog. It happens on JDK 5.0u15 (latest released update). In any case it is JDK issue both on Linux/Windows. Closing as WONTFIX. I will update status of issue on Windows. *** Issue 135592 has been marked as a duplicate of this issue. *** I found 32 duplicates: http://statistics.netbeans.org/exceptions/detail.do?id=13423 This excetpion is too confusing for our users. We had to patch platform: o.n.core/src/org/netbeans/core/NotifyExcPanel.java static void notify ( final NbErrorManager.Exc t ) ... // error in jdk during printing if ("java.lang.NullPointerException".equals(t.getClassName())) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); if (sw.toString().contains("sun.awt.windows.WComponentPeer.nativeHandleEvent")) { t.printStackTrace(System.err); return; } } ... The patch is safe. Printing works correctly. Jarda is this patch ok? As it can happen any time even when there is no our code in call stack there is no better way. I added check for JDK version and exception dialog is not shown on JDK 5 only. As said above it does not happen on JDK 6. core-main #bb9e27ad5280 Because of special exception handling in java.awt.EventDispatchThread.pumpOneEventForHierarchy code is not interrupted. It has no visible effect on functionality. It happens when native printing or page setup dialog is displayed. There is no progress in JDK to fix this. There is generated event and NPE is thrown during its processing. Our code is on call stack because modal dialog is displayed. Fix summary Integrated into 'main-golden', will be available in build *200901070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/bb9e27ad5280 User: Marek Slama <mslama@netbeans.org> Log: #133092: Do not show exception dialog when NPE from WComponentPeer.nativeHandleEvent is thrown on JDK 5. snelson, could verify if the patch (or trunk) works for you? I checked the code - in any way it seems safe -> verified from snelson's email: Hello, Works as advertised.. Thank you, The fix has been ported into the release65_fixes repository. http://hg.netbeans.org/release65_fixes/rev/1483a5591936 |