Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337561 - [JUnit] NPE in TestRunnerViewPart.getDisplay
Summary: [JUnit] NPE in TestRunnerViewPart.getDisplay
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 08:36 EST by Dani Megert CLA
Modified: 2019-11-21 10:26 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-02-18 08:36:13 EST
N20110217-2000.

!ENTRY org.eclipse.debug.core 4 120 2011-02-18 14:33:52.096
!MESSAGE An exception occurred during launch change notification.
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.getDisplay(TestRunnerViewPart.java:2023)
	at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.access$4(TestRunnerViewPart.java:2022)
	at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart$TestRunSessionListener.sessionAdded(TestRunnerViewPart.java:656)
	at org.eclipse.jdt.internal.junit.model.JUnitModel.notifyTestRunSessionAdded(JUnitModel.java:569)
	at org.eclipse.jdt.internal.junit.model.JUnitModel.addTestRunSession(JUnitModel.java:357)
	at org.eclipse.jdt.internal.junit.model.JUnitModel$JUnitLaunchListener.connectTestRunner(JUnitModel.java:132)
	at org.eclipse.jdt.internal.junit.model.JUnitModel$JUnitLaunchListener.launchChanged(JUnitModel.java:124)
	at org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.run(LaunchManager.java:447)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.notify(LaunchManager.java:428)
	at org.eclipse.debug.internal.core.LaunchManager.fireUpdate(LaunchManager.java:990)
	at org.eclipse.debug.core.Launch.fireChanged(Launch.java:388)
	at org.eclipse.debug.core.Launch.addProcess(Launch.java:351)
	at org.eclipse.debug.core.model.RuntimeProcess.<init>(RuntimeProcess.java:125)
	at org.eclipse.debug.core.DebugPlugin.newProcess(DebugPlugin.java:752)
	at org.eclipse.jdt.launching.AbstractVMRunner.newProcess(AbstractVMRunner.java:113)
	at org.eclipse.jdt.internal.launching.StandardVMRunner.run(StandardVMRunner.java:328)
	at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launch(JUnitLaunchConfigurationDelegate.java:174)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:925)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1129)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Markus Keller CLA 2011-02-18 13:28:42 EST
Can't reproduce.

Steps, special circumstances? Was it a PDE or a plain JUnit test?

Looks like the TestRunnerViewPart gets notified at the same time as the view is initialized. But I don't see how this can happen, since the TestRunSessionListener is only registered in createPartControl(..), and by that time, the view site should already be completely initialized.
Comment 2 Dani Megert CLA 2011-02-19 03:40:29 EST
It was a combination of terminate and launch plus closing the JUnit view in one of my 3 windows.
Comment 3 Eclipse Genie CLA 2019-11-20 16:52:17 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.