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 150389 - SAX parsing error and NPE while debugging
Summary: SAX parsing error and NPE while debugging
Status: RESOLVED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: jymen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-16 14:46 UTC by Jiri Vagner
Modified: 2009-01-15 01:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NewPythonProject4.py (335 bytes, text/plain)
2008-10-16 14:47 UTC, Jiri Vagner
Details
messages.log (27.20 KB, text/plain)
2008-10-16 14:47 UTC, Jiri Vagner
Details
run fix in linux (132.46 KB, image/png)
2008-10-16 16:53 UTC, jymen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Vagner 2008-10-16 14:46:05 UTC
IDE thrown NPE while I was trying to expand "self" node inside "Watches" view. Debugger was terminated after this
action. NBPython generates invalid XML content:


...  name="<module>" ...
... <JPY> <CALL cmd="4" fn="c:\documents ... onproject4.py" name="<module>" args="None" /></JPY> ...


[Fatal Error] :1:137: The value of attribute "name" associated with an element type "CALL" must not contain the '<'
character.
SEVERE [org.openide.util.RequestProcessor]
java.lang.NullPointerException
        at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.applyChildren(TreeModelNode.java:826)
        at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.evaluateLazily(TreeModelNode.java:784)
        at org.netbeans.modules.viewmodel.TreeModelNode$LazyEvaluator.run(TreeModelNode.java:1184)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
org.netbeans.modules.python.debugger.backend.PythonDebugException: NBPython backend Parser parse  SAX PARSING ERROR :
The value of attribute "name" associated with an element type "CALL" must not contain the '<' character.
****************** XML-SOURCE **********************
<JPY> <CALL cmd="4" fn="c:\documents and settings\jirka\my
documents\netbeansprojects\newpythonproject4\src\newpythonproject4.py" name="<module>" args="None" /></JPY>
****************** END OF XML-SOURCE **********************
        at org.netbeans.modules.python.debugger.backend.JPyDebugXmlParser.parse(JPyDebugXmlParser.java:470)
        at org.netbeans.modules.python.debugger.backend.PythonDebugEvent.parse(PythonDebugEvent.java:111)
.....



Steps to reproduce:
 - debug attached sample file, set breakpoint on line 6
 - start debugging session
 - use "Continue" to skip default hidden breakpoint on first line ( I really dont like this hidden breakpoint ;) )
 - wait for breakpoint hit and go to Watches view
 - expand "self" node > booom, debugger is down (check the IDE log file)



Product Version: NetBeans IDE Dev (Build 20081015003247)
Python: boundled Jython
Java: 1.6.0_10-rc2; Java HotSpot(TM) Client VM 11.0-b15
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Comment 1 Jiri Vagner 2008-10-16 14:47:00 UTC
Created attachment 71980 [details]
NewPythonProject4.py
Comment 2 Jiri Vagner 2008-10-16 14:47:53 UTC
Created attachment 71982 [details]
messages.log
Comment 3 Jiri Vagner 2008-10-16 14:57:52 UTC
Oups ... errRor ... ide throwN npe ... great english!  ;)
Comment 4 jymen 2008-10-16 15:13:25 UTC
> use "Continue" to skip default hidden breakpoint on first line ( I really dont like this hidden breakpoint ;) )

You can disable it : 
Menu -> tools -> options -> Python -> debugger 
and uncheck the 'Stop at First Line' checkbox option 

Jean-Yves
Comment 5 jymen 2008-10-16 16:52:41 UTC
Fixed Jython specific unhandled exceptions not correctly handled in jpydebug.py
XML parsing exception has been previously fixed
Comment 6 jymen 2008-10-16 16:53:53 UTC
Created attachment 72014 [details]
run fix in linux