Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 441705 - SWT OS.USE_CAIRO does not check cairo version
Summary: SWT OS.USE_CAIRO does not check cairo version
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.4.1   Edit
Assignee: Sami Wagiaalla CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 450850 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-13 10:57 EDT by Sami Wagiaalla CLA
Modified: 2014-11-25 09:15 EST (History)
4 users (show)

See Also:
arunkumar.thondapu: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sami Wagiaalla CLA 2014-08-13 10:57:09 EDT
org.eclipse.swt.widgets.Caret uses CAIRO_OPERATOR_DIFFERENCE when OS.USE_CAIRO is true but that operator is not introduced until cairo 1.9.4

OS.USE_CAIRO is set based on the GTK version which leads the boolean to be enabled on systems where GTK >= 2.24 and if cairo is < 1.9.4 eclipse crashes.

The following patch adds a check for the cairo version: https://git.eclipse.org/r/31533
Back port to 4.4: https://git.eclipse.org/r/#/c/31322/
Comment 1 Arun Thondapu CLA 2014-08-14 11:00:40 EDT
(In reply to Sami Wagiaalla from comment #0)
> org.eclipse.swt.widgets.Caret uses CAIRO_OPERATOR_DIFFERENCE when
> OS.USE_CAIRO is true but that operator is not introduced until cairo 1.9.4
> 
> OS.USE_CAIRO is set based on the GTK version which leads the boolean to be
> enabled on systems where GTK >= 2.24 and if cairo is < 1.9.4 eclipse crashes.
> 
> The following patch adds a check for the cairo version:
> https://git.eclipse.org/r/31533
> Back port to 4.4: https://git.eclipse.org/r/#/c/31322/

Pushed the patch to master, the 4.4.1 patch link seems to be wrong?
Comment 2 Sami Wagiaalla CLA 2014-08-14 11:19:03 EDT
> Pushed the patch to master,

Thanks for reviewing!

> the 4.4.1 patch link seems to be wrong?

Ops.. my mistake. Here is the correct link: https://git.eclipse.org/r/#/c/31531/
Comment 3 Arun Thondapu CLA 2014-08-14 12:47:43 EDT
(In reply to Sami Wagiaalla from comment #2)
> > Pushed the patch to master,
> 
> Thanks for reviewing!
> 
> > the 4.4.1 patch link seems to be wrong?
> 
> Ops.. my mistake. Here is the correct link:
> https://git.eclipse.org/r/#/c/31531/

Pushed to 4.4.1 stream as well.
Comment 4 Nate Jensen CLA 2014-11-03 12:38:09 EST
From this forum post: https://www.eclipse.org/forums/index.php/m/1448997/?srch=cairo-misc.c%3A380#msg_1448997 there is a workaround for earlier versions of Eclipse if you cannot upgrade.

Add -Dorg.eclipse.swt.internal.gtk.cairoGraphics=false to eclipse.ini.
Comment 5 Paul Webster CLA 2014-11-10 20:58:15 EST
*** Bug 450850 has been marked as a duplicate of this bug. ***
Comment 6 Martin Oberhuber CLA 2014-11-25 09:15:23 EST
CQ:WIND00-WB4-4756

We've also seen this issue in a customer install. Many thanks for the fix.