Bug 35087 - NPE while importing plug-ins
Summary: NPE while importing plug-ins
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-14 22:20 EST by Darin Wright CLA
Modified: 2003-03-17 17:19 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2003-03-14 22:20:16 EST
build 20030313

I was importing some binary plug-ins. I had a class file editor open along with 
several compilation unit editors. The progress dialog disappeared, but the 
wizard remained. When I looked in my log I found this:

!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 Mar 14, 2003 21:13:01.395
!MESSAGE Failed to execute runnable (java.lang.NullPointerException)
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable 
(java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:2320)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java(Compiled Code))
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block
(ModalContext.java(Compiled Code))
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block
(ModalContext.java(Compiled Code))
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block
(ModalContext.java(Compiled Code))
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:261)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:758)
	at 
org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizard.performFinish
(PluginImportWizard.java:145)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed
(WizardDialog.java:608)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:321)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.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.jface.window.Window.runEventLoop(Window.java(Compiled 
Code))
	at org.eclipse.jface.window.Window.open(Window.java:563)
	at org.eclipse.ui.actions.ImportResourcesAction.run
(ImportResourcesAction.java:96)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:456)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java(Compiled Code))
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java(Compiled Code))
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.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:1385)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
	at org.eclipse.core.launcher.Main.run(Main.java:703)
	at org.eclipse.core.launcher.Main.main(Main.java:539)
!ENTRY org.eclipse.ui 4 4 Mar 14, 2003 21:13:02.136
!MESSAGE 
*** Stack trace of contained exception ***
!ENTRY org.eclipse.ui 4 0 Mar 14, 2003 21:13:02.136
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.core.SourceMapper.mapSource
(SourceMapper.java:1036)
	at org.eclipse.jdt.internal.core.ClassFile.openBuffer
(ClassFile.java:407)
	at org.eclipse.jdt.internal.core.Openable.getBuffer(Openable.java:193)
	at org.eclipse.jdt.internal.core.ClassFile.getSourceRange
(ClassFile.java:291)
	at 
org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.probeInputForSource
(ClassFileEditor.java:561)
	at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.doSetInput
(ClassFileEditor.java:500)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInput
(AbstractTextEditor.java:2337)
	at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor$4.run
(ClassFileEditor.java:617)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java(Compiled Code))
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java(Compiled Code))
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block
(ModalContext.java(Compiled Code))
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block
(ModalContext.java(Compiled Code))
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block
(ModalContext.java(Compiled Code))
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:261)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:758)
	at 
org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizard.performFinish
(PluginImportWizard.java:145)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed
(WizardDialog.java:608)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:321)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.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.jface.window.Window.runEventLoop(Window.java(Compiled 
Code))
	at org.eclipse.jface.window.Window.open(Window.java:563)
	at org.eclipse.ui.actions.ImportResourcesAction.run
(ImportResourcesAction.java:96)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:456)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java(Compiled Code))
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java(Compiled Code))
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.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:1385)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
	at org.eclipse.core.launcher.Main.run(Main.java:703)
	at org.eclipse.core.launcher.Main.main(Main.java:539)
Comment 1 Jerome Lanneluc CLA 2003-03-17 06:05:29 EST
Code at line 1036 of SourceMapper.java cannot throw a NPE:

public void mapSource(IType type, char[] contents) {
  this.mapSource(type, contents, null); // line 1036
}

Is it another case of jit problem with SR2?
Comment 2 Darin Wright CLA 2003-03-17 09:45:18 EST
Could be, not sure that I can reproduce the problem.
Comment 3 Philipe Mulet CLA 2003-03-17 15:02:12 EST
Darin, do you confirm you were running JRE SR2 at the time it occurred ?
Comment 4 Darin Wright CLA 2003-03-17 15:05:07 EST
Yes, I was running SR2.
Comment 5 Philipe Mulet CLA 2003-03-17 17:19:59 EST
Closing as VM bug