Access violation (Crash) with OGRCreateCoordinateTransformation
|Reported by:||vindoctor||Owned by:||warmerdam|
|Severity:||blocker||Keywords:||OGRCreateCoordinateTransformation crash mulit threaded|
Thanks for fixing/backing out the changes with the raster warping! Just tested it and it works great. This new issue is a bit harder to narrowing down the fix. Note, my code worked for years, so its a recent change within gdal. Our app can open(shared) and close a vector datasource at the same time with multiple threads. If the layer in the datasource is not in the projection needed, its then projected within these threads. This crash is in an area that kind of looks like resource management/nodes to keep down memory fragmentation or the overall memory footprint? I'm hoping you guys will know what has changed recently and where to start looking, or provide me some guidance on how to get more detail to what leads up to this. This below is a copy/paste out of the vs2012's callstack window. I do notice my other threads also have this datasource open. Maybe I add some critical sections around something within my app to try to narrow down the cause (not sure what I would protected just yet to debug this). Note, its always crashing with this same callstack.
ntdll.dll!77ba2685() Unknown ntdll.dll!77ba2685() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!77ba25df() Unknown msvcr110.dll!malloc(unsigned int size=434571600) Line 91 msvcr110.dll!realloc(void * pBlock=0x19e70950, unsigned int newsize=434571600) Line 85 gdal110.dll!VSIRealloc(void * pData=0x19e70950, unsigned int nNewSize=8) Line 622 gdal110.dll!CPLRealloc(void * pData=0x19e70950, unsigned int nNewSize=8) Line 199 gdal110.dll!OGR_SRSNode::InsertChild?(OGR_SRSNode * poNew=0x25a12958, int iChild=1) Line 241 gdal110.dll!OGR_SRSNode::AddChild?(OGR_SRSNode * poNew=0x25a12958) Line 214 gdal110.dll!OGR_SRSNode::Clone() Line 357 gdal110.dll!OGR_SRSNode::Clone() Line 356 gdal110.dll!OGR_SRSNode::Clone() Line 356 gdal110.dll!OGR_SRSNode::Clone() Line 356 gdal110.dll!OGRSpatialReference::Clone() Line 532 gdal110.dll!OGRProj4CT::InitializeNoLock?(OGRSpatialReference * poSourceIn=0x25918408, OGRSpatialReference * poTargetIn=0x114ef9d0) Line 562 gdal110.dll!OGRProj4CT::Initialize(OGRSpatialReference * poSourceIn=0x25918408, OGRSpatialReference * poTargetIn=0x114ef9d0) Line 544 gdal110.dll!OGRCreateCoordinateTransformation(OGRSpatialReference * poSource=0x25918408, OGRSpatialReference * poTarget=0x114ef9d0) Line 410