<div dir="ltr">I apologize for resurrecting this thread, but we are running into the same problem, even after updating the the head of the "release/3.0" branch which contains Even's fix.<div><br></div><div>Previously, we would set PROJ_LIB as an environment variable but after upgrading to 3.x/6.x we now receive thousands of "proj.db not found" errors. After checking out the above branch, I removed the environment variable and call OSRSetPROJSearchPaths before calling GDALAllRegister at the start of my main thread but the problem remains.<br></div><div><br></div><div>What's odd is that it only happens if we use a lot of threads, which makes me think there may still be a race condition somewhere in GDAL?</div><div><br></div><div>If I change my code to be single-threaded, the problem goes away completely.</div><div><br></div><div>And advice you could offer would be much appreciated.</div><div><br></div><div>Thanks!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 17, 2019 at 1:27 PM Dirk Vanden Boer <<a href="mailto:dirk.vdb@gmail.com">dirk.vdb@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op wo 17 jul. 2019 om 17:57 schreef Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> I did some more investigation, and it seems like the threading is<br>
> indeed not the issue.<br>
> The issue seems to be that the geotiff library also creates proj<br>
> contexts and these contexts do not have<br>
> the search paths that are passed to the OSRGetProjTLSContext call.<br>
<br>
Should be fixed per<br>
<a href="https://github.com/OSGeo/gdal/commit/48793b5613cf1bf789125516ba845947dc63098f" rel="noreferrer" target="_blank">https://github.com/OSGeo/gdal/commit/48793b5613cf1bf789125516ba845947dc63098f</a><br>
in master<br>
and<br>
<a href="https://github.com/OSGeo/gdal/commit/ffb0ad0c862cf4ef5d6907d1d83cc76fcf8c305b" rel="noreferrer" target="_blank">https://github.com/OSGeo/gdal/commit/ffb0ad0c862cf4ef5d6907d1d83cc76fcf8c305b</a><br>
in 3.0 branch<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote><div dir="auto"><br></div><div dir="auto">Great, thanks for the quick response and fixes!</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br></blockquote></div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div>