Skip to content

Do no free external trailing text strings - #7557

Merged
PaulWessel merged 4 commits into
masterfrom
protect-ext-text
Jun 22, 2023
Merged

Do no free external trailing text strings#7557
PaulWessel merged 4 commits into
masterfrom
protect-ext-text

Conversation

@PaulWessel

Copy link
Copy Markdown
Member

See GenericMappingTools/pygmt#2524 for background. Sees we are trying to free strings thar belong to Python and not GMT. However, not solved yet.

@seisman if you see other places in the code where we need to do something like here, let me know. I see we have a VECTOR hidden flag for VH->alloc_mode_text and now we added a per segment SH->alloc_mode_text. Suspect there is still some lack of communication between vector and segment internally that is missing.
Will return to this later but feel tree to try it. It still have me the same messages.

See GenericMappingTools/pygmt#2524 for background. Sees we are trying to free strings thar belong to Python and not GMT. However, not solved yet.
@PaulWesselPaulWessel added the bug Something isn't working label Jun 19, 2023
@PaulWesselPaulWessel added this to the 6.5.0 milestone Jun 19, 2023
@PaulWessel
PaulWessel requested a review from seismanJune 19, 2023 09:17
@PaulWesselPaulWessel self-assigned this Jun 19, 2023
Comment threadsrc/gmt_io.c Outdated
gmt_M_str_free (S->text[row]);
gmt_M_free (GMT, S->text);
if (S->text == NULL) return; /* No trailing text array */
if (SH->alloc_mode_text == GMT_ALLOC_INTERNALLY) { /* We can free these strings */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Text misalignment here

Comment threadsrc/gmt_io.c Outdated
PaulWesseland others added 2 commits June 22, 2023 11:37
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@PaulWesselPaulWessel changed the title WIP Do no free external trailing text stringsDo no free external trailing text stringsJun 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@PaulWessel@joa-quim@seisman