Sometimes a null pointer exception occurs during
opening a new tex editor or changing to an open one.
Nevertheless, the editor is opened correctly.
!ENTRY org.eclipse.core.runtime 4 2 Nov 16, 2004
17:29:16.925
!MESSAGE Problems occurred when invoking code from
plug-in: "org.eclipse.core.runtime".
!STACK 0
java.lang.NullPointerException
at
ish.ecletex.editors.tex.TeXOutline$TexContentProvider.parse_root(TeXOutline.java:682)
at
ish.ecletex.editors.tex.TeXOutline$TexContentProvider.parse(TeXOutline.java:242)
at
ish.ecletex.editors.tex.TeXOutline$TexContentProvider.inputChanged(TeXOutline.java:226)
at
org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:234)
at
org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1059)
at
ish.ecletex.editors.tex.TeXOutline.createControl(TeXOutline.java:780)
at
org.eclipse.ui.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:125)
at
org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:310)
at
org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:591)
at
org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:49)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
at
org.eclipse.core.runtime.Platform.run(Platform.java:747)
at
org.eclipse.ui.internal.PartListenerList.firePartActivated(PartListenerList.java:47)
at
org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:1370)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:2738)
at
org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:457)
at
org.eclipse.ui.internal.WorkbenchPage.closeEditor(WorkbenchPage.java:1020)
at
org.eclipse.ui.internal.WorkbenchPage.closeEditor(WorkbenchPage.java:959)
at
org.eclipse.ui.internal.EditorPane.doHide(EditorPane.java:95)
at
org.eclipse.ui.internal.PartStack.close(PartStack.java:339)
at
org.eclipse.ui.internal.EditorStack.close(EditorStack.java:238)
at
org.eclipse.ui.internal.PartStack$1.close(PartStack.java:74)
at
org.eclipse.ui.internal.presentations.DefaultPartPresentation$1.closeButtonPressed(DefaultPartPresentation.java:107)
at
org.eclipse.ui.internal.presentations.PaneFolder.notifyCloseListeners(PaneFolder.java:484)
at
org.eclipse.ui.internal.presentations.PaneFolder$3.close(PaneFolder.java:169)
at
org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2075)
at
org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:291)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:954)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2595)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2298)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
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:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:324)
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)
Logged In: YES
user_id=1160286
This happened reproducible with a text containing the frensh
accents accent aigu or accent grave. Rows containing these
characters where also not displayed correctly, also with the
standart eclipse editor. Perhaps a wrong character encoding.
Using the tex accents \',\:,... and restarting eclipse stopped
producing this error.
Logged In: YES
user_id=1160286
Accents/ wrong character encodings are not the sole reason
for this problem. This error is also caused with other files.
Logged In: YES
user_id=1160286
see also bug 1067459. Its probably the same
Logged In: YES
user_id=328016
Form the line number this bug has something todo with the
\include or \input macros. It is where the outline, looks
for includes to build up the outline tree. I think i found
the problem, but do you think you could send me any include
statements in the document that is causing the problem, and
if possible the actually file names that the includes are
referencing. (purely because it is legitimate tex to exclude
the tex file extension). Thanks for your help.
Logged In: YES
user_id=1160286
im not able to send the original document, but the save error
is caused by every include statement i think. creating a
document containing only \input{file} causes this error but
not the "change editor" problem
- copy the hole text in a new file within an ecletex editor
solves the "change editor" problem...
Logged In: YES
user_id=328016
Well i think it is fixed!? but as i could never replicate
it, i will have to wait for people to find out for me... the
fix will be in version 0.0.5
Logged In: YES
user_id=58845
I have a similar error message when opening/changing an
editor. I use etex version 0.0.4.
!SESSION 2005-03-25 19:10:51.214
-----------------------------------------------
eclipse.buildId=I20050219-1500
java.version=1.5.0_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=de_CH
Command-line arguments: -os linux -ws gtk -arch x86
!ENTRY org.eclipse.ui.workbench 4 2 2005-03-25 19:10:51.216
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
at
org.eclipse.jface.text.AbstractDocument.addPosition(AbstractDocument.java:330)
at
org.eclipse.jface.text.AbstractDocument.addPosition(AbstractDocument.java:348)
at
org.eclipse.jface.text.source.AnnotationModel.addPosition(AnnotationModel.java:315)
at
org.eclipse.jface.text.source.AnnotationModel.addAnnotation(AnnotationModel.java:278)
at
org.eclipse.jface.text.source.AnnotationModel.replaceAnnotations(AnnotationModel.java:256)
at
org.eclipse.jface.text.source.projection.ProjectionAnnotationModel.modifyAnnotations(ProjectionAnnotationModel.java:143)
at
ish.ecletex.editors.tex.TexFoldingStructureProvider.update(TexFoldingStructureProvider.java:368)
at
ish.ecletex.editors.tex.TeXOutline$TexContentProvider.parse(TeXOutline.java:244)
at
ish.ecletex.editors.tex.TeXOutline$TexContentProvider.inputChanged(TeXOutline.java:226)
at
org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:244)
at
org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1323)
at
ish.ecletex.editors.tex.TeXOutline.createControl(TeXOutline.java:780)
at
org.eclipse.ui.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:134)
at
org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:315)
at
org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:613)
at
org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:52)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1015)
at org.eclipse.core.runtime.Platform.run(Platform.java:757)
at
org.eclipse.ui.internal.PartListenerList.firePartActivated(PartListenerList.java:50)
at
org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:1500)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:2821)
at
org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:559)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2326)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2244)
at
org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage.java:2236)
at
org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2222)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2217)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:299)
at
org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:99)
at
org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:100)
at
org.eclipse.ui.views.navigator.OpenActionGroup.runDefaultAction(OpenActionGroup.java:120)
at
org.eclipse.ui.views.navigator.MainActionGroup.runDefaultAction(MainActionGroup.java:318)
at
org.eclipse.ui.views.navigator.ResourceNavigator.handleOpen(ResourceNavigator.java:658)
at
org.eclipse.ui.views.navigator.ResourceNavigator$6.open(ResourceNavigator.java:410)
at
org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:659)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1015)
at org.eclipse.core.runtime.Platform.run(Platform.java:757)
at
org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:657)
at
org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:876)
at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:975)
at
org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:243)
at
org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:238)
at
org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:277)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1009)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2728)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2427)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1612)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1578)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:293)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:333)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:150)
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.core.launcher.Main.invokeFramework(Main.java:268)
at org.eclipse.core.launcher.Main.basicRun(Main.java:260)
at org.eclipse.core.launcher.Main.run(Main.java:887)
at org.eclipse.core.launcher.Main.main(Main.java:871)
Logged In: YES
user_id=919480
I think I just fixed the second NPE-Bug, this one:
java.lang.NullPointerException at
org.eclipse.jface.text.AbstractDocument.addPosition(AbstractDocum
ent.java:330)
It happened, when TexFoldingStructureProvider.getPosition
returned null which happened, when that method created a
BadLocationException that was silently caught.
More concrete the exception happened when there was no new
line after the line containing
\end{document}
The fix will be in the next release, until then a workaround
is to insert an empty new line after \end{document}