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 170078 - Python Jython debugger crahes when removing a breakpoint
Summary: Python Jython debugger crahes when removing a breakpoint
Status: RESOLVED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.1
Hardware: PC All
: P2 blocker (vote)
Assignee: Lou Dasaro
URL:
Keywords:
: 195512 197298 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-08 10:36 UTC by audetto
Modified: 2015-04-08 05:57 UTC (History)
2 users (show)

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 audetto 2009-08-08 10:36:12 UTC
When removing a breakpoint the python/jython debugger fails
(I will report the error message on Monday when I return to work)

I am using netbeans 6.7.1 with jython 2.5.0.

The error is in jpydaemon.py at line 689

        elif ( string.upper(verb) == "BP-"):
            self.cmd = CLEAR_BP
            arg , optarg = _utils.nextArg(arg) # split BP arguments  
            self.clear_break( arg , int(optarg) ) <<<<<<<<<<<<<<<<<<< ERROR, optarg is not a number
            self.cmd = FREEZE 

I think this is the correct code

        elif ( string.upper(verb) == "BP-"):
            self.cmd = CLEAR_BP
            file , optarg = _utils.nextArg(arg)
            line , optarg = _utils.nextArg(optarg)
            self.clear_break( file, int(line) )
            self.cmd = FREEZE

Andrea
Comment 1 audetto 2009-08-11 11:06:10 UTC
Here is the exact error message

>>>Exception in thread MainThread:Traceback (most recent call last):
  File "O:\java\jython2.5.0\Lib\threading.py", line 247, in _Thread__bootstrap
    self.run()
  File "C:\WINDOWS\Profiles\ga2odet.ZTB\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 590, in run
    exec self._cmd in self._myglobals,self._mylocals
  File "<string>", line 1, in <module>
  File "H:/Docs/code/NetBeans/NewPythonProject/src/newpythonproject.py", line 2, in <module>
    def setClassPath():
  File "C:\WINDOWS\Profiles\ga2odet.ZTB\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 724, in
trace_dispatch
    self.dispatchLineAndBreak(mainDebugger, frame , lthread )
  File "C:\WINDOWS\Profiles\ga2odet.ZTB\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 604, in
dispatchLineAndBreak
    lthread.additionalInfo.breakHere(frame,lthread)
  File "C:\WINDOWS\Profiles\ga2odet.ZTB\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 810, in
breakHere
    while ( self.dbg.parseSubCommand(  self.dbg._connection.getNextDebuggerCommand() , frame , lthread ) == FREEZE ):
  File "C:\WINDOWS\Profiles\ga2odet.ZTB\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 810, in
breakHere
    while ( self.dbg.parseSubCommand(  self.dbg._connection.getNextDebuggerCommand() , frame , lthread ) == FREEZE ):
  File "C:\WINDOWS\Profiles\ga2odet.ZTB\.netbeans\6.7\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 1484, in
parseSubCommand
    self.clear_break( arg , int(optarg) )
ValueError: invalid literal for int() with base 10: 13 0 None

and here is the patch

$ diff -u /profile/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py /desktop/jpydaemon.py
--- /profile/.netbeans/6.7/config/nbPython/debug/nbpythondebug/jpydaemon.py     2009-08-11 10:57:47.815295200 +0100
+++ /desktop/jpydaemon.py       2009-07-31 15:06:26.526625000 +0100
@@ -1480,8 +1488,9 @@
             self.cmd = FREEZE
         elif ( string.upper(verb) == "BP-"):
             self.cmd = CLEAR_BP
-            arg , optarg = _utils.nextArg(arg) # split BP arguments
-            self.clear_break( arg , int(optarg) )
+            file , optarg = _utils.nextArg(arg)
+            line , optarg = _utils.nextArg(optarg)
+            self.clear_break( file, int(line) )
             self.cmd = FREEZE
         elif ( string.upper(verb) == "KILL"):
             self.cmd = QUIT
Comment 2 kenorb 2011-03-31 11:15:54 UTC

*** This bug has been marked as a duplicate of bug 196842 ***
Comment 3 kenorb 2011-03-31 11:23:36 UTC
Sorry, not duplicate.
It's similar, but there is error:
hits = int(hits)
Comment 4 Lou Dasaro 2014-12-09 08:16:06 UTC
Yes, this is still anomalous. Increased priority, occurs in recent DEV download.
Product Version: NetBeans IDE Dev (Build 201412050001)
Java: 1.8.0_25; Java HotSpot(TM) Client VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18
System: Windows 8 version 6.2 running on x86; Cp1252; en_US (nb)
Comment 5 Lou Dasaro 2014-12-23 09:45:56 UTC
Fixed in plugin built during build *201412230001* 
changeset: 4afc82a328ce
user: Lou Dasaro <mr_lou_d@netbeans.org>
log: #170078 - Patched Python debugger code to eliminate crash
Comment 6 Lou Dasaro 2015-01-23 19:47:50 UTC
*** Bug 195512 has been marked as a duplicate of this bug. ***
Comment 7 Lou Dasaro 2015-04-08 05:57:07 UTC
*** Bug 197298 has been marked as a duplicate of this bug. ***