After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641515 - Now Playing crashes with BadMatch X error
Now Playing crashes with BadMatch X error
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
git master
Other Linux
: Normal major
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
: 637757 640315 643616 (view as bug list)
Depends on:
Blocks: 645832
 
 
Reported: 2011-02-04 16:09 UTC by cycotr0n
Modified: 2011-10-03 22:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Stacktrace after "now playing" crash (24.27 KB, text/plain)
2011-02-04 16:09 UTC, cycotr0n
  Details
launch script workaround (596 bytes, patch)
2011-02-18 00:52 UTC, Gabriel Burt
committed Details | Review
Stack Trace From Crash (29.51 KB, text/plain)
2011-03-15 16:46 UTC, Mathew Topper
  Details
New stack trace for crash from git master (32.21 KB, text/plain)
2011-03-22 18:31 UTC, Mathew Topper
  Details

Description cycotr0n 2011-02-04 16:09:59 UTC
Created attachment 180090 [details]
Stacktrace after "now playing" crash

OS: Fedora 14 (x86_64)
Kernel: 2.6.35.10-74.fc14.x86_64
Banshee version: banshee-1.8.0-10.fc14.1.x86_64

When clicking on "Now Playing" while a song is playing in Banshee, the program will crash.  When launching banshee-l with the --debug option, I see the following error:

[1 Debug 10:48:53.159] Loaded IScreensaverManager: Banshee.GnomeBackend.GnomeScreensaverManager

Gdk-ERROR **: The program 'Banshee' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 14710 error_code 8 request_code 70 minor_code 0)
  (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.)
aborting...

I have also attached a stack trace.
Comment 1 Christian Krause 2011-02-05 15:35:38 UTC
Corresponding bug entry in Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=673171

I have started investigating the issue:

1) it happens under the following circumstances:
- having a "compositing" window manager running and so having ARGB visuals available
- activated extensions which use WebView (like Amazon or Wikipedia)

2) it can be prevented by:
- deactivating the mentioned extensions
- starting banshee without ARGB visuals: "XLIB_SKIP_ARGB_VISUALS=1 banshee-1"

3) the problem started to happen when Fedora updated webkitgtk from 1.3.6 to 1.3.10
- I've "svn-bisected" webkitgtk to the following commit:
svn log -c 74129 http://svn.webkit.org/repository/webkit/trunk
svn diff -c 74129 http://svn.webkit.org/repository/webkit/trunk
- it looks like that webkitgtk checks now whether an rgba colormap is available and if yes, it will immediately set it for its embedded widget
-----------
    GdkColormap* colormap = gdk_screen_get_rgba_colormap(gdk_screen_get_default());
....
    gtk_widget_set_colormap(m_gtkWindow, m_themeParts.colormap);
----------
- banshee seems not to use an rgba colormap and so the mentioned "BadMatch" X error will happen

I'm not sure whether the problem is now in Banshee or in webkitgtk.
Comment 2 Martin Robinson 2011-02-09 21:20:49 UTC
Hey Christian, is it possible for you to narrow down what element on the page is causing this crash? My suspicion is that it's either some kind of form control or a plugin.
Comment 3 Gabriel Burt 2011-02-17 20:52:27 UTC
I can confirm this on openSUSE Factory, including both workarounds.  I'm asking in #webkit-gtk to see if anybody has a clue about this.
Comment 4 Gabriel Burt 2011-02-18 00:52:18 UTC
Created attachment 181181 [details] [review]
launch script workaround

