Home > firefox, python > GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0′ failed

GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0′ failed

Problem
Firefox 21.0 on Ubuntu 13.04 drops this error message in the command line: “GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed“. Whenever I want to open a URL from a script, I get this, which is quite annoying. Actually, this is a known bug.

I use Python a lot and when I call “webbrowser.open_new_tab(url)“, I also get this error message.

Workaround
Until it gets resolved, I call firefox directly and redirect the stderr to /dev/null:

firefox -url www.google.com 2>/dev/null

In Python:

def open_url(url):
    #webbrowser.open_new_tab(url)
    os.system('firefox -url "{url}" 2>/dev/null'.format(url=url))
About these ads
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 72 other followers

%d bloggers like this: