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

Bug 324166

Summary: SWT motif crashes when trying to use libcairo routines on 8-bit color depth
Product: [Eclipse Project] Platform Reporter: John Reysa <reysa>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: akurtakov, eclipse.felipe, Silenio_Quarti
Version: 4.0   
Target Milestone: ---   
Hardware: Other   
OS: other   
Whiteboard:

Description John Reysa CLA 2010-09-01 02:11:21 EDT
Build Identifier: I20100608-0911

When running on AIX-motif on a vnc session with color depth of 8 or 16 and looking at any view using forms, the platform crashed with the following message:
Error: Cairo 1.4.10 does not yet support the requested image format:
       Depth: 8
       Alpha mask: 0x00000000
       Red   mask: 0x00000007
       Green mask: 0x00000038
       Blue  mask: 0x000000c0

Grant Gayed said the following about this bug:
"The problem is that cairo (at least the version that you have) does not support screens with depth 8.  So in theory one way to make this work on the machine(s) where you see this is to change their screen depths to something like 24.  In reality this may or may not be possible, as some AIX boxes out there, including one that we used to have here, only ship with support for depths of 8 by default.

For a more general solution, you could probably just delete the libswt-cairo-motif-<version>.a file from the swt 3.6 jar, which should effectively disable advanced graphics and fall back to handling them in a similar manner to 3.3, before cairo support was added.  This is probably the easiest thing for you to try.  If this doesn't work for some reason then let me know.

Logging a new bug makes sense for this, as swt should handle cases like this better.  Thanks!"

I confirmed that when we run vncserver with color depth of 24, the error goes away.  In addition, I followed Grant's instructions on removing the libcairo library and it worked on both 8 and 16-bit vnc sessions as he thought it would.


Reproducible: Always

Steps to Reproduce:
1. start vncserver session with depth equal 16 on an aix/motif platform
2. bring up eclipse 3.6
3. find a ui component using forms or advanced graphics 
4. platform will lock up and crash
Comment 1 Felipe Heidrich CLA 2010-09-01 10:09:00 EDT
Silenio, isn't is possible to detect that depth and not load cairo on our code ?
Sounds like it should be something easy (?)
Comment 2 Silenio Quarti CLA 2010-09-01 10:25:34 EDT
Yes, that is easy, but we need to know if newer versions of cairo support those screen depths and only disable if necessary.
Comment 3 Alexander Kurtakov CLA 2014-08-21 09:34:32 EDT
As Motif is no longer supported closing the bug. Please open a new one if the problem still exists with supported version and window system.