Summary: | NPE from compiler | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Jared Burns <jared_burns> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | 3.0 M4 | ||
Hardware: | PC | ||
OS: | Linux-GTK | ||
Whiteboard: |
Description
Jared Burns
2003-09-19 17:27:37 EDT
The following was in the log: !SESSION Sep 19, 2003 14:22:41.994 --------------------------------------------- java.version=1.4.1-rc java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Command-line arguments: -pdelaunch -data /home/jburns/runtime-workspace -feature org. eclipse.platform -dev bin -os linux -ws gtk -arch x86 -nl en_US -configuration file: /home/jburns/target/.metadata/.plugins/org.eclipse.pde. core/_home_jburns_runtime-workspace/platform.cfg -install file:/home/jburns/host/eclipse/ !ENTRY org.eclipse.ui.workbench 4 2 Sep 19, 2003 14:22:41.998 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.parser.Scanner.getNextToken(Scanner.java:829) at org.eclipse.jdt.core.JavaConventions.scannedIdentifier(JavaConventions.java:130) at org.eclipse.jdt.core.JavaConventions.validateIdentifier(JavaConventions.java:263) at org.eclipse.jdt.core.JavaConventions.validateCompilationUnitName(JavaConventions. java:182) at org.eclipse.jdt.internal.core.Util.isValidCompilationUnitName(Util.java:837) at org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:260) at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:895) at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:867) at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectMarkerRulerAction. getCompilationUnit(JavaSelectMarkerRulerAction.java:127) at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectMarkerRulerAction. getJavaAnnotationPosition(JavaSelectMarkerRulerAction.java:90) at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectMarkerRulerAction. update(JavaSelectMarkerRulerAction.java:78) at org.eclipse.ui.texteditor.AbstractRulerActionDelegate. update(AbstractRulerActionDelegate.java:112) at org.eclipse.ui.texteditor.AbstractRulerActionDelegate. setActiveEditor(AbstractRulerActionDelegate.java:84) at org.eclipse.ui.internal.EditorPluginAction.editorChanged(EditorPluginAction.java:65) at org.eclipse.ui.internal.EditorActionBuilder$EditorContribution. editorChanged(EditorActionBuilder.java:86) at org.eclipse.ui.internal.EditorActionBuilder$ExternalContributor. setActiveEditor(EditorActionBuilder.java:131) at org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:178) at org.eclipse.ui.internal.WorkbenchPage$2.run(WorkbenchPage.java:447) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1016) at org.eclipse.core.runtime.Platform.run(Platform.java:420) at org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:439) at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:2506) at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:2242) at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:334) at org.eclipse.ui.internal.EditorPane.requestActivation(EditorPane.java:136) at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:356) at org.eclipse.ui.internal.EditorWorkbook$2.widgetSelected(EditorWorkbook.java:178) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:948) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:972) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:957) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:827) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:1739) at org.eclipse.swt.custom.CTabFolder.onMouseDown(CTabFolder.java:1927) at org.eclipse.swt.custom.CTabFolder.access$4(CTabFolder.java:1919) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:201) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:948) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1872) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1652) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2037) at org.eclipse.ui.internal.Workbench.run(Workbench.java:2020) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:295) at org.eclipse.core.launcher.Main.run(Main.java:751) at org.eclipse.core.launcher.Main.main(Main.java:587) Could you please provide a test case? This is the code I was testing with, but I can't reproduce the problem. I swiped the contents of the main method except for the last line and hit ctrl+/ to comment it out (so the program would only print out the "at Grah..."). I then tried to save and got the error dialog ("save failed"). That's when I noticed the errors in the console and found the error in the log. public class Grah { String blah= "blah"; public static void main(String[] args) { System.out.println(args[0]); for (int i= 0; i < 10; i++) { System.out.println("la"); } new Grah().foo(); String grah= "grah "; String grah1= "grah "; System.err.print("at Grah.main(Grah.java:12)"); } public void foo() { System.out.println("foo"); blah= "dah"; } } Offending line in Scanner is: int offset = 0; Highly suspecting a VM bug... Please reopen if symptoms persist. |