Bug 13736 - Internal errors with incremental find
Summary: Internal errors with incremental find
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Claude Knaus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 15689 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-12 19:06 EDT by John Arthorne CLA
Modified: 2002-08-20 09:07 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2002-04-12 19:06:48 EDT
Build 20020411

I can't reproduce this anymore, but I got into a state where every attempt to 
use incremental find, in any java editor, would cause an internal error.  
Shutting down and restarting Eclipse made the problem go away.  Here is the 
stack trace:

java.lang.NullPointerException
	at 
org.eclipse.ui.texteditor.IncrementalFindTarget.install(IncrementalFindTarget.ja
va:163)
	at 
org.eclipse.ui.texteditor.IncrementalFindTarget.beginSession(IncrementalFindTarg
et.java:120)
	at 
org.eclipse.ui.texteditor.IncrementalFindAction.run(IncrementalFindAction.java:7
5)
	at 
org.eclipse.ui.texteditor.RetargetTextEditorAction.run(RetargetTextEditorAction.
java:103)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:590)
	at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionCont
ributionItem.java:407)
	at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContribu
tionItem.java(Compiled Code))
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled 
Code))
	at 
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled 
Code))
	at 
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:819)
	at 
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:77
7)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:190)
	at org.eclipse.core.launcher.Main.run(Main.java:549)
	at org.eclipse.core.launcher.Main.main(Main.java:390)
Comment 1 Claude Knaus CLA 2002-04-16 10:51:02 EDT
This can only happen when the StyledText widget of the viewer is disposed. I'm 
not sure how it could get into that state.

John, do you remember which editor you were using when this occured?
Comment 2 John Arthorne CLA 2002-04-16 11:12:16 EDT
The error was definitely occuring in java editors.  I may have also had a text 
editor open in another perspective, but 99% of the time I'm just using java 
editors.  I haven't yet reproduced this, although I'm using incremental find 
quite often (excellent feature by the way!).
Comment 3 Claude Knaus CLA 2002-04-17 08:36:24 EDT
I added a guard against the NPE.

It's still not clear why I get an editor which was disposed. I am suspecting
that I'm not getting an IUpdate.update() for the incremental find action just
before run() is called. A workaround could be to call update() again inside
run(). It would be really good to have a reproducible case...
The same problem could occure in other actions like find/replace action, etc.
as well.

Decreasing priority, since it no longer throws an exception.
Comment 4 Claude Knaus CLA 2002-05-13 11:18:30 EDT
*** Bug 15689 has been marked as a duplicate of this bug. ***
Comment 5 Claude Knaus CLA 2002-08-20 09:07:31 EDT
closing, since I haven't seen any problems with incremental find since 2.0.
Please reopen, if necessary.