Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365970 - Exception when table editing leads to UI hang
Summary: Exception when table editing leads to UI hang
Status: CLOSED DUPLICATE of bug 395381
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 17:28 EST by Brian de Alwis CLA
Modified: 2019-03-07 03:11 EST (History)
5 users (show)

See Also:


Attachments
Small test program that causes a hang (4.60 KB, application/octet-stream)
2011-12-07 17:28 EST, Brian de Alwis CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2011-12-07 17:28:46 EST
Created attachment 208076 [details]
Small test program that causes a hang

Version: 4.2.0 (for M4)
Build id: I20111205-2330
OS: MacOS X 10.7.2

In using the JFace TextCellEditor support, I discovered a means to cause a hang of the JVM when editing a table cell on MacOS X.  I'll attach a small test program in a moment to reproduce the hang.  (I've had two other strange hangs recently that I'm hoping can be traced to this same cause; this is the only reproducible hang.)

Steps to repeat:

1. Run the attached code snippet from a 4.2 image with JFace (it may occur on the 3.8; I haven't yet verified). This should pop up a little table viewer with 3 entries showing a key and a value.  Two of the entries have a value, and the third should be empty (it's actually null).
2. Click in the null value for the "c" item.
3. See the instance hang.

The problem is caused by an exception being raised (org.eclipse.core.runtime.AssertionFailedException), leading to the hang.

The stack at the point of assertion:

"Thread-1" daemon prio=5 tid=7facb3831000 nid=0x7fff7971f960 runnable [7fff634d8000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
        at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
        at org.eclipse.jface.viewers.TextCellEditor.doSetValue(TextCellEditor.java:228)
        at org.eclipse.jface.viewers.CellEditor.setValue(CellEditor.java:857)
        at org.eclipse.jface.viewers.EditingSupport.initializeCellEditorValue(EditingSupport.java:100)
        at org.eclipse.jface.viewers.ColumnViewerEditor.activateCellEditor(ColumnViewerEditor.java:195)
        at org.eclipse.jface.viewers.ColumnViewerEditor.handleEditorActivationEvent(ColumnViewerEditor.java:445)
        at org.eclipse.jface.viewers.ColumnViewer.triggerEditorActivationEvent(ColumnViewer.java:680)
        at org.eclipse.jface.viewers.ColumnViewer.handleMouseDown(ColumnViewer.java:664)
        at org.eclipse.jface.viewers.ColumnViewer.access$0(ColumnViewer.java:660)
        at org.eclipse.jface.viewers.ColumnViewer$1.mouseDown(ColumnViewer.java:89)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:191)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4129)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
        at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3975)
        at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4876)
        at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5227)
        at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
        at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
        at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1092)
        at org.eclipse.swt.widgets.Table.mouseDownSuper(Table.java:2004)
        at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1084)
        at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2528)
        at org.eclipse.swt.widgets.Table.mouseDown(Table.java:1966)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:5476)
        at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
        at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
        at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2095)
        at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2252)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:5540)
        at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
        at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4990)
        at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5139)
        at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
        at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3611)
        at testswt.HangBugTest.main(HangBugTest.java:139)


The stack once hung:

"Thread-1" daemon prio=5 tid=7facb3831000 nid=0x7fff7971f960 runnable [7fff634d9000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
        at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
        at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1092)
        at org.eclipse.swt.widgets.Table.mouseDownSuper(Table.java:2004)
        at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1084)
        at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2528)
        at org.eclipse.swt.widgets.Table.mouseDown(Table.java:1966)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:5476)
        at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
        at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
        at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2095)
        at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2252)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:5540)
        at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
        at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4990)
        at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5139)
        at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
        at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3611)
        at testswt.HangBugTest.main(HangBugTest.java:139)
Comment 1 Mauricio Bustamante CLA 2012-11-14 11:08:09 EST
I can confirm that this bug exist. My setup is:

SWT Version: 4.2.1
OS: MacOS X 10.8.2
Comment 2 kavitha Mising name CLA 2016-07-27 01:57:22 EDT
is it same as this issue here
https://bugs.eclipse.org/bugs/show_bug.cgi?id=431370
Comment 3 Lakshmi P Shanmugam CLA 2019-03-07 03:11:25 EST

*** This bug has been marked as a duplicate of bug 395381 ***