Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GTK segfault with GTK3 and mpl_toolkits#1813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdboom merged 2 commits intomatplotlib:masterfrommdboom:gtk3-version-check
May 28, 2013

Conversation

mdboom
Copy link
Member

Something goes wrong when using a GTK3 backend and the mpl_toolkits. See this very minimal testcase:

>>>fromgi.repositoryimportGtk>>>importmpl_toolkits.axisartist/usr/lib/python2.7/dist-packages/gobject/constants.py:24:Warning:g_boxed_type_register_static:assertion `g_type_from_name (name)==0'failedimportgobject._gobject/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40:Warning:specifiedclasssizefor type`PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer'classsizefromgtkimport_gtk/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40:Warning:g_type_get_qdata:assertion `node!=NULL'failedfromgtkimport_gtkSegmentatiefout (geheugendumpgemaakt)

Most likely, something imports the old GTK2 bindings, run following for the same error:

>>>fromgi.repositoryimportGtk>>>importgtk

Grepping the sourcecode gives mpl_toolkits/gtktools.py where it is used, but I can't even find where it is imported.

@mdboom
Copy link
Member

This looks as if you do not have the development files for Gtk3 installed. Would you mind testing the attached patch? It should give you an error message to this effect.

try:
gi.require_version("Gtk", "3.0")
except ValueError:
raise ImportError("Gtk3 backend gtk3 development files to be installed.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Missing word: "requires".
Also, this has me puzzled, because I can run the gtk3agg backend on ubuntu Precise, but I don't have the libgtk-3-dev package installed.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It seems things are packaged somewhat differently on Debian/Ubuntu than on Fedora. I think on Ubuntu, the required package is: gir1.2-gtk3.0https://launchpad.net/ubuntu/precise/+package/gir1.2-gtk-3.0

Since we don't really know what distro the user will be using, I'm inclined to change this to:

"The Gtk3 backend requires that the GObject introspection bindings for Gtk 3 are installed."

That should give a user enough to Google something by.

mdboom added a commit that referenced this pull requestMay 28, 2013
GTK segfault with GTK3 and mpl_toolkits
@mdboommdboom merged commitdd38945 intomatplotlib:masterMay 28, 2013
mdboom added a commit that referenced this pull requestMay 28, 2013
GTK segfault with GTK3 and mpl_toolkits
@mdboommdboom deleted the gtk3-version-check branchAugust 7, 2014 13:54
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v1.3.x blocker
Development

Successfully merging this pull request may close these issues.

2 participants
@mdboom@efiring

[8]ページ先頭

©2009-2025 Movatter.jp