Skip to content

wx segfault #11582

Description

@anntzer

The following script (opening two figures, and triggering a figure quit via the keyboard shortcut on a timer 1 second after the second figure is drawn) segfaults when used with the wx{,agg} backend. It works as expected (closing the second figure after 1s) e.g. other backends.

from pylab import *

plt.figure()

fig = plt.figure()
timer = fig.canvas.new_timer(1000)
timer.add_callback(fig.canvas.key_press_event, "q")
fig.canvas.mpl_connect("draw_event", lambda event: timer.start())
plt.show()

Interestingly, commenting out the first plt.figure() (which seemingly plays no role...) removes the segfault.

Noted while working on the tests for #11581.
Matplotlib master on Py3.6/Arch Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUI: wxRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions