Bug 78447 - [projection] ProjectionViewer.handleVisibleDocument
Summary: [projection] ProjectionViewer.handleVisibleDocument
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2004-11-11 17:13 EST by Roman Ginis CLA
Modified: 2007-06-22 10:04 EDT (History)
0 users

See Also:


Attachments
Contains the full log of the session. (273.14 KB, text/plain)
2004-11-12 17:01 EST, Roman Ginis CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Ginis CLA 2004-11-11 17:13:14 EST
Suddenly in the middle of typing something the cursor stops and all the 
characters cosequently typed appear while pushing others to the right of the 
cursor.  To get correct output one must type words backwards.

I have this problem every 2-3 hours of work.  It happens on 3M8, 3.0, 3.0.1 
and 3.1 -- I've tried all of these.  It does not depend on the project or on 
the plugins -- For instiance it just happened with a clean 3.0.1 with no 
custom plugins at all.

The only way out is to close eclipse and restart. The following is the last 
error in the log.  Would be happy to make the entire log available.

!ENTRY org.eclipse.ui 4 0 Nov 11, 2004 16:43:37.362
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at 
org.eclipse.jface.text.source.projection.ProjectionViewer.handleVisibleDocument
Changed(ProjectionViewer.java(Compiled Code))
	at 
org.eclipse.jface.text.TextViewer$VisibleDocumentListener.documentChanged
(TextViewer.java(Compiled Code))
	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2
(AbstractDocument.java(Compiled Code))
	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged
(AbstractDocument.java(Inlined Compiled Code))
	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged
(AbstractDocument.java(Compiled Code))
	at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged
(AbstractDocument.java(Compiled Code))
	at 
org.eclipse.jface.text.projection.ProjectionDocument.fireDocumentChanged
(ProjectionDocument.java:768)
	at org.eclipse.jface.text.AbstractDocument.replace
(AbstractDocument.java(Compiled Code))
	at org.eclipse.jface.text.projection.ProjectionDocument.replace
(ProjectionDocument.java:551)
	at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange
(DefaultDocumentAdapter.java:238)
	at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java
(Compiled Code))
	at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java
(Compiled Code))
	at org.eclipse.swt.custom.StyledText.doBackspace(StyledText.java:2488)
	at org.eclipse.swt.custom.StyledText.invokeAction(StyledText.java:5482)
	at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java
(Compiled Code))
	at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java
(Inlined Compiled Code))
	at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java
(Compiled Code))
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java(Compiled Code))
	at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled 
Code))
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java(Inlined 
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.runUI(Workbench.java:1348)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:254)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:96)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:335)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:273)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:129)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:79)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:41)
	at java.lang.reflect.Method.invoke(Method.java:386)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
	at org.eclipse.core.launcher.Main.run(Main.java:704)
	at org.eclipse.core.launcher.Main.main(Main.java:688)

!ENTRY org.eclipse.ui 4 4 Nov 11, 2004 16:43:37.622
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 Nov 11, 2004 16:43:37.632
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at 
org.eclipse.jface.text.source.projection.ProjectionViewer.handleVisibleDocument
Changed(ProjectionViewer.java(Compiled Code))
	at 
org.eclipse.jface.text.TextViewer$VisibleDocumentListener.documentChanged
(TextViewer.java(Compiled Code))
	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2
(AbstractDocument.java(Compiled Code))
	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged
(AbstractDocument.java(Inlined Compiled Code))
	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged
(AbstractDocument.java(Compiled Code))
	at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged
(AbstractDocument.java(Compiled Code))
	at 
org.eclipse.jface.text.projection.ProjectionDocument.fireDocumentChanged
(ProjectionDocument.java:768)
	at org.eclipse.jface.text.AbstractDocument.replace
(AbstractDocument.java(Compiled Code))
	at org.eclipse.jface.text.projection.ProjectionDocument.replace
(ProjectionDocument.java:551)
	at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange
(DefaultDocumentAdapter.java:238)
	at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java
(Compiled Code))
	at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java
