Whenever the pcraster python library is installed, QGIS crashes on exit due to the pcraster library trying to deregister the loaded GDAL drivers, when the QGIS application shutdown has already handled this externally.
See eg qgis/QGIS#49242
I'm wondering if this could be handled using some logic like this:
- When pcraster library is loaded, test whether GDAL drivers have already been initialised within the environment (e.g. by checking whether an "always available" driver like the shapefile driver is available). If they've already been loaded, remember this in a global static bool somewhere
- During library unload, only deregister GDAL drivers IF pcraster was responsible for loading them (ie. by checking that global static bool)
Whenever the pcraster python library is installed, QGIS crashes on exit due to the pcraster library trying to deregister the loaded GDAL drivers, when the QGIS application shutdown has already handled this externally.
See eg qgis/QGIS#49242
I'm wondering if this could be handled using some logic like this: