Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qmlSfmData] Handle exceptions and do not attempt to load invalid files #49

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

cbentejac
Copy link
Contributor

@cbentejac cbentejac commented Oct 26, 2023

This PR addresses 3 issues that stem from #45:

  1. If a file that contained something other than an SfMData was provided to the SfmDataEntity, an unhandled exception was raised and led to a crash. That exception is now caught, and an error message printed.
  2. If a file that contained either no or an empty SfMData file was provided, the SfmDataEntity was still attempting to create all the 3D components to display it, and the status was always set to Ready no matter what. With this PR, if the SfMData remains uninitialized (that might be the case if an exception from (1) is thrown), no 3D component is created and the status is set to Error.
  3. If a valid SfMData file contains no 3D information, the behaviour was the same as in (2), and the SfmDataEntity ended up loading and setting everything up although there was nothing to display. The lack of 3D info is now detected prior to creating and setting up all the 3D components. The status is also set to Error.

This relates to alicevision/Meshroom#2230.

@cbentejac cbentejac self-assigned this Oct 26, 2023
@cbentejac cbentejac changed the title [QmlSfmData] Handle exceptions and do not attempt to load invalid files [qmlSfmData] Handle exceptions and do not attempt to load invalid files Oct 26, 2023
src/qmlSfmData/SfmDataEntity.cpp Outdated Show resolved Hide resolved
@cbentejac cbentejac force-pushed the fix/3dViewerLoading branch from 622564c to 3993cca Compare October 26, 2023 17:36
@fabiencastan fabiencastan merged commit baf6169 into develop Oct 27, 2023
@fabiencastan fabiencastan deleted the fix/3dViewerLoading branch October 27, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants