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 150004

Summary: [65cat]java.lang.NullPointerException
Product: python Reporter: rajivderas <rajivderas>
Component: DebuggerAssignee: jymen <jymen>
Status: VERIFIED WORKSFORME    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: log file
screen shot
py project
show source working

Description rajivderas 2008-10-14 06:32:49 UTC
Created a py project in dev build 55 and tried to debug a file and set the breakpoint at the start of the file and when 
debugged it threw the following exception :

java.lang.NullPointerException
	at org.netbeans.modules.python.debugger.Utils.markCurrent(Utils.java:56)
	at org.netbeans.modules.python.debugger.PythonDebugger.handleDebuggerEvent(PythonDebugger.java:457)
	at org.netbeans.modules.python.debugger.actions.JpyDbgView.newDebuggingEvent(JpyDbgView.java:114)
	at 
org.netbeans.modules.python.debugger.gui.PythonDebugContainer$_DEBUGEVENT_MANAGER_.populateToPlugin(PythonDebugContaine
r.java:661)
	at 
org.netbeans.modules.python.debugger.gui.PythonDebugContainer$_DEBUGEVENT_MANAGER_.populateLocalSource(PythonDebugConta
iner.java:676)
	at 
org.netbeans.modules.python.debugger.gui.PythonDebugContainer$_DEBUGEVENT_MANAGER_.startupSourceInit(PythonDebugContain
er.java:707)
	at 
org.netbeans.modules.python.debugger.gui.PythonDebugContainer$_DEBUGEVENT_MANAGER_.startDebugger(PythonDebugContainer.j
ava:730)
	at 
org.netbeans.modules.python.debugger.gui.PythonDebugContainer$_DEBUGEVENT_MANAGER_.newDebugEvent(PythonDebugContainer.j
ava:1039)
	at org.netbeans.modules.python.debugger.backend.PythonDebugClient.populateEvent(PythonDebugClient.java:169)
	at org.netbeans.modules.python.debugger.backend.PythonDebugClient.access$300(PythonDebugClient.java:21)
[catch] at org.netbeans.modules.python.debugger.backend.PythonDebugClient$_TCP_TASK_.run(PythonDebugClient.java:142)
Comment 1 rajivderas 2008-10-14 06:33:46 UTC
Created attachment 71722 [details]
log file
Comment 2 rajivderas 2008-10-14 06:35:05 UTC
Created attachment 71723 [details]
screen shot
Comment 3 jymen 2008-10-14 13:44:58 UTC
The raised nullpointer is due to impossibility of computing the source line so 
I am not able to reproduce with a sample of my own , so the problem may be related to the source you use , is it
possible to attach the sample you use to the ticket ? This would help me to understand why we got an invalid source line
instead of just fixing by ignoring null lines
 
thanks
Jean-Yves
Comment 4 rajivderas 2008-10-15 05:57:24 UTC
Created attachment 71823 [details]
py project
Comment 5 jymen 2008-10-15 11:44:30 UTC
Thanks for providing the sample using the 081014 nightly checkout on my linux box I have not been able to reproduce the
symptom.
Looking at the exception location , the reason of the exception is netbeans returning back a null line object to the
debugger when the startup line of the script is requested to show in the editor.
My advice here is to try with a more recent netbeans build.

I have attached the screen showing the NewPythonProject2.py in debug state on the first line of the script
Comment 6 jymen 2008-10-15 11:47:43 UTC
Created attachment 71846 [details]
show source working
Comment 7 Peter Lam 2008-12-15 05:38:37 UTC
verified in build 320 (20081212)