| Summary: | [win32] "Cannot get count" error disposing shell | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Thomas Singer <eclipse> | ||||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | dmigowski, hjg.com.ar, manuel.steurer, niraj.modi | ||||||
| Version: | 4.4 | Keywords: | triaged | ||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=376213 | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
|
Description
Thomas Singer
I got this in SWT 4.6.2 when our app closed:
org.eclipse.swt.SWTError: Cannot get count [GetLastError=0x0]
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.widgets.Menu.getItems(Unknown Source)
at org.eclipse.swt.widgets.Menu.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
at org.eclipse.swt.widgets.MenuItem.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
at org.eclipse.swt.widgets.Menu.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
at org.eclipse.swt.widgets.MenuItem.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
at org.eclipse.swt.widgets.Menu.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
at org.eclipse.swt.widgets.Decorations.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1377)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
at org.eclipse.swt.widgets.Widget.dispose(Unknown Source)
at org.eclipse.swt.widgets.Decorations.dispose(Unknown Source)
at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737)
at org.eclipse.jface.window.Window.close(Window.java:335)
at org.eclipse.jface.window.ApplicationWindow.close(ApplicationWindow.java:307)
at de.ikoffice.gui.MainWindow.close(MainWindow.java:1686)
at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:741)
at org.eclipse.jface.window.Window$3.shellClosed(Window.java:687)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
...
Also, a few minutes later, because the app didn't close because of the exception:
org.eclipse.swt.SWTError: Cannot get count [GetLastError=0x579]
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.widgets.Menu.getItems(Unknown Source)
at org.eclipse.swt.widgets.Menu.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
at org.eclipse.swt.widgets.MenuItem.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
at org.eclipse.swt.widgets.Menu.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
at org.eclipse.swt.widgets.MenuItem.releaseChildren(Unknown Source)
at org.eclipse.swt.widgets.Widget.release(Unknown Source)
...
Occurs from time to time... maybe we should just skip releasing the children silently in this case, because the app is on its way to exit anyway.
(In reply to Daniel Migowski from comment #1) > I got this in SWT 4.6.2 when our app closed: > > org.eclipse.swt.SWTError: Cannot get count [GetLastError=0x0] > at org.eclipse.swt.SWT.error(Unknown Source) > at org.eclipse.swt.widgets.Menu.getItems(Unknown Source) Similar to bug 376213#c11, here GetMenuItemCount function fails but GetLastError() returns '0x0'(ERROR_SUCCESS) which stands for successful function call. So, it looks like some bug at native level is causing this confusion. Am not sure, what the correct behavior here either to throw error or to continue. I'm also seeing this error, this stacktrace occurred on a Windows 7 System: org.eclipse.swt.SWTError: Cannot get count [GetLastError=0x0] at org.eclipse.swt.SWT.error(SWT.java:4387) at org.eclipse.swt.widgets.Menu.getItems(Menu.java:873) at org.eclipse.swt.widgets.Menu.releaseChildren(Menu.java:1168) at org.eclipse.swt.widgets.Widget.release(Widget.java:811) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:446) at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:795) at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1290) at org.eclipse.swt.widgets.Widget.release(Widget.java:811) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:446) at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:448) at org.eclipse.swt.widgets.Shell.dispose(Shell.java:715) at org.eclipse.jface.window.Window.close(Window.java:335) at org.eclipse.jface.window.ApplicationWindow.close(ApplicationWindow.java:307) at org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchWindow.java:1780) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:730) at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:715) at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:879) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:877) at org.eclipse.jface.window.WindowManager.close(WindowManager.java:109) at org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1114) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1111) at org.eclipse.ui.internal.Workbench.access$15(Workbench.java:1040) at org.eclipse.ui.internal.Workbench$25.run(Workbench.java:1284) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1282) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1254) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:727) at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:715) at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:879) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:877) at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:741) at org.eclipse.jface.window.Window$3.shellClosed(Window.java:687) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:309) at org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1694) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4530) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541) ... SWT version for above stacktrace is the one from Eclipse 3.8.2, ie version '3836'. Created attachment 279601 [details]
Log when Eclipse hangs on closing
I'm experiencing this error quite often (but cannot reproduce) at closing. When it happens, the IDE usually hangs and I need to close the windows from the taskbar. Using Win7-64, Eclipse 2019-06 for RCP/RAP (Build id: 20190614-1200), Java 1.8.0_181 (64) Log attached in previous comment Still, when the IDE does not hang on close, still there are exceptions in the log almost always. I'm attaching in next comment several such logs, all occurring from merely opening the IDE, run some Java main() and closing. Created attachment 279604 [details]
Several logs with exceptions
These logs occurs by just opening my IDE, running a Java main() and closing. They (contrarily to the one I attached before) don't cause any message or visible problem.
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. The last times this bug occured in our customerbase (about 2000 client PCs) was on * 19.05.2021 * 26.02.2021 (twice) * 15.08.2020 * 21.07.2020 * 28.04.2020 * 23.01.2020 I assume there might be some kind of race condition where a user opened a menu, the event listener for that menu hangs, then the user clicks on the [X]-button of the app, the app alsoclosed from the taskbar, it becomes responsible again and all the different close mechanisms of windows and the event listener work together to make this happen. The bug has therefore not dissappeared, it is just very easy to reproduce. |