Skip to content

Fix segfault in Monteverdi

Cédric Traizet requested to merge mvd_metadata_check into develop

Summary

Closes #2241 (closed)

Implementation Details

Ice uses (non owning) pointers to store ImageMetadata

These pointers should be checked before being dereferenced. The current check in GlImageActor::UpdateTransforms does not do what it is supposed to do :

  • if m_ViewportToImageTransform or m_ImageToViewportTransform is nullptr then the methods assume the geometry has changes, which is false and was not the behavior of the method in OTB 7.4. I don't know the consequence of this change, I think it only cause one additionnal identity transform to be instantiated. ut at least the pointers are tested for these two cases
  • settings->GetImageMetadata() was never tested, which is the cause of #2241 (closed)

This MR solve these bugs by performing pointer checks before dereferencing.

It also fix an inversion between input and output metadata in ImageToViewportTransform

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
  • Optionally, run git diff develop... -U0 --no-color | clang-format-diff.py -p1 -i on latest changes and commit
Edited by Cédric Traizet

Merge request reports