You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting crash with mbgrid at the end when it calls GMT to free header->ProjRefPROJ4. Surprisingly this only occurs with GMT debug builds. I say surprisingly because it should happen also with normal builds. The issue, I think, is that in mb_readwritegrd()
if ((eErr = OSRExportToProj4(hSRS, &header->ProjRefPROJ4)) != OGRERR_NONE) {
fprintf(stderr, "Failed to convert the SRS to Proj syntax\n");
}
OSRDestroySpatialReference(hSRS);
}
fprintf(stderr,"header->ProjRefPROJ4:%s\n", header->ProjRefPROJ4);
but that allocates the pointer header->ProjRefPROJ4 in GDAL but that pointer is then freed in GMT. On Windows this is a no-no. One cannot cross-dlls like that. Memory allocated in one dll must be freed in it.
On GMT we deal with that case using a temporary variable, like
Sorry, should have thought on that. It's still no good because the same problem remains. Now it's allocated in MB and freed in GMT. But we happen to have a function that saves the situation. Please use
I'm getting crash with mbgrid at the end when it calls GMT to free
header->ProjRefPROJ4
. Surprisingly this only occurs with GMT debug builds. I say surprisingly because it should happen also with normal builds. The issue, I think, is that inmb_readwritegrd()
but that allocates the pointer
header->ProjRefPROJ4
in GDAL but that pointer is then freed in GMT. On Windows this is a no-no. One cannot cross-dlls like that. Memory allocated in one dll must be freed in it.On GMT we deal with that case using a temporary variable, like
also, there is no need to
The text was updated successfully, but these errors were encountered: