Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 208157 - [typing] NPE from default position updater
Summary: [typing] NPE from default position updater
Status: RESOLVED DUPLICATE of bug 150934
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-30 19:53 EDT by Jared Burns CLA
Modified: 2007-12-20 02:36 EST (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 Jared Burns CLA 2007-10-30 19:53:32 EDT
My steps:
1. Create a new text file in a simple unshared project.
2. Paste in a large block of XML and save.
3. Insert a newline at the end of the file and save.
4. Undo. The following NPE was logged.

I wasn't using the Find/Replace dialog at this point, though I had been using it earlier.

Also, besides the stack trace entry, there was a separate entry in the log which was very strange. It was just the message "Abnormal Workbench Condition" with the string "java.lang.NullPointerException" with no stack trace.

java.lang.NullPointerException
at org.eclipse.jface.text.DefaultPositionUpdater.update(DefaultPositionUpdater.java:233)
at org.eclipse.jface.text.AbstractDocument.updatePositions(AbstractDocument.java:1133)
at org.eclipse.jface.text.AbstractDocument.updateDocumentStructures(AbstractDocument.java:644)
at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:720)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1081)
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:147)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1091)
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:133)
at org.eclipse.jface.text.FindReplaceDocumentAdapter.findReplace(FindReplaceDocumentAdapter.java:185)
at org.eclipse.jface.text.FindReplaceDocumentAdapter.replace(FindReplaceDocumentAdapter.java:278)
at org.eclipse.jface.text.TextViewer$FindReplaceTarget.replaceSelection(TextViewer.java:800)
at org.eclipse.ui.texteditor.FindReplaceTarget.replaceSelection(FindReplaceTarget.java:141)
at org.eclipse.ui.texteditor.FindReplaceDialog.replaceSelection(FindReplaceDialog.java:822)
at org.eclipse.ui.texteditor.FindReplaceDialog.performReplaceSelection(FindReplaceDialog.java:1297)
at org.eclipse.ui.texteditor.FindReplaceDialog.access$28(FindReplaceDialog.java:1286)
at org.eclipse.ui.texteditor.FindReplaceDialog$2.widgetSelected(FindReplaceDialog.java:314)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Comment 1 Dani Megert CLA 2007-10-31 04:22:12 EDT
Which build?
Which editor? I assume the text editor.

I cannot reproduce using your steps with plain Eclipse SDK I20071030-0010 and actually those steps can never map to the posted .log entry ;-)

Can you still reproduce? If so, please post the full .log and the corresponding steps. Thanks.
Comment 2 Dani Megert CLA 2007-12-20 02:36:16 EST

*** This bug has been marked as a duplicate of bug 150934 ***