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

Fix Gtk3 Backend Source ID was not found #4164

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
tacaswell merged 1 commit into matplotlib:master from zeroSteiner:gtk3-source-ref
Feb 25, 2015

Conversation

Copy link
Contributor

@zeroSteiner zeroSteiner commented Feb 25, 2015

I'm using matplotlib in a GTK3 application (backend is set to GTK3Cairo) and when my application exits I consistently get the following warning:

/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_gtk3.py:215: Warning: Source ID 45 was not found when attempting to remove it
 GLib.source_remove(self._idle_event_id)

Looking into the issue it looks like the idle_event is removed and thus when GLib.source_remove is called, the event id no longer exists. It would be great if a check could take place before the event source is removed to determine if it is still valid.

This PR adds a reference to the Gtk3 source created by GLib.idle_add so it can be checked to see if it was destroyed later to avoid removing an invalid source id and causing the aforementioned warning messages to be displayed.

This adds a reference to the Gtk3 source created by
GLib.idle_add so it can be checked to see if it was
destroyed later to avoid removing an invalid source
id and causing warning messages to be displayed.
@tacaswell tacaswell added this to the next point release milestone Feb 25, 2015
Copy link
Member

Seems reasonble to me @fariza any comment?

Copy link
Member

fariza commented Feb 25, 2015

👍 I see no problem with this. Thanks for the fix

tacaswell added a commit that referenced this pull request Feb 25, 2015
Fix : Gtk3 Backend Source ID was not found
@tacaswell tacaswell merged commit 612b3f2 into matplotlib:master Feb 25, 2015
Copy link
Member

Thanks! I wonder if this will also fix #3690

Copy link
Contributor Author

Awesome, thank you both for the quick turnaround!

Copy link
Member

erm, never mind on that other issue, that is WX, not gtk...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
v1.5.0
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /