xpano icon indicating copy to clipboard operation
xpano copied to clipboard

A lot of images in one panorama -> too high mem usage -> crash.

Open justanothergithubuserNr2 opened this issue 1 year ago • 3 comments

Bug description If I try to stitch a panorama with a lot of (12, 15, 20 or more) images, the stitching progress is working normal from 0 up to a point of 90-99%. But at this point, the progress slows down dramatically and memory usage is starting to increase, until all my RAM and swap is used and Xpano crashes (or get killed by the OS?). Sometimes, this happens while calculating the preview, sometimes you can calculate the preview but it you calculate high res to export, it crashes. I have 16GB RAM and 8GB swap, which is way more than a lot of other computer have.

Desktop (please complete the following information):

  • OS: Ubuntu Linux 22.04
  • Version: 0.15.1
  • Method of installation: Flatpak

Welcome and thanks for the report!

Seems like a bug in the algorithm, it shouldn't eat 16gb for this number of photos, how many MPx are they? I have tested with 14 images (24Mpx) and the memory usage tops about ~ 4gb.

Can you please have a look after a crash in ~/.local/share/krupkat/Xpano/ in the logs and look if there are any errors? Or you can copy paste here.

If there is nothing there, it would be great if you could share some photos where it crashes (you can send them privately as well, my contact is at https://krupkat.cz/)

krupkat avatar Jul 02 '23 19:07 krupkat

In one setup that fails there are 19 images with a size of 4032x3024px with 2-3 buildings and more than 7 trees. Perhaps the trees cause the problems because their leaves cause many features in the images?

The feature counts are likely not an issue, I have found two different problems so far:

  1. Will be solved by #107

  2. In some cases Multiblend tries to allocate a vector of negative size (here: image.cpp), I'll have to investigate this more.

krupkat avatar Jul 10 '23 19:07 krupkat