Skip to content

Crash on unload when running through QGIS python interpreter #361

Description

@nyalldawson

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:

  1. 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
  2. During library unload, only deregister GDAL drivers IF pcraster was responsible for loading them (ie. by checking that global static bool)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions