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: | NullPointerException at org.netbeans.modules.cnd.debugger.common2.debugger.breakpoints.BreakpointManager.hasBreakpointJobAt | ||
---|---|---|---|
Product: | cnd | Reporter: | Leperous |
Component: | Debugger | Assignee: | henk89 |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | petrk |
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 223006 |
Attachments: | stacktrace |
Description
Leperous
2016-03-14 18:02:42 UTC
Created attachment 158855 [details]
stacktrace
I think that a null pointer check is definitely needed here. We iterate the entire breakpointJobs.map, and for each BreakpointJob call template() and then call matchesLine() on the breakpoint that is returned by template() method. The template() returns a field that definitely *can* be null - there are at least 3 calls to BreakpointJob constructor that pass null as template. And this bug and also bug 251862 that is closed as non-reproducible prove that. So I'm sure this bug should be fixed via a null pointer check. If we think that it should never be null at this point, then let's add a soft assertion after null check (or even better, use reportOnce) - this will still let us know that the code behaves not the way we think, but will not affect. BTW, together with the bug 251862 that in fact the same, there are 4 duplicate exception reports. Isn't a 81 patch candidate? Integrated into 'main-silver', will be available in build *201604050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6d0f9f4870de User: Nikolay Koldunov <henk89@netbeans.org> Log: Fixed #258362 - NullPointerException at org.netbeans.modules.cnd.debugger.common2.debugger.breakpoints.BreakpointManager.hasBreakpointJobAt verified in builds on enum server *** Bug 258693 has been marked as a duplicate of this bug. *** |