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 175646 - Breakpoint keeps the line number after code modification
Summary: Breakpoint keeps the line number after code modification
Status: RESOLVED DUPLICATE of bug 175578
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: mslama
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-10-29 12:35 UTC by Alexander Pepin
Modified: 2009-10-30 14:03 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 Alexander Pepin 2009-10-29 12:35:55 UTC
Steps to reproduce:
- create local Subproject application
- set a BP in 'hello1' function in line 33 (return (char*)"Hello from hello1...\n";)
- start debugging, it stops in line 33
- finish debugging
- modify 'hello1' function in the following way:
char *hello1() {
    char* text =  (char*)"Hello from hello1...\n";
    return text;
}
- check that the BP now is in line 34 (return text;)
- start debugging 
Result: Debugger stops in line 33 and the BP moves to the line 33 as well.
Comment 1 Egor Ushakov 2009-10-29 14:35:08 UTC
reproduced in java too.

The easiest way to reproduce:
- open any file which was never opened
- set line breakpoint in any place
- insert some empty lines before it
breakpoint line number is not updated.
After you save the file it start working but still fails sometimes.

breakpoints use LineCookie to track document changes and it fails sometimes.
Comment 2 Egor Ushakov 2009-10-29 14:36:26 UTC
may be related with the issue 175578
Comment 3 Vitezslav Stejskal 2009-10-30 14:03:30 UTC
Yes, this seems to be the same problem as issue #175578 or at least it seems to be fixed by backing out
http://hg.netbeans.org/main-golden/rev/04860c675e0c, see #175578.

*** This issue has been marked as a duplicate of 175578 ***