Hi Jon,

That'll be some bit of code passing that in as a creation option (-co) 
incorrectly - the warning is quite correct that GDAL_CACHEMAX is not a valid 
creation option for file formats. You'd either need to set an environment 
variable, or call `gdal.SetConfigOption`.

I've spotted a few similar examples before - usually typos that went unnoticed 
for a long time, but a few cases like this.

Dr Daniel Evans
Software Developer

From: gdal-dev <[email protected]> On Behalf Of Jon Morris
Sent: 08 June 2020 11:00
To: Even Rouault <[email protected]>; [email protected]
Subject: Re: [gdal-dev] Segmentation fault on BuildOverviews

Thanks for the quick fix Even! I'm also getting a warning that I can't find any 
reference to in the code. We don't get this at 2.2.0, so do you know what 
version dropped support for this option?

Warning 6: driver GTiff does not support creation option GDAL_CACHEMAX

Jon

From: Even Rouault 
<[email protected]<mailto:[email protected]>>
Sent: 08 June 2020 10:41
To: [email protected]<mailto:[email protected]>
Cc: Jon Morris <[email protected]<mailto:[email protected]>>
Subject: Re: [gdal-dev] Segmentation fault on BuildOverviews


Jon,



thanks for the report. I've just pushed a fix for that



Even



> Hello all,

>

> I think I've found an edge case in gdal.Dataset.BuildOverviews. I'm using

> GDAL 3.0.4 and have found that some of our BuildOverviews tests were

> crashing out with a seg fault. On investigation, it seems to be when

> COMPRESS_OVERVIEW is set to LZW, the height is greater than the width, and

> the overview list is long enough that we will end up with some 1x1

> overviews. Here is a code snippet that reproduces the crash.

>

> from osgeo import gdal

>

> gdal.SetConfigOption('COMPRESS_OVERVIEW', 'LZW')

>

> temp_path = '/tmp/test.tif'

> drv = gdal.GetDriverByName('GTiff')

> raster_ds = drv.Create(temp_path, 5, 6, 1, gdal.GDT_Int16)

> del raster_ds

>

> tif = gdal.OpenEx(temp_path, gdal.GA_ReadOnly)

> tif.BuildOverviews('nearest', overviewlist=[2, 4, 8])

>

>

>

> The data type doesn't seem to matter (I've also tried Float32), but it seems

> that the raster dimensions are important. I couldn't get it to fail if the

> width was equal to or greater than the height.

>

> Thanks,

>

> Jon

>

> Jon Morris

> Software Developer

>

> Skype<sip:[email protected]>

>

> COVID-19. During the current outbreak JBA remains open for business and we

> continue to deliver our services. However, we have adopted flexible/remote

> workingas required. I will be receiving and reading email as normal but I

> may not always be available on the office number.

>

>

> [JBA COVID-19

> statement]<https://www.jbagroup.co.uk/sites/www.jbagroup.co.uk/files/docume

> nts/15-030%20JBA%20Business%20Continuity%20Briefing%20-%20Latest.pdf>

>

> T +44 (0) 1756 799919

> www.jbarisk.com<http://www.jbarisk.com<http://www.jbarisk.com%3chttp:/www.jbarisk.com>>

>

> [Visit our website]<http://www.jbarisk.com>

> [http://www.jbagroup.co.uk/imgstore/JBA-Email-Sig-Icons-LINKEDIN.png]

> <https://www.linkedin.com/in/jon-morris-a2897b4/> [Follow us on Twitter]

> <https://twitter.com/jbarisk> Our postal address and registered office is

> JBA Risk Management Limited, 1 Broughton Park, Old Lane North, Broughton,

> Skipton, North Yorkshire BD23 3FD.

>

> Find out more about us here: 
> www.jbarisk.com<http://www.jbarisk.com/<http://www.jbarisk.com%3chttp:/www.jbarisk.com/>>
>  and

> follow us on Twitter @JBARisk<http://twitter.com/JBARisk> and

> LinkedIn<https://www.linkedin.com/company/2370847?trk=tyah&trkInfo=clickedV

> ertical%3Acompany%2CclickedEntityId%3A2370847%2Cidx%3A2-1-2%2CtarId%3A144741

> 4259786%2Ctas%3AJBA%20RISK%20MANAGEMENT>

>

> The JBA Group supports the JBA Trust.

>

> All JBA Risk Management's email messages contain confidential information

> and are intended only for the individual(s) named. If you are not the named

> addressee you should not disseminate, distribute or copy this e-mail.

> Please notify the sender immediately by email if you have received this

> email by mistake and delete this email from your system.

>

>

> JBA Risk Management Limited is registered in England, company number

> 07732946, 1 Broughton Park, Old Lane North, Broughton, Skipton, North

> Yorkshire, BD23 3FD, Telephone: +441756799919





--

Spatialys - Geospatial professional services

http://www.spatialys.com

[JBA COVID-19 
statement]<https://www.jbagroup.co.uk/sites/www.jbagroup.co.uk/files/documents/15-030%20JBA%20Business%20Continuity%20Briefing%20-%20Latest.pdf>
Our postal address and registered office is JBA Risk Management Limited, 1 
Broughton Park, Old Lane North, Broughton, Skipton, North Yorkshire BD23 3FD.

[JBA COVID-19 
statement]<https://www.jbagroup.co.uk/sites/www.jbagroup.co.uk/files/documents/15-030%20JBA%20Business%20Continuity%20Briefing%20-%20Latest.pdf>
Our postal address and registered office is JBA Risk Management Limited, 1 
Broughton Park, Old Lane North, Broughton, Skipton, North Yorkshire BD23 3FD.
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to