(Compiled Code))
	at org.eclipse.swt.custom.StyledText.doBackspace(StyledText.java:2488)
	at org.eclipse.swt.custom.StyledText.invokeAction(StyledText.java:5482)
	at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java
(Compiled Code))
	at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java
(Inlined Compiled Code))
	at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java
(Compiled Code))
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java(Inlined 
Compiled Code))
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java(Compiled Code))
	at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled 
Code))
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java(Inlined 
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.runUI(Workbench.java:1348)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:254)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:96)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:335)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:273)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:129)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:79)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:41)
	at java.lang.reflect.Method.invoke(Method.java:386)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
	at org.eclipse.core.launcher.Main.run(Main.java:704)
	at org.eclipse.core.launcher.Main.main(Main.java:688)
Comment 1 Dani Megert CLA 2004-11-12 02:23:19 EST
Please attach the full .log.

You write it in the summary but just to confirm you are using the Java editor to
edit a *.java file, right? Did you eventually install some other plug-ins that
might now be used to open *.java files?

>The only way out is to close eclipse and restart.
If you open another file (also try opening a simple text file with the text
editor) it writes backwards as well? If so, do error get written to .log again
in this case?

Do you have other languages installed? E.g. if you have bidi-language installed
this might happen. Normally under Windows when there's more than one language
installed there's a key board shortcut that activates (or switches) languages.
These shortcuts override all application shortcuts.
Comment 2 Dani Megert CLA 2004-11-12 02:24:37 EST
Bug 42868 and bug 43852 describe a similar problem.
Comment 3 Roman Ginis CLA 2004-11-12 17:01:11 EST
Created attachment 15843 [details]
Contains the full log of the session.

This is the full log are requested.
Comment 4 Roman Ginis CLA 2004-11-12 17:08:42 EST
>You write it in the summary but just to confirm you are using the Java editor to
>edit a *.java file, right? Did you eventually install some other plug-ins that
>might now be used to open *.java files?

Yes, I've seen this happen only in the .java editor.  I installed no plug-ins. 
I was able to reproduce this using 3M8, 3.0, 3.0.1 and 3.1M3  'clean' versions
directly from eclipse.org with no modifications or addons.

>Do you have other languages installed? E.g. if you have bidi-language installed
>this might happen. Normally under Windows when there's more than one language
>installed there's a key board shortcut that activates (or switches) languages.
>These shortcuts override all application shortcuts.

Yes, I have Cyrillic language turned on as an option under XP.  I never use it
with eclipse, but I just tried it and it causes no problems -- when I switch
using the keyboard combo (alt-shift) it works as expected -- cyrillic letters
appear in the editor.  Switch back works ok, the cursor works as expected and no
errors get added to the log.
Comment 5 Dani Megert CLA 2004-11-15 03:19:04 EST
>I was able to reproduce this using...
Can you give the steps?
Comment 6 Roman Ginis CLA 2004-11-15 19:27:20 EST
>>I was able to reproduce this using...
>Can you give the steps?

There are no special steps.  It just happens when I normally type in the editor.
 Since your last comment, I uninstalled the other language (so now only US
English is installed in XP), but it does not help.  I still get the problem.
Comment 7 Dani Megert CLA 2004-11-16 03:41:25 EST
It would be great if you could provide more information e.g. does it happen on
some special file or are you adding at a similar position in the file when it
happens? Did you install some tools that might get activated on a certain key
sequence?
Comment 8 Roman Ginis CLA 2004-12-01 16:33:29 EST
>It would be great if you could provide more information e.g. does it happen on
>some special file or are you adding at a similar position in the file when it
>happens? Did you install some tools that might get activated on a certain key
>sequence?

It happens on various files and in unrelated file positions.  There are no 
special tools installed -- default eclipse install.  Nothing gets activated on 
keystrokes -- I even disabled all languages leaving only English.
Comment 9 Dani Megert CLA 2005-06-04 11:25:49 EDT
.
Comment 10 Dani Megert CLA 2007-06-22 09:58:48 EDT
Get rid of deprecated state.
Comment 11 Dani Megert CLA 2007-06-22 10:04:13 EDT
.