<div dir="ltr"><div>Thanks Even</div><div><br></div><div>We tested your patch and we were not able to crash it. It looks like fixed :)<br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__<br>Entre dos pensamientos racionales <br>hay infinitos pensamientos irracionales.<br><br></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 26 Aug 2021 at 19:02, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.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>
    <p>Javier,</p>
    <p>Hopefully <a href="https://github.com/OSGeo/gdal/pull/4347" target="_blank">https://github.com/OSGeo/gdal/pull/4347</a> should solve
      that</p>
    <p>Even<br>
    </p>
    <div>Le 26/08/2021 à 18:45, Javier Jimenez
      Shaw a écrit :<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hi</div>
        <div><br>
        </div>
        <div>Some times (unfortunately it is not reproducible every
          time) we got a crash when we cancel the overview generation.</div>
        <div>I tried to reproduce it in my Ubuntu 20.04, but couldn't.
          My colleagues are able to reproduce some times on Mac and
          Windows.</div>
        <div><br>
        </div>
        <div>In C++, with GDAL 3.3.1, calling BuildOverviews("AVERAGE",
          ...) to produce embedded overview and calling the cancel
          callback, it crashes on overviews.cpp:<br>
        </div>
        <div><br>
        </div>
        <div>~PointerHolder() { CPLFree(ptr); }. (line 3929)<br>
        </div>
        <div>The reason of the crash is : Thread 34: EXC_BAD_ACCESS
          (code=1, address=0x1d)</div>
        <div>
          <div>Yes, the debugger says the value of "ptr" is 0x1d... that
            does not make so much sense.</div>
          <div><br>
          </div>
        </div>
        <div>the debugger shows this steps on the back trace:<br>
        </div>
        <div>poJob->oDstBufferHolder.reset(new
          PointerHolder(poJob->pDstBuffer));  (line 4930)</div>
        <div>GDALRegenerateOverviewsMultiBand (line 4638)<br>
          <br>
        </div>
        <div><br>
        </div>
        <div>Before calling to BuildOverviews I am calling</div>
        <div>CPLSetConfigOption("GDAL_NUM_THREADS", "ALL_CPUS");</div>
        <div>to make it multithreaded.</div>
        <div><br>
        </div>
        <div>The image is an RGBA 8bit with JPEG compression.</div>
        <div><br>
        </div>
        <div>Is anything wrong there?<br>
        </div>
        <div><br>
        </div>
        <div>Thanks.<br>
        </div>
        <div>
          <div>
            <div dir="ltr">.___ ._ ..._ .. . ._. 
              .___ .. __ . _. . __..  ... .... ._ .__<br>
              Entre dos pensamientos racionales <br>
              hay infinitos pensamientos irracionales.<br>
              <br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

</blockquote></div>