Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on unload when running through QGIS python interpreter #361

Closed
nyalldawson opened this issue Jul 11, 2022 · 6 comments
Closed

Crash on unload when running through QGIS python interpreter #361

nyalldawson opened this issue Jul 11, 2022 · 6 comments
Assignees
Milestone

Comments

@nyalldawson
Copy link

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)
@OliverSchmitz
Copy link
Member

Hello,
thanks for reporting and your suggestions. It's already supposed to work like that, but I think the problem is located somewhere else in our code. Working on it...

@OliverSchmitz
Copy link
Member

We fixed a segfault and released a new version, that should solve this issue

@rodreras
Copy link

rodreras commented Feb 4, 2023

Hey, guys. In version QGIS 3.22.11 and 3.22.14 I still face the same problem when existing QGIS. My PCRaster version is 0.2.0

Here is all information that I provided for the issue in the QGIS Repository

qgis/QGIS#51488

Is there anything I can do to solve it?

@OliverSchmitz
Copy link
Member

thanks for reporting, we'll check it again

@rodreras
Copy link

Just reinstalled PCRaster and upgraded QGIS to 3.28 Firenze, now it closes properly!

@OliverSchmitz
Copy link
Member

Thanks for the update! I still keep #371 open as I'd like to exactly figure out what is happening at module exit...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants