Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • otb otb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 207
    • Issues 207
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge requests
  • !932

Fix Segfault when reaching output image informations before calling Execute()

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Julien Osman requested to merge 2288-python_segfault into develop Sep 20, 2022
  • Overview 0
  • Commits 2
  • Pipelines 2
  • Changes 4

Summary

Testing if the Execute() function has been called before accessing output image information. If not, raise an exception.

Rationale

Fix #2288 (closed)

Implementation Details

Classes and files

The class attribute Application::m_ExecuteDone allows to know if the function Application::Execute has been called. In this MR, we add a test to check this attribute in Application::GetParameterImageBase before returning the output image. If not, an exception is raised, with an explicit message.

Tests

Add a new unit test to check that the following functions raise an exception if called before Execute():

  • Application::GetImageOrigin
  • Application::GetImageSpacing
  • Application::GetImageSize
  • Application::GetImageNbBands
  • Application::PropagateRequestedRegion
  • Application::GetImageRequestedRegion
  • Application::SetImageMetadata
  • Application::GetMetadataDictionary
  • Application::GetImageBasePixelType

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 Sep 22, 2022 by Julien Osman
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 2288-python_segfault