Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 71016 - infinitely prompty dialog
Summary: infinitely prompty dialog
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P1 critical (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Douglas Pollock CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 71226 71613 71704 (view as bug list)
Depends on:
Blocks: 64598
  Show dependency tree
 
Reported: 2004-07-28 15:40 EDT by Darin Wright CLA
Modified: 2005-05-31 11:02 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2004-07-28 15:40:18 EDT
I20040727

I tried to extract a local variable in a method that had syntax errors. I was 
prompted with a dilaog saying "This file contains syntax errors. To perform 
this operation you will need to fix the errors.".

I pressed OK, and the dialog came back... again and again and again. I had to 
kill Eclipse to get out of the infinite prompting.
Comment 1 Darin Wright CLA 2004-07-28 15:46:12 EDT
I re-started, fixed the error and did the replacement. Then I was prompted 
infinitely to do the replacement :-) Had to kill Eclipse again.
Comment 2 Dirk Baeumer CLA 2004-07-29 06:01:39 EDT
The problem is that the ExtractTempAction gets triggered in an end less loop. 
The root cause of the problem seems to be memonic translation in SWT. Somehow 
thi produces an end less loop. Th estack trace I see all the time is: 

Thread [main] (Suspended (breakpoint at line 659 in Window))
	MessageDialog(Window).open() line: 659
	MessageDialog.openInformation(Shell, String, String) line: 343
	RefactoringWizardOpenOperation$1.run() line: 119
	BusyIndicator.showWhile(Display, Runnable) line: 69
	RefactoringWizardOpenOperation.run(Shell, String) line: 138
	RefactoringStarter.activate(Refactoring, RefactoringWizard, Shell, 
String, boolean) line: 40
	ExtractTempAction.run(ITextSelection) line: 93
	ExtractTempAction(SelectionDispatchAction).dispatchRun(ISelection) 
line: 216
	ExtractTempAction(SelectionDispatchAction).run() line: 188
	ExtractTempAction(Action).runWithEvent(Event) line: 979
	ActionHandler.execute(Map) line: 141
	Command.execute(Map) line: 135
	WorkbenchKeyboard.executeCommand(String) line: 476
	WorkbenchKeyboard.press(List, Event) line: 899
	WorkbenchKeyboard.processKeyEvent(List, Event) line: 940
	WorkbenchKeyboard.filterKeySequenceBindings(Event) line: 554
	WorkbenchKeyboard.access$2(WorkbenchKeyboard, Event) line: 501
	WorkbenchKeyboard$1.handleEvent(Event) line: 267
	EventTable.sendEvent(Event) line: 82
	Display.filterEvent(Event) line: 740
	ToolBar(Widget).sendEvent(Event) line: 795
	ToolBar(Widget).sendEvent(int, Event, boolean) line: 820
	ToolBar(Widget).sendEvent(int, Event) line: 805
	ToolBar(Control).traverse(Event) line: 2723
	ToolBar(Control).translateMnemonic(Event, Control) line: 2564
	ToolBar(Composite).translateMnemonic(Event, Control) line: 540
	CoolBar(Composite).translateMnemonic(Event, Control) line: 545
	Composite.translateMnemonic(Event, Control) line: 545
	CBanner(Composite).translateMnemonic(Event, Control) line: 545
	Shell(Composite).translateMnemonic(Event, Control) line: 545
	StyledText(Control).translateMnemonic(MSG) line: 2582
	Display.translateMnemonic(MSG, Control) line: 3191
	Display.filterMessage(MSG) line: 754
	Display.readAndDispatch() line: 2427
	Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1435
	Workbench.runUI() line: 1406
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 263
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 144
	IDEApplication.run(Object) line: 102
	PlatformActivator$1.run(Object) line: 335
	EclipseStarter.run(Object) line: 273
	EclipseStarter.run(String[], Runnable) line: 129
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not 
available [native method]
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 85
	NativeMethodAccessorImpl.invoke(Method, Object, Object[]) line: 58
	DelegatingMethodAccessorImpl.invoke(Method, Object, Object[]) line: 60
	Method.invoke(Object, Object[]) line: 391
	Main.basicRun(String[]) line: 183
	Main.run(String[]) line: 644
	Main.main(String[]) line: 628

