Forum

Author Topic: Program crashes when calling linear algebra methods of numpy  (Read 2112 times)

dobedobedo

  • Newbie
  • *
  • Posts: 31
    • View Profile
Program crashes when calling linear algebra methods of numpy
« 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.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14839
    • View Profile
Re: Program crashes when calling linear algebra methods of numpy
« Reply #1 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.
Best regards,
Alexey Pasumansky,
Agisoft LLC

dobedobedo

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Program crashes when calling linear algebra methods of numpy
« Reply #2 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.
« Last Edit: April 05, 2022, 06:47:28 PM by dobedobedo »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14839
    • View Profile
Re: Program crashes when calling linear algebra methods of numpy
« Reply #3 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.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14839
    • View Profile
Re: Program crashes when calling linear algebra methods of numpy
« Reply #4 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
Best regards,
Alexey Pasumansky,
Agisoft LLC

dobedobedo

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Program crashes when calling linear algebra methods of numpy
« Reply #5 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.