Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 89766 - Stack frame not always selected when breakpoint hit
Summary: Stack frame not always selected when breakpoint hit
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-30 22:12 EST by Nick Edgar CLA
Modified: 2006-05-12 15:55 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2005-03-30 22:12:37 EST
build I20050330-0500

In the last few I-builds, I've noticed that often, when a breakpoint is hit soon
after resuming from a previous one using F8, the stack frame at the breakpoint
is not selected.  The Debug view gets focus, but there is no selection.
It seems that this usually happens when I had focus in the editor or the
variables view, and when the next breakpoint is hit very soon after resuming.
Comment 1 Nick Edgar CLA 2005-03-30 22:19:47 EST
VM: pj9n142-20040928a
Comment 2 Kevin Barnes CLA 2005-05-20 14:31:59 EDT
Nick, is this still happening? We have not noticed it lately.
Comment 3 Nick Edgar CLA 2005-05-20 15:54:42 EDT
Not sure about the latest builds, but I was seeing it not too long ago.
I think it should be kept open for a while longer.  I'll keep a lookout for it,
and let you know.

Comment 4 Randy Hudson CLA 2005-05-20 16:13:13 EDT
This happened to me today. I was launching with a breakpoint set that would get
hit immediately.

To reproduce, I just close the debug perspective and press F11. Because of a bug
in the PDE I'm currently forced to use a pre-M7 build.
Comment 5 Darin Wright CLA 2005-05-21 09:11:49 EDT
The selection problem when switching perspectives is a due to bug 73188. 
Perhaps this is a duplicate.
Comment 6 Tom Hofmann CLA 2005-05-23 07:09:33 EDT
I also see this on gtk on N20050523. The editor does not get revealed either, I
have to select the top stack frame to bring the corresponding editor to the top.
Comment 7 Tom Hofmann CLA 2005-05-23 07:14:18 EDT
sorry, I've seen this for a while, but not with N20050523, as I see bug 96294 there.
Comment 8 Randy Hudson CLA 2005-05-23 10:36:35 EDT
In my case, the editor was already active when I pressed F11.  So the problem 
is definitely not activating the editorpart, unless the ui sent extra 
notification for activating an already active editor.
Comment 9 Nick Edgar CLA 2005-05-30 14:35:57 EDT
I haven't seen this in the latest builds.  I just tried again, and it worked OK,
but there was some inconsistency in the impact of refreshing the Debug views. 
About half the time it did a full refresh, other times it seemed instantaneous,
but it did not lose the selection.

Steps:
- platform-ui and prereqs from CVS
- rest as external binaries
- set breakpoint in ActionBarAdvisor.register(IAction)
- launch IDE under Debug
- hit F8 about once a second
- sometimes the Debug view does a full refresh, with a noticeable flash,
sometimes it needs to do very little work at all with no flash, but it updates
correctly either way (e.g. look at line number for
WorkbenchActionBuilder.makeActions, and action var in Variables view)


Comment 10 Randy Hudson CLA 2005-05-31 10:26:22 EDT
I can reproduce this every time using 0525-0100 build.  Nick, which build were 
you using? Did you already have the perspective open?
Comment 11 Nick Edgar CLA 2005-05-31 13:11:09 EDT
build I20050527-0900, using pj9n142ifx-20041206 as my host VM and Sun JDK
1.4.2_01 as my target VM.  I tried in both my custom perspective, and in the
debug perspective (already open).

Comment 12 Darin Wright CLA 2005-06-09 16:11:26 EDT
Releasing a change to RemoteTreeViewer that may fix this problem. Since I 
can't reproduce the problem reliably, I'm not positive it's a complete fix. 
Fix will be in the 8PM build today.

We had a couple places in our "replace/merge" code that replaces old content 
with newly retrieved content from the target, without re-scheduling 
the "deferred selection" job. All code paths now ensure to run the deferred 
updates (selection/expansion).
Comment 13 Darin Wright CLA 2005-06-17 12:07:15 EDT
Marking as works for me. Please re-open or file a new bug if the problem 
persists.
Comment 14 Randy Hudson CLA 2005-06-19 11:29:00 EDT
Reproducing on RC3 is trivial and the steps have been provided in comment 4.
Comment 15 Darin Wright CLA 2005-06-20 09:57:11 EDT
I tried with a breakpoint on the first statement of a "main", but the 
perspective is still opened, the frame is selected, and source is displayed 
(Win XP, 3GHz P4).
Comment 16 Randy Hudson CLA 2005-06-20 10:54:09 EDT
Make sure you first close all editors and close the debug perspective.
Comment 17 Darin Wright CLA 2005-06-20 11:45:40 EDT
Still works, after closing all editors and all perspectives (except Java).
Comment 18 Randy Hudson CLA 2005-06-20 14:27:47 EDT
My test case is that I'm trying to debug an SWT application that does not have 
the DLL on the library path.  So, org.eclipse.swt.internal.Library#loadLibrary 
throws an exception, which is caught and the debugger attempts to display line 
131 but nothing happens.

If I put a breakpoint in main, it also fails to display the breakpoint.

Perhaps the z-order of parts in the debug perspective is important.  Have you 
customized the debug perspective? Mine appears to be the default.
Comment 19 Darin Wright CLA 2005-06-20 16:17:15 EDT
Also works for me in a brand new workspace (no alterations to user 
preferences). The first time I try, I am prompted to switch to debug 
perspective (works, and I select "remember my decision to switch"). I then 
closed the debug perspective and all editors and restarted the workspace. On 
the next try, it also works, without prompting.
Comment 20 Darin Wright CLA 2005-06-22 10:32:43 EDT
Deferred for post 3.1
Comment 21 Darin Wright CLA 2006-05-12 15:54:16 EDT
works for me in 3.2
Comment 22 Darin Wright CLA 2006-05-12 15:55:01 EDT
marking as works for me.