Page MenuHomePhabricator

Workbench aborts if passed an invalid command line option
Open, LowPublic

Description

Just noticed this while trying to find the right Qt plugin options.

Calling

./MitkWorkbench -abc

produces this

terminate called after throwing an instance of 'Poco::Util::UnknownOptionException'
  what():  Unknown option specified

Program received signal SIGABRT, Aborted.

Technically there is some information for the user, but I think SIGABRT is considered as an unclean exist, it could e.g. trigger some OS level crash reporting.

Stack trace:

#0  0x00007ffff73f69d5 in raise () from /lib64/libc.so.6
#1  0x00007ffff73df8a4 in abort () from /lib64/libc.so.6
#2  0x00007ffff763d926 in __gnu_cxx::__verbose_terminate_handler() [clone .cold] () from /lib64/libstdc++.so.6
#3  0x00007ffff76491ac in __cxxabiv1::__terminate(void (*)()) () from /lib64/libstdc++.so.6
#4  0x00007ffff7649217 in std::terminate() () from /lib64/libstdc++.so.6
#5  0x00007ffff76494c9 in __cxa_throw () from /lib64/libstdc++.so.6
#6  0x00007ffff72b8c54 in Poco::Util::OptionSet::getOption (this=0x7fffffffe178, name="abc", matchShort=true)
    at /home/nolden/prj/mitk/dbg/ep/src/Poco/Util/src/OptionSet.cpp:106
#7  0x00007ffff72b7f4b in Poco::Util::OptionProcessor::processCommon (this=0x7fffffffda20, optionStr="abc",
    isShort=true, optionName="", optionArg="")
    at /home/nolden/prj/mitk/dbg/ep/src/Poco/Util/src/OptionProcessor.cpp:136
#8  0x00007ffff72b7c49 in Poco::Util::OptionProcessor::processUnix (this=0x7fffffffda20, argument="-abc",
    optionName="", optionArg="") at /home/nolden/prj/mitk/dbg/ep/src/Poco/Util/src/OptionProcessor.cpp:98
#9  0x00007ffff72b788f in Poco::Util::OptionProcessor::process (this=0x7fffffffda20, argument="-abc", optionName="",
    optionArg="") at /home/nolden/prj/mitk/dbg/ep/src/Poco/Util/src/OptionProcessor.cpp:53
#10 0x00007ffff7293a8b in Poco::Util::Application::processOptions (this=0x7fffffffe0f0)
    at /home/nolden/prj/mitk/dbg/ep/src/Poco/Util/src/Application.cpp:402
#11 0x00007ffff7291531 in Poco::Util::Application::init (this=0x7fffffffe0f0)
    at /home/nolden/prj/mitk/dbg/ep/src/Poco/Util/src/Application.cpp:171
#12 0x00007ffff7290d6e in Poco::Util::Application::init (this=0x7fffffffe0f0, argc=2, argv=0x7fffffffe2e8)
    at /home/nolden/prj/mitk/dbg/ep/src/Poco/Util/src/Application.cpp:133
#13 0x00007ffff7fa6792 in mitk::BaseApplication::run (this=0x7fffffffe0f0)
    at /home/nolden/prj/mitk/src/Modules/AppUtil/src/mitkBaseApplication.cpp:837
#14 0x0000000000402585 in main (argc=2, argv=0x7fffffffe2e8)
    at /home/nolden/prj/mitk/src/Applications/Workbench/MitkWorkbench.cpp:46

Event Timeline

nolden created this task.