-
Notifications
You must be signed in to change notification settings - Fork 225
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
getting malloc error while dealing with dates. #1691
Comments
Thanks for the issue report - we should raise an error for this case. You need to specify the symbol parameters when using plot if they are not provided as part of your data:
|
If the symbol parameter |
That is what I thought, I attended to plot a line. |
Thanks for the clarification, I'll work on debugging the issue. |
This looks like an upstream bug. Here is a smaller script to reproduce the issue:
Ping @meghanrjones or @PaulWessel to see if you have time debugging it. |
I'll try again to debug tomorrow. I ran into a wall last time, if that happens again I will at least post what I find. |
GMT changes the method from GMT_IN|GMT_IS_REFERENCE to GMT_IN|GMT_IS_DUPLICATE for any cases with non-double data (see https://github.com/GenericMappingTools/gmt/blob/a8bbbcf59ef6d4d20a456278f52605328df046a6/src/gmt_api.c#L9020-L9022). The data are duplicated for So, there is a problem with passing GMT_DATASET structures via GMT_IS_REFERENCE. I found that this crash started after GenericMappingTools/gmt#5953 was merged. @PaulWessel, would you be able to take another look at the memory management for this case? Here is the simple example that fails for this case:
|
I would love to debug this one but apparently the conda stuff is still Intel only, which makes it pretty hard to debug on M1. But if you can do this you should be able to determine what is the difference between the two cases. I dont understand my a double array gets duplicated (double is the natural type of datasets). A re you sure it is not the integer array that requires duplication - surely it does? |
sorry, copy-paste error when making the comment. Yes, double arrays are referenced (and crash). int arrays are duplicated (without issue). |
What exactly did you mean? Installing GMT from conda works well on my M1. |
My experience has been that my conda installation (I have used miniconda but same with conda) the binaries are all Intel and things run under Rosetta2. Thus, when I try to debug I get failures due to mixed architectures.... |
I haven't tried to debug PyGMT in Xcode on M1. |
This was fixed by GenericMappingTools/gmt#6521. I added a C API test so I don't think we need another regression test in the PyGMT repository. |
I've triggered a GMT dev version bump at conda-forge/gmt-feedstock#203, so once that's merged in a few hours (and assuming you don't mind using an unstable GMT version), you can either:
Either method should give you the latest patched version of GMT. Let us know if it works or if you need any additional clarification. |
Description of the problem
I am getting the following error while dealing with plotting time-series(dates as x-axis):
python(34471,0x1169cd5c0) malloc: *** error for object 0x7fcd964cf330: pointer being freed was not allocated
python(34471,0x1169cd5c0) malloc: *** set a breakpoint in malloc_error_break to debug
I am not sure it may be an upstream GMT issue
Full code that generated the error
the script above works when changing the
fig.plot
to be:but fails with
np.zeros
,np.random.rand
, and my real-world data.Full error message
System information
The text was updated successfully, but these errors were encountered: