Skip to content

Conversation

m90
Copy link

@m90 m90 commented May 23, 2025

The colmap executable can return exit codes greater than 255. In the special case of 256, which for example happens on a bad input path

E0523 15:37:08.226591     8 logging.cc:56] [option_manager.cc:833] Check failed: ExistsDir(*image_path)
E0523 15:37:08.226668     8 option_manager.cc:899] Invalid options provided.
ERROR:root:Feature extraction failed with code 256. Exiting.

this seems to overflow to 0, making scripted tools think the invocation succeeded. Considering behavior of POSIX exit codes that are outside of the range between 0 and 255 seems to be undefined, it probably makes sense to just exit 1 on anything above 255. The exit code returned by invoking colmap will still be printed for debugging.

@m90 m90 changed the title Prevent exit codes >= 255 in convert.py Prevent exit codes > 255 in convert.py May 23, 2025
@m90 m90 force-pushed the fix-exit-codes branch from 2888b7f to 92bb250 Compare May 23, 2025 19:02
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.

1 participant