Skip to content

Kernel dies if an additional subset map is added #569

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
michaelgrund opened this issue Aug 20, 2020 · 13 comments
Closed

Kernel dies if an additional subset map is added #569

michaelgrund opened this issue Aug 20, 2020 · 13 comments
Labels
bug Something isn't working upstream Bug or missing feature of upstream core GMT
Milestone

Comments

@michaelgrund
Copy link
Member

michaelgrund commented Aug 20, 2020

Hey guys,

I recently tried to generate a figure in a jupyter notebook which consists of two maps (A and B). For that I first generated a map (A) using fig.coast(...) which works well. For the second map (B) I first use shift_origin to move it a little bit right. Then I use again fig.coast(...) to generate map B. At this point the kernel dies and it's not possible to continue. Any ideas what happens here?

The issue is similar to #514, however, not exactly the same.

import pygmt

fig = pygmt.Figure()

lon = 19
lat = 64

fig.coast(region = 'g',
          projection = 'E' + str(lon) + '/' + str(lat) + '/5c',
          resolution = 'c', 
          shorelines = '1/thinnest,black', 
          frame = ['30g0'],
          area_thresh = ['5000'],
          G = 'lightgray',
          C = 'lightgray')

fig.shift_origin(xshift = '3c')

fig.coast(region = 'g',
          projection = 'E' + str(lon) + '/' + str(lat) + '/5c',
          resolution = 'c', 
          shorelines = '1/thinnest,black', 
          frame = ['30g0'],
          area_thresh = ['5000'],
          G = 'lightgray',
          C = 'lightgray')
@welcome
Copy link

welcome bot commented Aug 20, 2020

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.

@MarkWieczorek
Copy link
Contributor

I think that shift_origin() only works with gmt 6.1.1. This is supposed to be released in a few days, but if you are impatient, you can install from source. On macOS, this is easy to do with brew install gmt --HEAD.

@michaelgrund
Copy link
Member Author

I think that shift_origin() only works with gmt 6.1.1. This is supposed to be released in a few days, but if you are impatient, you can install from source. On macOS, this is easy to do with brew install gmt --HEAD.

Hmm, I created several other maps in the same manner, however, using different projections and everything worked so far without having 6.1.1

@MarkWieczorek
Copy link
Contributor

MarkWieczorek commented Aug 20, 2020

I confirm that this crashes the kernel on my system using the most up to date versions of gmt and pygmt (as of about a week ago...)

coast [WARNING]: Fill/clip continent option (-G) may not work for this projection.
coast [WARNING]: If the antipode (0/-5.52561e+09) is in the ocean then chances are good it will work.
coast [WARNING]: Otherwise, avoid projection center coordinates that are exact multiples of 199 degrees.
[1]    75191 segmentation fault  ipython

And, the crash is unrelated to shift_origin. If you simply call fig.coast twice, the kernel dies....

@michaelgrund
Copy link
Member Author

And, the crash is unrelated to shift_origin. If you simply call fig.coast twice, the kernel dies....

That's strange since in another figure I perform nearly the same, except that I use two different projections for the subsets (https://github.com/michaelgrund/GMT-plotting/blob/master/009_paper_GR2020/pygmt_jn_fig_2/GR_2020_Fig_2.ipynb). It seems that it crashes if multiple times the same projection is used...

@seisman seisman added the bug Something isn't working label Aug 20, 2020
@seisman
Copy link
Member

seisman commented Aug 20, 2020

I can confirm that it's an upstream GMT bug.

@PaulWessel Please see if you can fix it in GMT.

@seisman seisman added this to the 0.2.x milestone Aug 20, 2020
@seisman seisman added the upstream Bug or missing feature of upstream core GMT label Aug 20, 2020
@PaulWessel
Copy link
Member

I take it the equivalent shell script works fine?

@seisman
Copy link
Member

seisman commented Aug 22, 2020

I take it the equivalent shell script works fine?

Yes, please also note that the two fig.coast() calls are exactly the same, but the first one works and it crashes at the 2nd one.

@PaulWessel
Copy link
Member

Also sinks MATLAB.

PaulWessel added a commit to GenericMappingTools/gmt that referenced this issue Aug 22, 2020
seisman pushed a commit to GenericMappingTools/gmt that referenced this issue Aug 22, 2020
github-actions bot pushed a commit to GenericMappingTools/gmt that referenced this issue Aug 22, 2020
@seisman
Copy link
Member

seisman commented Aug 22, 2020

@michaelgrund The bug was fixed in the upstream GMT and a new GMT release (GMT 6.1.1) will be available in the next few days.

We will close the issue when PyGMT bumps the minimum required GMT version to 6.1.1.

seisman pushed a commit to GenericMappingTools/gmt that referenced this issue Aug 22, 2020
@michaelgrund
Copy link
Member Author

Great to hear!

@weiji14
Copy link
Member

weiji14 commented Sep 3, 2020

Closing as we've bumped up the minimum GMT version to 6.1.1 in #577. The code should work now to produce this plot:

double_coast

@weiji14 weiji14 closed this as completed Sep 3, 2020
@michaelgrund
Copy link
Member Author

yes after updating to 6.1.1 it works, thanks for your efforts!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Bug or missing feature of upstream core GMT
Projects
None yet
Development

No branches or pull requests

5 participants