___matthieu___
2014-06-25 07:56:01 UTC
Hello,
I have a command line tool that crashes while parsing the arguments on the
command line.
The crash message is :
../src/common/cmdline.cpp(369): assert "Assert failure" failed in
FindOptionByAnyName(): Unknown option verbose
Call stack:
[00] wxAppConsoleBase::OnCmdLineParsed(wxCmdLineParser&)
[01] iCPApp::OnCmdLineParsed(wxCmdLineParser&) icpfind.cpp:7
[02] wxAppConsoleBase::OnInit()
[03] wxApp::CallOnInit()
[04] wxEntry(int&, wchar_t**)
[05] main icpfind.cpp:16
[06] start
The tool is icpfind from Hugin :
http://sourceforge.net/p/hugin/hugin/ci/default/tree/src/hugin1/icpfind/icpfind.cpp#l75
In OnCmdLineParsed(wxCmdLineParser &parser), a call is made to
wxAppConsole::OnCmdLineParsed(parser)
which in turn calls
parser.Found(OPTION_VERBOSE)
which then calls
wxCmdLineParserData::FindOptionByAnyName(const wxString& name)
The problem is that this method is searching for a "--verbose" argument
which is not here and thus calls wxFAIL_MSG, causing an error window to
appear where I do not think it should be.
I tried the same tool on linux (debian jessie x86_64, wxWidgets-3.0.1) and
did not have this behavior.
If you need more information, feel free to ask,
Cheers,
Matthieu
I have a command line tool that crashes while parsing the arguments on the
command line.
The crash message is :
../src/common/cmdline.cpp(369): assert "Assert failure" failed in
FindOptionByAnyName(): Unknown option verbose
Call stack:
[00] wxAppConsoleBase::OnCmdLineParsed(wxCmdLineParser&)
[01] iCPApp::OnCmdLineParsed(wxCmdLineParser&) icpfind.cpp:7
[02] wxAppConsoleBase::OnInit()
[03] wxApp::CallOnInit()
[04] wxEntry(int&, wchar_t**)
[05] main icpfind.cpp:16
[06] start
The tool is icpfind from Hugin :
http://sourceforge.net/p/hugin/hugin/ci/default/tree/src/hugin1/icpfind/icpfind.cpp#l75
In OnCmdLineParsed(wxCmdLineParser &parser), a call is made to
wxAppConsole::OnCmdLineParsed(parser)
which in turn calls
parser.Found(OPTION_VERBOSE)
which then calls
wxCmdLineParserData::FindOptionByAnyName(const wxString& name)
The problem is that this method is searching for a "--verbose" argument
which is not here and thus calls wxFAIL_MSG, causing an error window to
appear where I do not think it should be.
I tried the same tool on linux (debian jessie x86_64, wxWidgets-3.0.1) and
did not have this behavior.
If you need more information, feel free to ask,
Cheers,
Matthieu
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users