Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 121892

Summary: [OLE] NullPE in Variant.<init>
Product: [Eclipse Project] Platform Reporter: Benjamin Pasero <bpasero>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact: Felipe Heidrich <eclipse.felipe>
Severity: normal    
Priority: P3 CC: grant_gayed, snorthov
Version: 3.2Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Stacktrace none

Description Benjamin Pasero CLA 2005-12-22 10:57:18 EST
From my users I received some logs that show a stacktrace like that:

java.lang.NullPointerException
	at org.eclipse.swt.ole.win32.Variant.<init>(Variant.java:98)
	at org.eclipse.swt.browser.Browser$2.handleEvent(Browser.java:295)
	at org.eclipse.swt.ole.win32.OleEventTable.sendEvent(OleEventTable.java:55)
	at org.eclipse.swt.ole.win32.OleEventSink.notifyListener(OleEventSink.java:144)
	at org.eclipse.swt.ole.win32.OleEventSink.Invoke(OleEventSink.java:119)
	at org.eclipse.swt.ole.win32.OleEventSink.access$1(OleEventSink.java:96)
	at org.eclipse.swt.ole.win32.OleEventSink$1.method6(OleEventSink.java:70)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
	at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method)
	at org.eclipse.swt.internal.ole.win32.IOleInPlaceObject.InPlaceDeactivate(IOleInPlaceObject.java:21)
	at org.eclipse.swt.ole.win32.OleClientSite.deactivateInPlaceClient(OleClientSite.java:524)
	at org.eclipse.swt.ole.win32.OleClientSite.onDispose(OleClientSite.java:825)
	at org.eclipse.swt.ole.win32.OleClientSite.access$1(OleClientSite.java:821)
	at org.eclipse.swt.ole.win32.OleClientSite$1.handleEvent(OleClientSite.java:125)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:884)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:908)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:889)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:710)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:614)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:713)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:614)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:713)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:395)

Sorry, I am not able to reproduce this overhere and dont have any Snippet, just wanted to make sure filing a Bug, because it seems to show up quite often since RSSOwl is using SWT 3.2 M3.

Ben
Comment 1 Benjamin Pasero CLA 2005-12-22 10:58:05 EST
Created attachment 32144 [details]
Stacktrace
Comment 2 Benjamin Pasero CLA 2006-02-05 16:26:56 EST
Looks like this is caused by the Browser being disposed but still receiving an DocumentComplete OLEEvent.

The Browser itself is listening for being disposed and explicitly sets OleAutomation field to NULL. But that field is used from the DocumentComplete event, to create a new Variant. That causes the NullPE.

Ben
Comment 3 Benjamin Pasero CLA 2006-02-05 16:33:00 EST
This feels a bit like Bug 45895.

Ben
Comment 4 Benjamin Pasero CLA 2006-03-08 02:54:40 EST
Any chance of getting this fixed for M6?

Ben
Comment 5 Veronika Irvine CLA 2006-03-08 10:41:38 EST
Grant,

I will look at adding an exception to Variant when it is called with a null argument.  Can you also look at why Browser is passing in null for auto in this case?
Comment 6 Benjamin Pasero CLA 2006-03-24 02:17:50 EST
+1 for M6 :)

Ben
Comment 7 Grant Gayed CLA 2006-03-29 16:59:30 EST
I've released a fix to HEAD that should ensure that the Browser won't do this.  Related Browser report is bug 121894.
Comment 8 Felipe Heidrich CLA 2009-08-13 10:01:51 EDT
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info.
Comment 9 Leo Ufimtsev CLA 2017-08-03 12:28:26 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 10 Eclipse Genie CLA 2020-04-06 19:39:58 EDT
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.