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.
Created attachment 128841 [details] only one Attachment possible ? On task-Restart of my user-Task with the Debugger in netbeans a nullpointer-exception happens. The debugger doesn't stop, even though I have set the Stop-Flag for uncaught exceptions. This fault happens with netbeans 7.2 and 7.2.1 and 7.3 beta 2 the user-task ends with exit Result: 2 what means Result 2 ? java.lang.NullPointerException at org.openide.util.lookup.MetaInfServicesLookup.clazzToString(MetaInfServicesLookup.java:377) at org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfServicesLookup.java:334) at org.openide.util.lookup.MetaInfServicesLookup.beforeLookup(MetaInfServicesLookup.java:147) at org.openide.util.lookup.AbstractLookup.lookupItem(AbstractLookup.java:427) at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:421) at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:223) at org.netbeans.core.GuiRunLevel.run(GuiRunLevel.java:110) at org.netbeans.core.startup.Main.start(Main.java:315) at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123) at java.lang.Thread.run(Thread.java:722) What can be done?
Do you have "Stop on uncaught exceptions" general setting turned on? Tools > Options > Java > Java Debugger.
Created attachment 128878 [details] Stop on uncaught exceptions Stop on uncaught exceptions
Yes. i've done this - you can see it on my second attachment.
Created attachment 128879 [details] Test class producing two exceptions - one caught and one uncaught. Can you please try to debug this class? Debugger should stop at line 65 due to ClassCastException. Does it work for you? This works for me at least in this environment: Product Version: NetBeans IDE Dev (Build 201212050001) Updates: Updates available Java: 1.7.0_06; Java HotSpot(TM) Client VM 23.2-b09 Runtime: Java(TM) SE Runtime Environment 1.7.0_06-b24 System: Linux version 3.0.0-12-generic running on i386; UTF-8; cs_CZ (nb) User directory: /home/cesilko/.netbeans/dev Cache directory: /home/cesilko/.cache/netbeans/dev
Well, I'm not able to reproduce this. I've tried a sample project (attached by Jiri) and debugger has stopped on the exception. Also I've tried to introduce a NPE to MetaInfServicesLookup class, built and executed and attached with NetBeans debugger. Again, debugger has stopped correctly on the exception. Can you please test it with a sample project?
Created attachment 128912 [details] Testsource in a zip-File
Created attachment 128914 [details] Hardcopy of unexpected exception
Created attachment 128915 [details] The output of netbeans-Debug
Hi, I produced a new netbeans platform with an exception in it. Again the debugger does not stop. The task is running, and the exception can be generated again. I have 3 attachments sended to reproduce the fault. The TEST-Source in a zip-File , the output of debugger-run and the first message of the unexpected exception as a hardcopy. My main-Problem is the bug 223066 where the exception happens somewhere, maybe in the netbeans-platform. If the debugger would stop exactly, maybe I have a chance to find out, what the problem is.
Thanks for the sources. I have reproduced the problem. The only workaround is to create an exception breakpoint for java.lang.ArrayIndexOutOfBoundsException, which works for me and suspends the debugging session. Tested in NetBeans IDE Dev (Build 201212060001) Java: 1.7.0_10-ea; Java HotSpot(TM) 64-Bit Server VM 23.6-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b15 System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb) User directory: /home/cesilko/.netbeans/dev Cache directory: /home/cesilko/.cache/netbeans/dev
Thank you for the answer. With my windows-System the workaround only works with setted caught and uncaught. If I set only uncaught for this type (java.lang.ArrayIndexOutOfBoundsException), the debugger doesn't stop. This is also my problem in bug 223066 , there are too much caught exceptions of the type java.lang.NullPointerException in the user program.
The problem is, that the exception in the example is caught: [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) The option works for un-caught exceptions only, since the application can throw a lot of caught exceptions. When I introduce a NullPointerException into MetaInfServicesLookup to simulate your original exception, debugger suspends on it correctly. Therefore closing as works for me. Exit result different from 0 means an error. It's returned by the JVM.