Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: dobedobedo on April 03, 2022, 12:25:50 PM

Title: Program crashes when calling linear algebra methods of numpy
Post by: dobedobedo on April 03, 2022, 12:25:50 PM
Hi,
I would like to report that Metashape 1.8.2 crashes whenever I try to call linear algebra methods from numpy.
I tried

Code: [Select]
np.dot
np.linalg.lstsq

And they all crashes the program.
I tried to use them with the Python comes with Metashape from a terminal outside Metashape, and it didn't cause problems.
I guess there might be something related to QT.
The numpy version is 1.22.3, and scipy is 1.8.0.
Title: Re: Program crashes when calling linear algebra methods of numpy
Post by: Alexey Pasumansky on April 04, 2022, 03:23:48 PM
Hello dobedobedo,

Which OS version you are using?

Also if you observe the Crash Reporter window after the application crash, please submit the report and put the link to this forum thread to the comments field.
Title: Re: Program crashes when calling linear algebra methods of numpy
Post by: dobedobedo on April 05, 2022, 05:34:48 PM
Hi,
My OS is up-to-date Manjaro Linux with kernel 5.15.28.
Yes, I reported the crash several times  ;D.
I just reported another one with the link in the comment. Hope it helps.
Title: Re: Program crashes when calling linear algebra methods of numpy
Post by: Alexey Pasumansky on April 05, 2022, 07:55:23 PM
Hello dobedobedo,

We were able to reproduce the problem and will analyze it in order to find out the problem and find the possible solution. So far it seems that the problem is related to OpenBLAS library.
Title: Re: Program crashes when calling linear algebra methods of numpy
Post by: Alexey Pasumansky on April 06, 2022, 04:31:32 PM
Hello dobedobedo,

Can you please try the following workaround:
Code: [Select]
mv lib/libopenblas.so.0 lib/_libopenblas.so.0.disabled
cp python/lib/python3.8/site-packages/numpy.libs/* lib/
mv lib/libopenblas* lib/libopenblas.so.0
Title: Re: Program crashes when calling linear algebra methods of numpy
Post by: dobedobedo on April 06, 2022, 07:45:19 PM
Hi Alexey,
Replacing the libopenblas file works. Thanks. Hopefully, it will be fixed in the next release.