and the loop happens in memonic translation code somewhere in

	CoolBar(Composite).translateMnemonic(Event, Control) line: 545
	Composite.translateMnemonic(Event, Control) line: 545
	CBanner(Composite).translateMnemonic(Event, Control) line: 545
	Shell(Composite).translateMnemonic(Event, Control) line: 545
	StyledText(Control).translateMnemonic(MSG) line: 2582

Comment 3 Dirk Baeumer CLA 2004-07-29 06:09:42 EDT
Steps to reproduce:

public class A {
	public void foo() {
		int i= 10;
		bar
	}
}

select 10 and activate extract temp by pressing Alt+Shift+L. Doesn't happen 
when trigger from the menu.

Happens with every action triggered in the editor using short cuts. This 
renders the build useless.
Comment 4 Dirk Baeumer CLA 2004-07-29 06:14:58 EDT
As another example press Alt+Shift+J having the cursor inside a method that 
doesn't have Javadoc. As a result you end up having lots of Javadoc comments. 
This loop terminates after some time. So item might not be an endless loop ;-).
Comment 5 Dirk Baeumer CLA 2004-08-02 10:46:00 EDT
*** Bug 71226 has been marked as a duplicate of this bug. ***
Comment 6 Steve Northover CLA 2004-08-03 13:32:35 EDT
Talked to SSQ and MVM.  The SWT.Traverse event for a mnemonic is sent to each 
control in the hierarchy so that custom controls can implement mnemonics.  It 
seems that Eclipse is filtering on SWT.Traverse and seeing each individual 
event.  Doesn't seem like an SWT problem.
Comment 7 Michael Van Meekeren CLA 2004-08-03 16:00:35 EDT
It appears to have been introduced between org.eclipse.ui.workbench versions
v20040726 AND v20040720, investigating.
Comment 8 Michael Van Meekeren CLA 2004-08-03 16:09:46 EDT
This was introduced by a fix made for bug 64598.
Comment 9 Markus Keller CLA 2004-08-09 05:24:39 EDT
*** Bug 71613 has been marked as a duplicate of this bug. ***
Comment 10 Johan Compagner CLA 2004-08-10 08:22:16 EDT
*** Bug 71704 has been marked as a duplicate of this bug. ***
Comment 11 Douglas Pollock CLA 2004-08-17 09:53:14 EDT
This problem must be considered with respect to Bug 64598. 
Comment 12 Douglas Pollock CLA 2004-08-25 12:16:29 EDT
This problem appears to be specific to Windows XP.  It does not occur on GTK+.  
In talking with Silenio, this is not expected behaviour.  If doit is set to 
false, then the Traverse event should stop. 
 
The series of events our filter sees (on Windows XP): 
Alt+Shift+L (opens dialog) 
CR (closing dialog) 
CR 
CR 
Alt+Shift+L 
 
However, "Alt+Shift+L" was only pressed once. 
 
 
The fix for this bug is required before the fix for Bug 64598 can go in. 
 
 
Comment 13 Silenio Quarti CLA 2004-08-25 16:05:29 EDT
Ok, we talked again :-).

The behavior is different between GTK and Window because the 
combination "alt+shift+XXX" is not a mnemonic on GTK but it is on Windows. 
Comment 14 Douglas Pollock CLA 2004-08-26 10:35:06 EDT
This bug is fixed.  I will have to revisit Bug 64598 -- while paying attention 
to this possible problem. 
 
Comment 15 Douglas Pollock CLA 2005-05-31 11:02:15 EDT
Verified using the steps in comment #3 using 3.1 RC1.