Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342527 - ScopedPreferenceStoreCore NPE while shutting down Workbench
Summary: ScopedPreferenceStoreCore NPE while shutting down Workbench
Status: RESOLVED WORKSFORME
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: 1.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 05:22 EDT by Benjamin Wolff CLA
Modified: 2012-01-03 08:45 EST (History)
0 users

See Also:


Attachments
RAP example that demonstrates the NPE error on shutdown (14.48 KB, application/zip)
2011-04-12 05:22 EDT, Benjamin Wolff CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Wolff CLA 2011-04-12 05:22:46 EDT
Created attachment 193017 [details]
RAP example that demonstrates the NPE error on shutdown

When shutting down a RAP application with a "close" in the OSGi console, an NPE is thrown.

I'm using the current CVS HEAD RAP 1.4 bundles, current Eclipse 3.7 Milestone and Eclipse 1.4 M6 target for the other bundles.

I attached a simple RAP project that can be imported into Eclipse. I can reliably reproduce this error everytime I start this small example.

This error does not seem to occur with the bundles from the 1.4 M6 target platform!

Stacktrace:

2011-04-12 11:14:27.592:WARN:/:ERROR:  Exception while disposing shell: Shell {RAP with a View}
java.lang.NullPointerException
	at org.eclipse.ui.preferences.ScopedPreferenceStoreCore.disposePreferenceStoreListener(ScopedPreferenceStoreCore.java:821)
	at org.eclipse.ui.preferences.ScopedPreferenceStoreCore.removePropertyChangeListener(ScopedPreferenceStoreCore.java:570)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.removePropertyChangeListener(ScopedPreferenceStore.java:676)
	at org.eclipse.ui.internal.preferences.PreferenceStoreAdapter.detachListener(PreferenceStoreAdapter.java:46)
	at org.eclipse.ui.internal.preferences.PropertyMapAdapter.dispose(PropertyMapAdapter.java:59)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.presentationDisposed(TabbedStackPresentation.java:352)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.access$3(TabbedStackPresentation.java:351)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$2.widgetDisposed(TabbedStackPresentation.java:195)
	at org.eclipse.swt.events.DisposeEvent.dispatchToObserver(DisposeEvent.java:64)
	at org.eclipse.rwt.internal.events.Event.processEvent(Event.java:44)
	at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.java:163)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:772)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820)
	at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1092)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:774)
	at org.eclipse.swt.widgets.Display.disposeShells(Display.java:725)
	at org.eclipse.swt.widgets.Display.release(Display.java:691)
	at org.eclipse.swt.graphics.Device.dispose(Device.java:282)
	at org.eclipse.rwt.internal.lifecycle.UIThread.processShutdown(UIThread.java:159)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:113)
	at java.lang.Thread.run(Thread.java:662)
	at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:102)
Comment 1 Ivan Furnadjiev CLA 2011-04-13 03:47:13 EDT
Ben, I can't reproduce it with current CVS HEAD and your example project. Could you confirm that it's still reproducible for you? I've just fixed the bug 342516 (execute dispose code twice in some cases). Maybe related, but not sure.
Comment 2 Benjamin Wolff CLA 2011-04-13 17:39:20 EDT
I can still produce it with the m6 target bundles and the CVS bundles.
- Start application
- When the application has started in the browser -> "close" in console

I'm using Ubuntu 10.10 64-Bit with Sun Java 1.6.0_24. As we've seen in Bug 336852, those exceptions can vary from setup to setup and sometimes it even seems that the system may be in a bad mood ;).

The odd thing is, that this error does not occur with my main application any more. Although I'm using the same RAP and Eclipse/Equinox bundles.

When I find the time I can try so setup an Eclipse environment in my Windows VM and do some further investigations.
Comment 3 Ivan Furnadjiev CLA 2012-01-03 08:45:35 EST
Ben, your test project still works for me with 1.5M4 (CVS HEAD). I will close this bug as WORKSFORME. Please reopen if the problem persists and you have more information to share.