-
Notifications
You must be signed in to change notification settings - Fork 224
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
Figure.meca causes segmentation fault when given "event_name" via a DataFrame #2524
Comments
👋 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. |
P.S.: I just saw that |
Confirmed with the most recent version. The bug report is now up to date. |
Thanks. I can reproduce the issue. Will see why it happens later. |
@PaulWessel This looks like an upstream bug to me, could you please see if you can verify and it? Here is a minimal example to reproduce the issue:
Here are the verbose messages:
|
I ran this via Xcode etc but no crash, at least it did not stop at a line like yours. It ended with these message:
Unfortunately, if not crashing on macOS you may have to run in ddd in Linux... |
Here are my understanding of the issue: In PyGMT, we first call
to create the data container, and then call
Then in GMT, the In the
Now we have two API objects:
At the end of the Thus, at the end of the GMT session, when we try to free the API object 0 (i.e., I hope my understanding is correct and it can help you find a fix for this issue. |
Hm, since the data columns have their flag
it would seem we need a similar
So I will add
and then consult this variable before free. Sees sensible? |
Yes, it will very likely fix the issue! |
See GenericMappingTools/pygmt#2524 for background. Sees we are trying to free strings thar belong to Python and not GMT. However, not solved yet.
Not so. And, if I try to place a stop point in psmeca it never stops there, It stops in the places I asked (Put_Strings etc in the API) but pretty soon we are in the GarbageCollector and no evidence it ever went into meta. Not sure what to do. |
Your changes in PR GenericMappingTools/gmt#7557 work well for me after applying the changes in https://github.com/GenericMappingTools/gmt/pull/7557/files#r1234079875. |
* Do no free external trailing text strings See GenericMappingTools/pygmt#2524 for background. Sees we are trying to free strings thar belong to Python and not GMT. However, not solved yet. * Update gmt_io.c * Update src/gmt_io.c Co-authored-by: Dongdong Tian <[email protected]> --------- Co-authored-by: Dongdong Tian <[email protected]>
Description of the problem
When calling
fig.meca(data, scale=".3")
wheredata
is apandas
DataFrame
with a column called"event_name"
, a segmentation fault occurs.Minimal Complete Verifiable Example
Full error message
System information
The text was updated successfully, but these errors were encountered: