Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 483379 - [Cocoa] [10.11] UI Freezes after double click on separator in Table header
Summary: [Cocoa] [10.11] UI Freezes after double click on separator in Table header
Status: CLOSED DUPLICATE of bug 434393
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4.2   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 482454
  Show dependency tree
 
Reported: 2015-12-01 09:08 EST by Milan Vahala CLA
Modified: 2016-05-30 04:24 EDT (History)
2 users (show)

See Also:


Attachments
Snippet to reproduce bug (2.14 KB, application/octet-stream)
2015-12-01 09:08 EST, Milan Vahala CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Vahala CLA 2015-12-01 09:08:32 EST
Created attachment 258392 [details]
Snippet to reproduce bug

Reproducible on Mac Os X El Capitan 10.11.1. Add Table listener to SWT.MeasureItem. Double-click on separator in table header to resize column to minimal size. 

OS.objc_msgSendSuper(objc_super, long, long) method in main thread doesn't finish. 
Stack trace:

OS.objc_msgSendSuper(objc_super, long, long) line: not available [native method]	
Table(Widget).callSuper(long, long, long) line: 221	
Table(Widget).mouseDownSuper(long, long, long) line: 1101	
Table.mouseDownSuper(long, long, long) line: 2011	
Table(Widget).mouseDown(long, long, long) line: 1093	
Table(Control).mouseDown(long, long, long) line: 2563	
Table.mouseDown(long, long, long) line: 1983	
Display.windowProc(long, long, long) line: 5638	
OS.objc_msgSendSuper(objc_super, long, long) line: not available [native method]	
Shell(Widget).callSuper(long, long, long) line: 221	
Shell(Widget).windowSendEvent(long, long, long) line: 2105	
Shell.windowSendEvent(long, long, long) line: 2329	
Display.windowProc(long, long, long) line: 5702	
OS.objc_msgSendSuper(objc_super, long, long) line: not available [native method]	
Display.applicationSendEvent(long, long, long) line: 5139	
Display.applicationProc(long, long, long) line: 5288	
OS.objc_msgSend(long, long, long) line: not available [native method]	
NSApplication.sendEvent(NSEvent) line: 128	
Display.readAndDispatch() line: 3666	
Snippet38.main(String[]) line: 66
Comment 1 Milan Vahala CLA 2015-12-02 03:32:51 EST
If SWT.MeasureItem listener is used to set Table row height there is workaround to avoid the freeze. Remove the SWT.MeasureItem listener after handleEvent(...) is called for a first time (and height is set) from the table (instance must be final).

final Table table = new Table (shell, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
.
.
.
table.addListener(SWT.MeasureItem, new Listener() {
	@Override
	public void handleEvent(Event event) {
		event.height = 40;
		table.removeListener(SWT.MeasureItem, this);
	}
});
Comment 2 Lakshmi P Shanmugam CLA 2015-12-04 03:03:33 EST
I'm unable to reproduce the freeze with 4.4.2 and 4.6 master.
Can you try with the latest I-build and see if you can still reproduce the problem -- http://download.eclipse.org/eclipse/downloads/drops4/I20151203-1230/download.php?dropFile=eclipse-SDK-I20151203-1230-macosx-cocoa-x86_64.tar.gz
Comment 3 Milan Vahala CLA 2015-12-10 06:28:50 EST
Can't be reproduced with SWT from the I-build only with SWT from 4.4.2.
org.eclipse.swt.cocoa.macosx.x86_64_3.103.2.v20150203-1351.jar: freeze 
org.eclipse.swt.cocoa.macosx.x86_64_3.105.0.v20151202-1903.jar: no freeze

I can't reproduce the bug on some older Mac OS X versions.
Mac Os X 10.11.1: freeze
Mac Os X 10.8.5: no freeze
Comment 4 Lakshmi P Shanmugam CLA 2015-12-16 04:40:58 EST
(In reply to Milan Vahala from comment #3)
> Can't be reproduced with SWT from the I-build only with SWT from 4.4.2.
> org.eclipse.swt.cocoa.macosx.x86_64_3.103.2.v20150203-1351.jar: freeze 
> org.eclipse.swt.cocoa.macosx.x86_64_3.105.0.v20151202-1903.jar: no freeze
> 
> I can't reproduce the bug on some older Mac OS X versions.
> Mac Os X 10.11.1: freeze
> Mac Os X 10.8.5: no freeze

Eclipse 4.4 stream is not under development anymore. Does the problem happen with Eclipse 4.5.1 or 4.5.2 M-builds? If yes, we can try to identify the commit that fixed the problem and backport it for 4.5.2.

Eclipse 4.5.1 downloads - http://download.eclipse.org/eclipse/downloads/drops4/R-4.5.1-201509040015/
Eclipse 4.5.2 M-builds - http://download.eclipse.org/eclipse/downloads/drops4/M20151209-1000/
Comment 5 Andreas Buchen CLA 2015-12-27 04:28:49 EST
(In reply to Lakshmi Shanmugam from comment #4)
> Eclipse 4.4 stream is not under development anymore. Does the problem happen
> with Eclipse 4.5.1 or 4.5.2 M-builds? If yes, we can try to identify the
> commit that fixed the problem and backport it for 4.5.2.

I can reproduce this with
  Mac Os X 10.11.2
  org.eclipse.swt.cocoa.macosx.x86_64_3.104.1.v20150825-0743.jar
which I believe is Eclipse 4.5.1

BTW, is there a way to prevent the double-click to resize the column? I am using SWT.MeasureItem listener to calculate the width, so removing it upon first measurement is not an option.
Comment 6 Lakshmi P Shanmugam CLA 2016-01-27 06:00:23 EST
Can you please try with the 4.5.2 candidate build?
I suspect that the freeze may be due to Bug 434393, which has been fixed in the 4.5.2 stream.
(http://download.eclipse.org/eclipse/downloads/drops4/M20160120-1000/)
Comment 7 Lakshmi P Shanmugam CLA 2016-03-28 06:13:14 EDT
From comment#3, this bug doesn't happen in 4.6 stream. Also, looks like the problem mentioned was caused by Bug 434393 which is fixed in 4.5.2.

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