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 172431 - setting breakopint, wrong file considered
Summary: setting breakopint, wrong file considered
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-09-17 00:10 UTC by err
Modified: 2009-10-09 23:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
wrong file when dialog comes up (63.64 KB, image/png)
2009-09-17 00:11 UTC, err
Details
not using new file name that was entered (20.19 KB, image/png)
2009-09-17 00:12 UTC, err
Details

Note You need to log in before you can comment on or make changes to this bug.
Description err 2009-09-17 00:10:22 UTC
In a junit test file, AstroPersist/test/org/metawb/astro/db/PersonTest.java, I was unable to set a breakpoint on a line
by clicking in the gutter, so I brought up NewBreakpoint dialog from the menu.

PersonTest.java is the active file, see first screenshot, but the dialog comes up with Event.java. I typically have
files on both the left and right as is shown. If I activate a file in the right set, and then bring up the dialog, the
dialog has the active file. PROBLEM-1.

So I enter the file name and line number, but it reports that the line number is too big. It is not. But the 238 that it
reports is the size of the file that it first came up with, Event.java. PROBLEM-2.

(I'm thinking that PROBLEM-1 and PROBLEM-2 are the same problem...)

Product Version: NetBeans IDE Dev (Build 200909151512)
Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.2-b01
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\erra\.netbeans\dev
Comment 1 err 2009-09-17 00:11:13 UTC
Created attachment 87804 [details]
wrong file when dialog comes up
Comment 2 err 2009-09-17 00:12:12 UTC
Created attachment 87805 [details]
not using new file name that was entered
Comment 3 err 2009-09-17 00:15:36 UTC
BTW, if I select the same file on the left (I have it opened on both the left and right) then everything works as expected.
Comment 4 err 2009-09-17 08:17:52 UTC
Forgot to mention that this is a regreesion.
Comment 5 Martin Entlicher 2009-09-29 15:57:20 UTC
PROBLEM-2 is actually a separate issue - the code checks length of the original file, does not update the maximum line
count when you change the file name.

I've fixed this in changeset:   147277:89806b94d8f9
http://hg.netbeans.org/main/rev/89806b94d8f9

I'll check PROBLEM-1 ...
Comment 6 Martin Entlicher 2009-09-29 16:55:03 UTC
I'm not able to reproduce the problem with the dialog opened for a wrong file.
However, I can occasionally reproduce a problem with breakpoint submission through a gutter. Click into a gutter of the
file on the left side occasionally submits breakpoint to the last current line in the file on the right side.
Comment 7 Martin Entlicher 2009-10-05 17:14:50 UTC
I've found that occasionally we get mouse events before focus events and therefore we submit breakpoints into a wrong
file. Fixing this should resolve this problem...
Comment 8 Martin Entlicher 2009-10-05 19:29:05 UTC
Hopefully finally fixed in changeset:   147687:4fd1d4ee63f8
http://hg.netbeans.org/main/rev/4fd1d4ee63f8
Please verify.
Comment 9 err 2009-10-05 19:46:59 UTC
> Please verify.
Will do, however I'll be OutOfOffice for a week or two starting in a few days. Will leave message in my inbox and verify
when I return.

BTW, the dual window stuff has been *much* better. Thanks.
Comment 10 Quality Engineering 2009-10-09 23:04:08 UTC
Integrated into 'main-golden', will be available in build *200910091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4fd1d4ee63f8
User: mentlicher@netbeans.org
Log: #172431 - Submit breakpoints lazily in AWT (wait for context to initialize).