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

Bug 321929

Summary: SWT crash on Linux -- segfault in after exception in IContributionItem fill method
Product: [Eclipse Project] Platform Reporter: Roland Gunther <rgunther>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, remy.suen, Silenio_Quarti
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
example that demonstrates the crash
none
hs_err crash log none

Description Roland Gunther CLA 2010-08-05 17:51:36 EDT
Build Identifier: I20100608-0911

When an exception is thrown from an IContributionItem's fill method, our RCP crashes with a segfault. The code should throw an exception, but the app shouldn't have a hard crash.

Reproducible: Always

Steps to Reproduce:
1. Run the attached test main on Linux
2. Select the "Crash" menu
--desired behavior: application catches exception and prints out a message
--actual behavior: application crashes hard with pango_layout_new_ (see log at bottom)
Comment 1 Roland Gunther CLA 2010-08-05 17:52:26 EDT
Created attachment 175985 [details]
example that demonstrates the crash
Comment 2 Remy Suen CLA 2010-08-05 17:58:33 EDT
Please provide the VM crash log.
Comment 3 Roland Gunther CLA 2010-08-05 19:45:49 EDT
Created attachment 175992 [details]
hs_err crash log
Comment 4 Felipe Heidrich CLA 2010-08-06 13:17:32 EDT
You should clear all expections before return from the event handler. If you don't, the code will return to the native stack and no more callbacks will be fired as long as the VM has a pending exception.

Silenio, this bug is a duplicate. Do you know the number for the original PR ?
Comment 5 Remy Suen CLA 2010-08-06 13:21:48 EDT
Are we talking about bug 291128? Though that should've been fixed in 3.6.
Comment 6 Felipe Heidrich CLA 2010-08-10 10:37:39 EDT
(In reply to comment #5)
> Are we talking about bug 291128? Though that should've been fixed in 3.6.

I decided to use Bug 322222 to capture all the crashes in pango_layout_new.

But at this point I not sure if it correct to close all bugs as duplicates.

Although we see the crash at pango_layout_new there still a bug happening in event handler that caused the exception, I believe this bug should also be fixed.
Comment 7 Silenio Quarti CLA 2010-08-13 16:31:52 EDT
Closing as duplicate.

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