Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352857

Summary: crash in org.eclipse.swt.internal.cocoa.OS.object_getInstanceVariable when redrawing TreeItem
Product: [Eclipse Project] Platform Reporter: Jaroslav Urban <jaroslav.urban>
Component: SWTAssignee: Lakshmi P Shanmugam <lshanmug>
Status: RESOLVED DUPLICATE QA Contact: Silenio Quarti <Silenio_Quarti>
Severity: critical    
Priority: P3 CC: lshanmug
Version: 3.6.2   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Code snippet to reproduce the crash
none
Crash report none

Description Jaroslav Urban CLA 2011-07-22 09:17:19 EDT
Build Identifier: Eclipse 3.6.2 (and newer)

In our product (plugin on top of Eclipse IDE) we're encountering crashes on OSX. I'll attach crash report and code snippet to reproduce. For some context, in our product we've seen the issue in 2 places so far:
- a TreeViewer with cell editors - after modifying the value of a cell editor and clicking on a different cell (without confirming first with ENTER) Eclipse crashes. This needs a few tries usually to get the crash. Implementation note - after changing the cell editor value we used to re-set the whole model of the TreeViewer. We found a workaround that doesn't re-set the whole model, but just calls refresh() on the underlying viewer.
- Outline (an ordinary GEF outline) - after modifying an entity in the outline (e.g. after double clicking on it and changing its name in a dialog) Eclipse crashes sometimes. In this case we're using the usual GEF outline, so we don't have everything under control and we don't have a workaround.

Important - this happens only on OSX with Eclipse 3.6.2 and newer (tried 3.7). We weren't able to reproduce this on Eclipse 3.6.1 or older. It happens on both 32 and 64 bit.

We're not sure if it's a duplicate of bug 326311 - the crash reports end with the same call, but in our case it's not related to expanding/collapsing of tree items.

Thank you for assistance!
Jaro

Reproducible: Always

Steps to Reproduce:
1. run the code snippet
2. click on the TreeItem (there's just one)
3. crash
Comment 1 Jaroslav Urban CLA 2011-07-22 09:19:12 EDT
Created attachment 200180 [details]
Code snippet to reproduce the crash
Comment 2 Jaroslav Urban CLA 2011-07-22 09:20:58 EDT
Created attachment 200181 [details]
Crash report
Comment 3 Jaroslav Urban CLA 2011-07-22 10:06:59 EDT
Also, from our findings it seems that what's triggering the crash is the Cocoa SWT Tree implementation that tries to redraw a disposed tree item.
Comment 4 Lakshmi P Shanmugam CLA 2011-07-25 09:15:25 EDT
Thanks for the reproducible testcase. The bug looks similar to Bug 326311.
Comment 5 Lakshmi P Shanmugam CLA 2011-08-17 11:24:29 EDT
The patch in Bug 326311 fixes this crash too, hence marking this as duplicate.

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