Forum

Author Topic: Masking photo bug  (Read 1856 times)

daniil.s.nikulin

  • Newbie
  • *
  • Posts: 4
    • View Profile
Masking photo bug
« on: June 26, 2019, 03:06:05 PM »
Hello,

I have a one "heisenbug" in import of mask.
Sometimes this code:
Code: [Select]
        chunk.importMasks(
            os.path.join(DATA_DIR_PATH, 'mask.jpg'),
            cameras=set(chunk.cameras),
            source=ps.MaskSource.MaskSourceFile
        )
throw warning:  "Warning! Duplicate element keys not allowed"
and then throw exception with same message.

Name of cameras are unique. Sometimes this operation ending successfully, but sometimes not. Important that I have different results (fail/success) on same input data.

This bug was appearing on different version of Metashape.

Metashape.version = 1.5.1 / 1.5.2 / 1.5.3
OS = Ubuntu 16.04 / Windows 10
« Last Edit: June 26, 2019, 05:36:03 PM by daniil.s.nikulin »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14818
    • View Profile
Re: Masking photo bug
« Reply #1 on: June 26, 2019, 06:17:23 PM »
Hello daniil.s.nikulin,

Looks like a similar issue to the following:
https://www.agisoft.com/forum/index.php?topic=10997

But as I assume, there's no stable way to reproduce the issue, just keep trying?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14818
    • View Profile
Re: Masking photo bug
« Reply #2 on: June 26, 2019, 07:33:04 PM »
As we assume, after a brief investigation, the problem could be related to the multithreading (may appear due to big number of CPU cores). We will try to add more checks for the mask import operation to avoid this problem in future.
Best regards,
Alexey Pasumansky,
Agisoft LLC