Skip to content

wx segfaulting on OSX travis tests #11578

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

Closed
tacaswell opened this issue Jul 5, 2018 · 6 comments
Closed

wx segfaulting on OSX travis tests #11578

tacaswell opened this issue Jul 5, 2018 · 6 comments
Labels
GUI: wx OS: Apple Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone

Comments

@tacaswell
Copy link
Member

See https://travis-ci.org/matplotlib/matplotlib/jobs/400499066#L1435

Can someone with a mac reproduce this locally?

@tacaswell tacaswell added OS: Apple Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. GUI: wx labels Jul 5, 2018
@tacaswell tacaswell added this to the v3.0 milestone Jul 5, 2018
@jklymak
Copy link
Member

jklymak commented Jul 5, 2018

With python3.6 and wxpython installed via anaconda I get:

E               subprocess.CalledProcessError: Command '['/Users/jklymak/anaconda3/envs/matplotlibdev/bin/python', '-c', 
'import sys\nfrom matplotlib import pyplot as plt, rcParams\nrcParams.update({\n    "webagg.open_in_browser": False,\n   
 "webagg.port_retries": 1,\n})\n\nfig = plt.figure()\nax = fig.add_subplot(111)\nax.plot([0, 1], [2, 3])\n\nif rcParams["backend"].startswith("GTK3"):\n   
fig.canvas.mpl_connect("draw_event", lambda event: sys.exit(0))\nelse:\n    timer = 
fig.canvas.new_timer(1)\n    timer.add_callback(fig.canvas.key_press_event, "q")\n    # Trigger quitting 
upon draw.\n    fig.canvas.mpl_connect("draw_event", lambda event: timer.start())\n\nplt.show()\n']' 
returned non-zero exit status 1.

which is slightly different.

@anntzer
Copy link
Contributor

anntzer commented Jul 5, 2018

Can you copy-paste the script (e.g. directly from test_backends_interactive) and run it (setting MPLBACKEND to wx/wxagg)?

@jklymak
Copy link
Member

jklymak commented Jul 5, 2018

Running

import matplotlib
matplotlib.use('wxagg')
import sys
from matplotlib import pyplot as plt, rcParams
rcParams.update({
    "webagg.open_in_browser": False,
    "webagg.port_retries": 1,
})

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([0, 1], [2, 3])

print(rcParams["backend"])

if rcParams["backend"].startswith("GTK3"):
    fig.canvas.mpl_connect("draw_event", lambda event: sys.exit(0))
else:
    timer = fig.canvas.new_timer(1)
    timer.add_callback(fig.canvas.key_press_event, "q")
    # Trigger quitting upon draw.
    fig.canvas.mpl_connect("draw_event", lambda event: timer.start())

plt.show()

pops up and then closes a window and prints an error to the screen:

pythonw testwx.py

WXAgg
/Users/jklymak/anaconda3/envs/matplotlibdev/bin/pythonw: line 3: 25249 Segmentation fault: 11  /Users/jklymak/anaconda3/envs/matplotlibdev/python.app/Contents/MacOS/python "$@"

@anntzer
Copy link
Contributor

anntzer commented Jul 5, 2018

Can you try with older wxpython releases then?

@tacaswell tacaswell mentioned this issue Jul 5, 2018
@anntzer
Copy link
Contributor

anntzer commented Jul 7, 2018

Self-merging #11593 to unbreak the build, but someone should figure out whether this needs to be fixed (or not) before 3.0 goes out!

@tacaswell
Copy link
Member Author

Closing this as #11708 shows this is hanging rather than segfaulting now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI: wx OS: Apple Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

No branches or pull requests

3 participants