| Summary: | Stepping key-bindings get ignored the first time they are pressed | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Marc Khouzam <marc.khouzam> | ||||
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | darin.eclipse, ndsilva | ||||
| Version: | 3.6 | Flags: | darin.eclipse:
review?
(pawel.1.piech) |
||||
| Target Milestone: | 3.6 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 162212 [details]
patch
The problem is due to a race condition caused by the fact that the action's constructor was setting fInitialized to true. This needs to be done, unless the action is associated with a part or window, in which case enablement should be updated based on the debug context service, asynchronously.
Without this fix, the action's initial enabled state was set to false by the constructuor, and then the action was #run(...) before it had a chance to get it's real enablement state. The fix is to set fInitialized to false when the action is initialized for a part or window. This causes the first execution to wait for initialization to complete.
Fixed in HEAD. Please verify, Pawel. I'm still seeing this in 3.6. Should re-open this bug or create a new one? (In reply to comment #3) > I'm still seeing this in 3.6. > Should re-open this bug or create a new one? Please open a new one - I'm not seeing this. Is it specific to CDT or JDT? (In reply to comment #4) > (In reply to comment #3) > > I'm still seeing this in 3.6. > > Should re-open this bug or create a new one? > > Please open a new one - I'm not seeing this. Is it specific to CDT or JDT? It was for JDT. I saw it last night on my Windows7 box but I can't reproduce it today on Linux. I'll try to see if my Windows7 Eclipse installation is correct and that I can consistently see the problem before opening a new bug. Thanks (In reply to comment #5) > It was for JDT. > I saw it last night on my Windows7 box but I can't reproduce it today on Linux. > I'll try to see if my Windows7 Eclipse installation is correct and that I can > consistently see the problem before opening a new bug. I can't see it anymore, even on my Windows7 box. Maybe I got confused... Sorry. |
If I want to step in a debug session, the first of each of F5, F6, F7 and F8 gets ignored. The second press and all following work as expected. This happens once, every time I restart eclipse. I am able to reproduce with a very simply program: public class Test { public static void main(String[] args) { Test t = new Test(); t.init(); } public void init() { System.out.println("init"); } } Set a breakpoint anywhere. Then press any step key shortcut and the first press will be ignored. I've am able to reproduce this in 3.6 M2, M3 and M4. I didn't try with an older 3.6. It works properly for 3.5.1