Bug 36640 - [GTK] Crash when viewing Flash when GtkWindow has an RGBA colormap
Summary: [GTK] Crash when viewing Flash when GtkWindow has an RGBA colormap
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL: http://www.kirupa.com/developer/mx/tr...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-25 20:53 PDT by kerpz
Modified: 2014-04-08 18:33 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kerpz 2010-03-25 20:53:33 PDT
Provided the link above the right click functions doesn't work (minor issue).
Another thing is, when loading it with my webkitgtk app with "transparency enabled" crashes with these message:

[root@development mywebkit]# ./test
The program 'test' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 1010 error_code 8 request_code 140 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

//////////////////// snippet start here //////////////////////////

	GdkScreen *screen = gtk_widget_get_screen(main_window);
/* -- commented to avoid crashing the app --
	GdkColormap *rgba = gdk_screen_get_rgba_colormap(screen);
	if (rgba && gdk_screen_is_composited (screen))
	{
		gtk_widget_set_default_colormap(rgba);
		gtk_widget_set_colormap(GTK_WIDGET(main_window), rgba);
	}
*/

	// Create a WebView, set it transparent, add it to the window
	//WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
	webkit_web_view_set_transparent(WEBKIT_WEB_VIEW(web_view), TRUE);

//////////////////// snippet end here //////////////////////////

as you can see I commented the app transparency to avoid the crashing
is this fixable?

Thanks and Regards,
Philip B.
Comment 1 Martin Robinson 2010-03-26 12:04:14 PDT
Is it possible for you to get a stack trace for this crash?
Comment 2 zaheer 2010-09-01 02:42:05 PDT
I dont see the crash on the trunk - 66582
Comment 3 kerpz 2010-09-21 22:59:47 PDT
The crash still occurs, im using trunk 67940

How to reproduce the crash:

Create a simple application with compositing enable, for alpha blending.
Plugin: adobe flash player 10 for linux


//////////////////// snippet start here //////////////////////////

....

	GdkScreen *screen = gtk_widget_get_screen(main_window);

	GdkColormap *rgba = gdk_screen_get_rgba_colormap(screen);
	if (rgba && gdk_screen_is_composited (screen))
	{
		gtk_widget_set_default_colormap(rgba);
		gtk_widget_set_colormap(GTK_WIDGET(main_window), rgba);
	}

	webkit_web_view_set_transparent(WEBKIT_WEB_VIEW(web_view), TRUE);

	// fullscreen
	gint width = gdk_screen_get_width(screen);
	gint height = gdk_screen_get_height(screen);
	gtk_window_set_default_size(GTK_WINDOW(main_window), width, height);

    gchar* uri = (gchar*) (argc > 1 ? argv[1] : "http://www.kirupa.com/developer/mx/transparency.htm");
    webkit_web_view_load_uri (web_view, uri);

....

//////////////////// snippet end here //////////////////////////

Note: It will load normal pages without flash content.


Regards,
Philip B.
Comment 4 kerpz 2010-12-01 19:08:53 PST
I figured out what causes the crash, adobe flash player doesn't use RGBA colormap.
Comment 5 Martin Robinson 2014-04-08 18:33:36 PDT
The GTK+ port of WebKit1 has been removed. Please reopen if this is still an issue with WebKit2.