Bug report #22065

Updated by Jürgen Fischer over 5 years ago

This bug was initially reported on https://github.com/PANOimagen/profiletool/issues/23
A workaround has been implemented on ProfileTool to avoid the crash by deactivating the offending h5py import, but the underlying conflicting libraries still exist, this bug should affect any python plugin using h5py.

This does not seem to affect to QGis standalone/Os4Geo Express Desktop installs, but rather os4geo installations with custom installation options. It has been reported on Windows installations using os4geo installer with custom installation options and Mac (QGis 3.4.7 and 3.6.2 from Homebrew/Lutraconsulting).

Some of the libraries/applications bundled by Os4Geo installer seem to be compiled/running against different versions of hdf5 library, which causes QGis to crash when module h5py is imported from a Python plugin via a ```import h5py``` statement. However, running ```import h5py``` from Python console throws an 'ImportError', but does not cause the application to crash.

To reproduce the issue on a Windows machine:
- Download os4geo installer.
- Select *all* packages for installation.
- Once installed, launch QGis and select ProfileTool (version <= 4.1.6) for installing (the crash can also be triggered installing ProfileTool version <= 4.1.6 manually on python/plugins folder.)

A stack trace quite similar to this one appears also on issues #21811, #19803 and #21170 issues:

https://issues.qgis.org/issues/21811
https://issues.qgis.org/issues/19803
https://issues.qgis.org/issues/21170


We could pin this down to h5py was thanks to a stack trace on a similar matlab/h5py issue (https://github.com/NeurodataWithoutBorders/api-python/issues/28) where the PyInit__conv call is bound to h5py_conv.cp36-win_amd64.pyd

Back