-
Notifications
You must be signed in to change notification settings - Fork 213
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
Segfault when running test_plot_shapefile without the dbf and shx files #1788
Comments
Sounds good.
Yes, and was reported in GenericMappingTools/gmt#6400. |
Description of the problem
I ran into a segmentation fault when running
make test
locally after doing agmt clear all
. The problem is with the new test_plot_shapefile test added in #1695. The crash was also mentioned at #1695 (comment).pygmt/pygmt/tests/test_plot.py
Lines 552 to 554 in 14a4947
Should we add an extra line of code like
pygmt.which("@RidgeTest.shp @RidgeTest.shx @RidgeTest.dbf @RidgeTest.prj")
beforefig.plot(data="@RidgeTest.shp", ...)
? It seems redundant, but the alternative would be to have people go through the extra step of downloading the cache before running the tests. I'm thinking about potential new contributors who are just used to runpytest
ormake test
, and a segfault doesn't look very good.Another point is - Will users encounter a segfault if they try to plot a shapefile without all of the other files (shx, dbf)? Again, not a very good look.
Full code that generated the error
gmt clear all pytest --mpl --verbose -k 'shapefile' pygmt/tests/test_plot.py
Full error message
System information
Please paste the output of
python -c "import pygmt; pygmt.show_versions()"
:The text was updated successfully, but these errors were encountered: