Bug 58450 - Debug gets unsynchronized with code after fix
Debug gets unsynchronized with code after fix
Status: CLOSED DUPLICATE of bug 57457
Product: debugger
Classification: Unclassified
Component: Java
4.x
All All
: P3 (vote)
: 6.x
Assigned To: issues@debugger
issues@debugger
fix-in-65-ndc
:
Depends on:
Blocks: 57457
  Show dependency treegraph
 
Reported: 2005-04-29 15:33 UTC by brviking
Modified: 2010-04-29 09:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brviking 2005-04-29 15:33:31 UTC
Debugging an application (Swing based), after making some changes and fixing it,
executing step-by-step shows one line in editor, and executes other. This gets
more clear where are variable declarations, because the new created variable is
shown in "Local variables" panel, but the line in editor wasn't executed (or, at
least, programmer believes not), or when debugger stops into a empty line
(normally, in a recent started with no fix, netbeans doest steps only in lines
of code, ignoring empty lines).

Appear that NB loose shycronism between source code and byte code (or debugger,
whatever).

The problem occur with major frequency in classes that have inner classes (like
swing based ones), but can occur in other classes too.

The solution is stop debugging and start again.

I'm using Sun JDK 1.4.2_07 in Fedora Core 3 linux with all latest fixes and
latest oficial kernel.

Richter
Comment 1 Roman Ondruska 2005-05-02 11:48:15 UTC
This may happen when redefining (fixing) a method that has an active stack frame
(and it is not the topmost frame). In this case there are both (new and old)
versions of the method in the VM. We do not want to do complete "rollback" after
fix & continue, this is in most cases inconvenient (IMHO). Instead, we only do
rollback from the topmost frame if neccessary.
So, after F & C it is possible that an old version of fixed method is being
executed. I agree that this should be somehow emphasized.  
Comment 2 Roman Ondruska 2005-08-11 11:06:22 UTC
See comment above.
Comment 3 Martin Entlicher 2005-12-12 17:01:30 UTC
This should be fixed together with the temporary editor (issue #35586).
Comment 4 Martin Entlicher 2007-03-08 15:19:49 UTC
We plan to implement much lighter support for Temporary editor (issue #35586)
than originally thought, therefore it will not be usable for solving this problem.

The solution won't be easy, since multiple versions of the same file can be
processed in the debuggee at the same time. Scheduling for the next release.
Comment 5 Martin Entlicher 2008-10-06 12:17:15 UTC
This is in fact a duplicate of issue #57457.
The stepping on wrong lines was probably a behavior of JDK 1.4. On JDK 1.5, 1.6 and 1.7 the "fixed" method is marked as
<obsolete> and no line number information is provided. Therefore the stepping is completely blind, without the green line.

*** This issue has been marked as a duplicate of 57457 ***
Comment 6 Quality Engineering 2010-04-29 09:22:20 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo