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.

Bug 104783 - Creating Breakpoint causes null pointr exception.
Summary: Creating Breakpoint causes null pointr exception.
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 155058 (view as bug list)
Depends on:
Blocks: 90419
  Show dependency tree
 
Reported: 2007-05-24 23:56 UTC by saratech
Modified: 2010-04-29 09:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description saratech 2007-05-24 23:56:09 UTC
java.lang.NullPointerException
	at
org.netbeans.modules.ant.debugger.breakpoints.PersistenceManager.initBreakpoints(PersistenceManager.java:52)
	at
org.netbeans.api.debugger.DebuggerManager.initBreakpoints(DebuggerManager.java:783)
	at
org.netbeans.api.debugger.DebuggerManager.addBreakpoint(DebuggerManager.java:471)
	at
org.netbeans.modules.debugger.jpda.ui.actions.ToggleBreakpointActionProvider.doAction(ToggleBreakpointActionProvider.java:131)
	at org.netbeans.spi.debugger.ActionsProvider$1.run(ActionsProvider.java:83)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)
Comment 1 Martin Entlicher 2007-05-25 10:39:20 UTC
ANT debugger issue.
Comment 2 Martin Entlicher 2007-05-25 10:43:14 UTC
Well, that should not be possible...
ANT debugger stores only breakpoints which are instance of AntBreakpoint and
when it reads them it gets null.
So maybe this is a bug in debuggercore in the process of read/write of properties.
Comment 3 Martin Entlicher 2007-05-25 14:45:08 UTC
JPDA debugger uses the same approach, thus it should be safe and should work.
Looking into org.netbeans.api.debugger.Properties I see that there is no
synchronization for I/O operations. Save is done lazily and is not synchronize
with modifications, therefore i can save corrupted data.

It seems that data corruption really occur from time to time, some bug reports
about staled breakpoints that need cleanup of debugger settings suggest that it
can be caused by this.
Comment 4 Martin Entlicher 2007-05-25 14:52:46 UTC
This might be a cause of issue #90419.
Comment 5 Martin Entlicher 2007-06-21 11:42:51 UTC
I've wrote a test for Properties, which is an important core functionality:

/shared/data/ccvs/repository/debuggercore/api/src/org/netbeans/api/debugger/Properties.java,v  <--  Properties.java
new revision: 1.11; previous revision: 1.10
done
RCS file: /shared/data/ccvs/repository/debuggercore/test/unit/src/org/netbeans/api/debugger/PropertiesTest.java,v
done
Checking in test/unit/src/org/netbeans/api/debugger/PropertiesTest.java;
/shared/data/ccvs/repository/debuggercore/test/unit/src/org/netbeans/api/debugger/PropertiesTest.java,v  <-- 
PropertiesTest.java
initial revision: 1.1

However, this test does not discover a bug of this kind yet.
Comment 6 Martin Entlicher 2007-06-21 16:02:45 UTC
The synchronization is improved, the stored data should not be corrupted any more:

/shared/data/ccvs/repository/debuggercore/api/src/org/netbeans/api/debugger/Properties.java,v  <--  Properties.java
new revision: 1.12; previous revision: 1.11
Comment 7 Peter Pis 2008-12-10 14:04:38 UTC
*** Issue 155058 has been marked as a duplicate of this issue. ***
Comment 8 Quality Engineering 2010-04-29 09:33:20 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.