Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364313 - Right Click will stop working, with a NegativeArraySizeException
Summary: Right Click will stop working, with a NegativeArraySizeException
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 370041 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-21 07:27 EST by Danny Staple CLA
Modified: 2018-01-15 16:28 EST (History)
6 users (show)

See Also:


Attachments
Full Log with same issue at end. (157.06 KB, text/plain)
2011-11-21 12:38 EST, Danny Staple CLA
no flags Details
JVM crash log (92.16 KB, text/x-log)
2011-11-22 14:12 EST, Danny Staple CLA
no flags Details
Another crash log (255.50 KB, text/x-log)
2012-04-11 11:19 EDT, Danny Staple CLA
no flags Details
hs_error_log to accompany crash log (127.06 KB, text/x-log)
2012-04-11 11:20 EDT, Danny Staple CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Staple CLA 2011-11-21 07:27:47 EST
Build Identifier: M20110909-1335

Using Eclipse with Pydev and egit. Sometimes right clicking on an editor pane will no longer summon the right click menu, and this will persist for the session on that pane. Only closing it will make it go away.

This is occurring pretty regularly, but not every time. More than once a day.

eclipse.buildId=M20110909-1335
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

Error
Mon Nov 21 12:21:28 GMT 2011
Unhandled event loop exception

java.lang.NegativeArraySizeException
	at org.eclipse.swt.widgets.Menu.getItems(Menu.java:498)
	at org.eclipse.jface.action.MenuManager.getMenuItems(MenuManager.java:693)
	at org.eclipse.jface.action.MenuManager.update(MenuManager.java:782)
	at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:474)
	at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:469)
	at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:495)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:247)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1263)
	at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:199)
	at org.eclipse.swt.widgets.Display.runPopups(Display.java:3629)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3199)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)





Reproducible: Always

Steps to Reproduce:
1. Install pydev
2. Install egit
3. Have a project checked into Git.
4. Open a python file.
5. Interact a few times with the menu, seems that git/team related items more often do this.
6. Eventually the right click menu will stop appearing in the pane (eclipse has occasionally frozen my whole UI, or java bombs out here, but that is less often).
Comment 1 Remy Suen CLA 2011-11-21 08:59:36 EST
May be a duplicate of bug 321554 although this is Linux.
Comment 2 Felipe Heidrich CLA 2011-11-21 11:04:56 EST
(In reply to comment #1)
> May be a duplicate of bug 321554 although this is Linux.

There is some confusion between linux and window in bug 321554,
nevertheless this comment seems to be in the right track https://bugs.eclipse.org/bugs/show_bug.cgi?id=321554#c8

Arun, please investigate.
Comment 3 Felipe Heidrich CLA 2011-11-21 11:22:02 EST
(In reply to comment #2)
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=321554#c8

If this comment is correct, that means imSeparator and imItem are set but not inserted in the handle. Please check for:
- imSeparator and imItem are being created and not added to handle
- imSeparator and imItem are being deleted and not set to null
- all children are being deleted and imSeparator and imItem not set to null
Comment 4 Danny Staple CLA 2011-11-21 12:38:40 EST
Created attachment 207319 [details]
Full Log with same issue at end.

I've seen the same stack trace now when closing my workbench. I've posted the .log file from my .metadata as it may hold some useful traces for a developer.
Comment 5 Danny Staple CLA 2011-11-22 14:12:55 EST
Created attachment 207381 [details]
JVM crash log

On a right click this time - I saw a JVM crash. JVM Log attached. There was also a stack trace in the Eclipse log at about the same time - but it is line for line as above.
Comment 6 Grant Gayed CLA 2012-02-09 11:37:39 EST
*** Bug 370041 has been marked as a duplicate of this bug. ***
Comment 7 Danny Staple CLA 2012-03-22 13:38:41 EDT
This - or something related to it has actually locked up my whole desktop to the extent that no other items were able to receive mouse events, and I've had to switch to one of the text VT's to kill the Eclipse process to get my UI back. I am of course assuming it is related, and I am not seeing a crash log in the terminal I run Eclipse from.
Comment 8 Paul Webster CLA 2012-03-22 13:44:03 EDT
(In reply to comment #7)
> This - or something related to it has actually locked up my whole desktop to
> the extent that no other items were able to receive mouse events, and I've had
> to switch to one of the text VT's to kill the Eclipse process to get my UI
> back. I am of course assuming it is related, and I am not seeing a crash log in
> the terminal I run Eclipse from.

Were you debugging?  a breakpoint in a menu SWT.Selection event, for example, can lock up your entire X session (and force you to kill eclipse from a different VT)

PW
Comment 9 Danny Staple CLA 2012-03-22 15:46:15 EDT
I wasn't debugging, however, I was using pydev each time it locked up completely, and when doing a ps -ef | grep eclipse, a pydev process for python completion server I think was running.
I'll try and find out more the next time I see it- it is happening every couple of days now, so shouldn't be hard to reproduce (I'll never see it again after saying that.. ;) ).
Comment 10 Danny Staple CLA 2012-03-26 06:10:45 EDT
I've raised the UI locking as a new issue - #375301. It may be related, but there is no guarantee.
Comment 11 Danny Staple CLA 2012-04-11 11:19:47 EDT
Created attachment 213854 [details]
Another crash log

Again today - earlier in the day, right clicks stopped working. After closing and reopening eclipse, an hour or so later a right click on a project caused the JVM to crash.
I've attached the meta data log.

The crash also came with this:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f681d6e856c, pid=10407, tid=140085239932672
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libgobject-2.0.so.0+0x3356c]  __float128+0x3c
#
# An error report file with more information is saved as:
# /home/stapled/git/HudsonConfig/tests/hs_err_pid10407.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Adn the dialog: "An error has occurred. See the log file
/home/stapled/pythonworkspace/.metadata/.log."

I'll add the hs error log too.
Comment 12 Danny Staple CLA 2012-04-11 11:20:26 EDT
Created attachment 213855 [details]
hs_error_log to accompany crash log
Comment 13 Danny Staple CLA 2012-04-11 11:21:45 EDT
Since this seems to be associated with crashes - bumping to at least major.
Comment 14 Arun Thondapu CLA 2014-04-03 09:22:13 EDT
Is this bug still reproducible with a recent version of eclipse like Kepler (4.3) or the Luna (4.4) milestone builds?
Comment 15 Alexander Kurtakov CLA 2018-01-15 16:28:06 EST
No reply in years. Resolving.