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

Bug 75145

Summary: [Workbench] Event Problems with SWT_AWT.newFrame()
Product: [Eclipse Project] Platform Reporter: Johannes Koller <johannes_koller>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P5 CC: billy.biggs, Silenio_Quarti
Version: 3.0Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Simpel testcase and error log none

Description Johannes Koller CLA 2004-09-28 04:03:36 EDT
Hi, I am using Eclipse 3 M9 build I200405211200 and I have problems with
connecting swt with swing. 
I wrote a plugin for eclipse with swing components,
most of the time it works fine but there seem to be errors in the event handling
of the SWT_AWT class, 
the added eventlistener are not removed on dispose of the AWT Frame, 
so eclipse continues sending events to the frame, this produce errors like this:

java.lang.NullPointerException
	at org.eclipse.ui.internal.EditorManager$7.run(EditorManager.java:801)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:608)
	at org.eclipse.core.runtime.Platform.run(Platform.java:758)
	at org.eclipse.ui.internal.EditorManager.busyRestoreEditor(EditorManager.java:775)
	at org.eclipse.ui.internal.EditorManager$6.run(EditorManager.java:768)
	(...)
!ENTRY org.eclipse.ui 4 4 Sep 27, 2004 12:58:50.515
!MESSAGE Unhandled event loop exception
!ENTRY org.eclipse.ui 4 0 Sep 27, 2004 12:58:50.531
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at
org.eclipse.ui.internal.WorkbenchWindow$5.shellDeactivated(WorkbenchWindow.java:1861)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
	(...)
erException
!STACK 0
java.lang.NullPointerException
	at
org.eclipse.ui.internal.WorkbenchWindow$5.shellActivated(WorkbenchWindow.java:1844)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:163)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
	(...)

and sometimes eclipse crashes completely. With Eclipse version 3.1 M1 the errors
dont occur in the error log, 
but eclipse sometimes crashes too.

-johannes
Comment 1 Johannes Koller CLA 2004-09-28 04:07:09 EDT
Created attachment 14828 [details]
Simpel testcase and error log

Simple testcase for eclipse 3 M9
Comment 2 Silenio Quarti CLA 2004-09-28 12:20:53 EDT
This looks like a bug in UI. Moving for comment.
Comment 3 Tod Creasey CLA 2007-06-14 11:25:17 EDT
There are currently no plans to work on this although we would be happy to review a patch
Comment 4 Eclipse Webmaster CLA 2019-09-06 16:18:02 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.

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.
Comment 5 Eclipse Genie CLA 2021-09-09 19:19:33 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.