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

Bug 445800

Summary: "Gtk-CRITICAL **: gtk_hsv_to_rgb" printed with GTK3
Product: [Eclipse Project] Platform Reporter: Gulfstream Wang <gulfstream.wang>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: ericwill
Version: 4.4Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
error display with GTK 3 none

Description Gulfstream Wang CLA 2014-10-02 11:54:18 EDT
When I run SWT4.4 (also with 4.5M2) with GTK 3, I get a error message in the console. The error message is:

(Test SWT:5234): Gtk-CRITICAL **: gtk_hsv_to_rgb: assertion 's >= 0.0 && s <= 1.0' failed 

Even the most simple SWT program, sunch as the blew:

package testswt;

import org.eclipse.jface.window.*;
import org.eclipse.swt.widgets.*;


public class CTestSWT extends ApplicationWindow
{
    public static void main(String[] args)
    {
        Display.setAppName("Test SWT");
       
        CTestSWT frObj = new CTestSWT();
        frObj.setBlockOnOpen(true);
        frObj.open();
        Display.getCurrent().dispose();
    }
    
    public CTestSWT()
    {
        super(null);
    }
    
    @Override
    protected Control createContents(Composite parent)
    {
        getShell().setText("Test SWT");
        getShell().setSize(300, 300);
        getShell().setLocation(200, 200);
       
        return parent;
    }
} 

To this most simple SWT program, this error does not present any wrong with the GUI. But to some dialog, I get the wrong display as fig_error.png (in attachments) while I execute it with GTK 3.

My GTK 3 version is 3.12.2.
Comment 1 Gulfstream Wang CLA 2014-10-02 11:56:25 EDT
Created attachment 247581 [details]
error display with GTK 3
Comment 2 Eric Williams CLA 2015-08-20 16:05:29 EDT
Seems to be something related to gtk_style_context_get_background_color() not working properly. All the GdkRGBA objects being passed in are not being set, thus everything ends up being black.

I will investigate further as this hinders my testing on older versions of Gtk.
Comment 3 Eric Williams CLA 2015-09-21 09:08:21 EDT
(In reply to Eric Williams from comment #2)
> I will investigate further as this hinders my testing on older versions of
> Gtk.

Note this happens only when using Gtk3.12.2 or older.
Comment 4 Eric Williams CLA 2018-04-11 11:15:40 EDT
(In reply to Eric Williams from comment #3)
> Note this happens only when using Gtk3.12.2 or older.

Closing this ticket now as these versions of GTK3 are ancient and not widely used.