Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 153974 - SWTError: Item not added
Summary: SWTError: Item not added
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 174636 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-15 15:35 EDT by Rutger Ovidius CLA
Modified: 2022-01-29 17:33 EST (History)
3 users (show)

See Also:


Attachments
stack (7.06 KB, text/plain)
2008-05-12 17:31 EDT, Ryan Fong CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rutger Ovidius CLA 2006-08-15 15:35:42 EDT
SWT 3232

Don't know how to reproduce it, but here is a stack trace anyway.  

org.eclipse.swt.SWTError: Item not added
        at org.eclipse.swt.SWT.error(SWT.java:3400)
        at org.eclipse.swt.SWT.error(SWT.java:3297)
        at org.eclipse.swt.SWT.error(SWT.java:3268)
        at org.eclipse.swt.widgets.Widget.error(Widget.java:435)
        at org.eclipse.swt.widgets.Menu.createItem(Menu.java:484)
        at org.eclipse.swt.widgets.MenuItem.<init>(MenuItem.java:129)
        at org.eclipse.jface.action.ActionContributionItem.fill(ActionContributionItem.java:267)
        at org.eclipse.jface.action.MenuManager.update(MenuManager.java:627)
        at org.eclipse.jface.action.MenuManager.update(MenuManager.java:549)
        at org.eclipse.jface.action.MenuManager.fill(MenuManager.java:232)
        at org.eclipse.jface.action.MenuManager.update(MenuManager.java:627)
        at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:373)
        at org.eclipse.jface.action.MenuManager.access$000(MenuManager.java:37)
        at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:386)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:117)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:933)
        at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:3556)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:3272)
        at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1539)
        at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025)
        at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method)
        at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:225)
        at org.eclipse.swt.widgets.Display.runPopups(Display.java:3374)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2962)
Comment 1 Steve Northover CLA 2006-08-17 13:53:04 EDT
This can happen when too many menus are creates (ie. you leak).  You could try hacking the constructor for Menu and Menu.releaseHandle() to count the number of menus created and disposed.
Comment 2 Rutger Ovidius CLA 2006-08-19 15:50:49 EDT
I did as you proposed, but nothing is leaking according to this count.

I don't experience the problem but it was reported to me so I'm not sure how to discover the real cause.  They have experienced it many times.

I suppose it could be more helpful if SWT used GetLastError() on win32 and appended the real error to all SWTErrors (FormatMessage) which seem rather opaque at the moment.
Comment 3 Steve Northover CLA 2007-02-19 12:13:29 EST
*** Bug 174636 has been marked as a duplicate of this bug. ***
Comment 4 Steve Northover CLA 2007-02-19 13:20:16 EST
Hmmm ... how about using Task Manager to track Handles, User Objects and GDI Objects.  Do any of these grow without bounds?
Comment 5 Ryan Fong CLA 2008-05-12 17:31:38 EDT
Created attachment 99826 [details]
stack

eclipse.buildId=I20070625-1500
Eclipse Java 3.3.0 on Win XP

One of our developers repeatedly encounters this SWTError during the day.  There are two variations of it in this log.  He says it happens frequently in the Java Debug perspective when popping up context menus.
Comment 6 Eclipse Webmaster CLA 2019-09-06 15:31:19 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 7 Eclipse Genie CLA 2022-01-29 17:33:45 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. 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.