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 156967 - debugging session stops at JFrame statement in Jython Swing app
Summary: debugging session stops at JFrame statement in Jython Swing app
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: 2009-01-16 18:02 UTC by Peter Lam
Modified: 2009-02-19 22:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Jython Swing sample app (5.90 KB, application/x-compressed)
2009-01-16 18:04 UTC, Peter Lam
Details
show fix (923.10 KB, image/png)
2009-01-18 21:18 UTC, jymen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lam 2009-01-16 18:02:56 UTC
Product Version: NetBeans IDE Dev (Build 20090116133323)
Java: 1.6.0_11; Java HotSpot(TM) Server VM 11.0-b16
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Userdir: C:\Users\peter\.netbeans\dev-20090116-b645

Debugging and stepping to line 24 in the attached sample Jython Swing sample app, stepping into or over line 24 will end
the debugging session.

Repro steps:
- download, unzip and open the attached sample project
- right click on the project and select properties
- click on Python and reselect bundled "Jython 2.5b0+' platform
- click on Run and select 'AnagramsSwing.py' for Main Module
- open AnagramsSwing.py source and set a break point on line 24
- uncheck 'Stop at first line' on Python Debugger option
- Debug the project
Comment 1 Peter Lam 2009-01-16 18:04:19 UTC
Created attachment 75915 [details]
Jython Swing sample app
Comment 2 tonybeckham 2009-01-16 18:06:11 UTC
This and issue 156386 may be related we will have to wait for evaluation.
Comment 3 Peter Lam 2009-01-16 18:14:57 UTC
good catch but not sure if it's related since the sample Swing app attached to this issue can be run ok. Debugging is ok
too until stepping into or over line 24 with the JFrame call stopped the debugging session. Issue 156386 is about the
Swing sample app that can not be run at all.
Comment 4 tonybeckham 2009-01-16 18:18:21 UTC
True, that's why we will have to wait for evaluation ;)  I just thought that the coincidence of both issues being
related to JFrame (see NPE for issue 156386) was worth mentioning.
Comment 5 Peter Lam 2009-01-16 18:32:43 UTC
Yes, agree with you. It's definitely worth mentioning. Thanks.

Here's a simple case where the debugging session stops right before the last print statement.
import javax.swing as swing 
frame = swing.JFrame('Hello World Swing')
frame.setDefaultCloseOperation(swing.JFrame.EXIT_ON_CLOSE)
label = swing.JLabel("Hello World Swing Text!")
frame.getContentPane().add(label)
frame.pack()
frame.setVisible(1)
print "another line that will not be reached during debugging session"
Comment 6 jymen 2009-01-18 21:18:39 UTC
Created attachment 75955 [details]
show fix
Comment 7 jymen 2009-01-18 21:40:30 UTC
fix starting at build #663
Comment 8 Peter Lam 2009-01-20 22:33:19 UTC
Product Version: NetBeans IDE Dev (Build 20090120172641)
Java: 1.6.0_11; Java HotSpot(TM) Server VM 11.0-b16
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Userdir: C:\Users\peter\.netbeans\dev20090120-b684

Verified with build #684 but the problem still exists. I verified this on the above Windows platform.
Comment 9 jymen 2009-01-21 08:03:00 UTC
Not able to reproduce on linux(see my attached screen) so I switched the os from All to windows
Comment 10 aparo 2009-01-26 11:00:27 UTC
It's reproduceble in Linux tested on jython 2.5b1. Seems that is a jython 2.5b1 bugs.
Lastest jython trunk is working.

During testing, it seems that jython 2.5b1 is unable to instanciate JFrame.

Try with latest jython trunk. It seems work.
Comment 11 jymen 2009-01-26 13:19:16 UTC
Good catch , thanks !!!

I confirm I did my linux test(when it worked)  using Jython 2.2.1 + Jython 2.5b0 ; this explains that it was a Jython
regression in 2.5b1 

so I changed the ticket to FIXED on my side.(Peter If this is not the right process when the bug was finally not in
developper's code let me know).