Ok, spent way too long on this today with no success.  I'm submitting this XLIB_SKIP.. patch for openSUSE as a workaround.  Bertrand says it can cause issues w/ transparent notification icons, but I don't see that on SUSE and at this point it's worth it even if that does happen.
Comment 5 Christian Krause 2011-02-19 12:03:55 UTC
(In reply to comment #2)
> Hey Christian, is it possible for you to narrow down what element on the page
> is causing this crash? My suspicion is that it's either some kind of form
> control or a plugin.

I don't know which element it is since there isn't any web page displayed - only the some object providing the webkit integration is instantiated. AFAIK the "Now Playing" tab is not rendered via webkit - probably it is just a coincidence that the according objects for the webkit integration are instantiated once you switch to the now playing pane.
Comment 6 Gabriel Burt 2011-02-27 18:22:52 UTC
*** Bug 640315 has been marked as a duplicate of this bug. ***
Comment 7 Gabriel Burt 2011-02-27 18:24:29 UTC
*** Bug 637757 has been marked as a duplicate of this bug. ***
Comment 8 Gabriel Burt 2011-03-01 19:39:01 UTC
*** Bug 643616 has been marked as a duplicate of this bug. ***
Comment 9 Timur Kristóf 2011-03-10 16:18:12 UTC
I also seem to be experiencing this issue.
Here is the output of 'banshee-1 --debug' when I open an mkv file with it:
http://pastebin.com/0VaaaBzT
Comment 10 Dustin C. Hatch 2011-03-12 03:00:48 UTC
This affected me as well, on Gentoo under XFCE (with compositor on), VMware video driver. I have included Gabriel's patch in the ebuild for Banshee 1.9.5 in my (dustin) overlay.
Comment 11 Mathew Topper 2011-03-15 16:46:34 UTC
Created attachment 183444 [details]
Stack Trace From Crash
Comment 12 Mathew Topper 2011-03-15 16:47:40 UTC
I get a similar crash playing a CD under KDE in Fedora 14 (version 1.8.0)

Stack trace is attached above.
Comment 13 Gabriel Burt 2011-03-22 14:28:13 UTC
Comment on attachment 181181 [details] [review]
launch script workaround

I committed this to master.
Comment 14 Gabriel Burt 2011-03-22 14:29:12 UTC
With this patch applied, is anyone still seeing this crash?

Let's leave this bug open until we identify and fix the root cause.
Comment 15 Mathew Topper 2011-03-22 18:31:51 UTC
Created attachment 184111 [details]
New stack trace for crash from git master

Installed banshee following instructions here:

http://banshee.fm/download/development/

Still get a crash when clicking Now Playing.

Trace is attached.
Comment 16 Mathew Topper 2011-03-25 22:49:49 UTC
Apologies, git master works fine when it is installed and run and not executed by a "make run".
Comment 17 Bertrand Lorentz 2011-03-27 16:23:05 UTC
As confirmed by bug #645832, with the workaround applied the notification icon is not transparent anymore on Ubuntu 10.04 (and 10.10).
Comment 18 Bertrand Lorentz 2011-05-01 12:48:06 UTC
After removing the XLIB_SKIP_ARGB_VISUALS=1 workaround, I can reproduce the crash with Banshee 2.0 on openSUSE 11.4. But what's interesting is that the crash doesn't happen anymore with the latest git master.

Some git bisecting shows that the following commit fixes the crash :
http://git.gnome.org/browse/banshee/commit/?id=3a60ae29c0899254be7845c774571011e7260667

Could you guys check if the crash still happens for you with the latest git master ?
Just make sure you disable the workaround :
If running with "make run", remove the workaround by deleting XLIB_SKIP_ARGB_VISUALS=1 from the top-level Makefile.am and then running ./autogen.sh

In the meantime I'll keep trying to make sense of this...
Comment 19 Dustin C. Hatch 2011-05-02 23:04:30 UTC
I can confirm Bertrand's findings in Comment #18 on Gentoo; stock 2.0 crashes without XLIB_SKIP_ARGB_VISUALS, but the latest master does not.
Comment 20 Gabriel Burt 2011-05-03 00:17:17 UTC
It doesn't crash even if you load the Wikipedia view?
Comment 21 Dustin C. Hatch 2011-05-03 00:41:22 UTC
(In reply to comment #20)
> It doesn't crash even if you load the Wikipedia view?

Nope, Wikipedia loads fine, but it also works in 2.0 for me.
Comment 22 Gabriel Burt 2011-05-07 18:45:11 UTC
I've reverted the workaround on master.
Comment 23 David Nielsen 2011-05-09 13:22:49 UTC
*** Bug 649792 has been marked as a duplicate of this bug. ***
Comment 24 Bertrand Lorentz 2011-09-10 13:00:17 UTC
The Lyrics and Karaoke extension were causing the same problem. I fixed this liked it was done in the Wikipedia extension, by delaying loading webkit until it's needed :

https://gitorious.org/banshee-community-extensions/banshee-community-extensions/commit/ad63da5
https://gitorious.org/banshee-community-extensions/banshee-community-extensions/commit/b6419fb
Comment 25 Pacho Ramos 2011-09-10 14:16:23 UTC
Can that patches be backported to 2.0.x branch? Looks like they don't apply on it :(

Thanks a lot
Comment 26 Bertrand Lorentz 2011-09-10 15:31:43 UTC
As the 2.2 release is less than 2 weeks away, I won't backport those changes.

But it should be possible to apply those changes, a bit of re-jiggering is probably needed.
Comment 27 Pacho Ramos 2011-09-10 16:18:34 UTC
OK, I didn't know 2.2 release was so near
Comment 28 Andrés G. Aragoneses (IRC: knocte) 2011-10-03 15:39:26 UTC
Should we close this as FIXED then? Pacho, did you test with 2.2.0 already?
Comment 29 Pacho Ramos 2011-10-03 20:06:58 UTC
It works, feel free to close this :D

(I am not allowed to as I am not the reporter :/)
Comment 30 Andrés G. Aragoneses (IRC: knocte) 2011-10-03 22:50:52 UTC
Thanks Pacho.

Feel free to reopen the bug if anyone finds it different.