Ticket #1422 (closed: fixed)
MantidPlot crashes on startup if the CurveFitting library is missing
Reported by: | Russell Taylor | Owned by: | Roman Tolchenov |
---|---|---|---|
Priority: | blocker | Milestone: | Iteration 24 |
Component: | Keywords: | ||
Cc: | Blocked By: | ||
Blocking: | Tester: | Martyn Gigg |
Description
The PropertyHandler doesn't handle that case where there are no curve fitting functions defined. It is causing a crash on Windows when compiled with VS2010, and I assume it would with VS2005 as well (Linux seems to handle it).
Here's the backtrace of the crash:
QtCored4.dll!QString::fromLatin1_helper(const char * str=0xfffffffe, int size=31) Line 3145 + 0x9 bytes C++ QtCored4.dll!QString::fromAscii_helper(const char * str=0xfffffffe, int size=31) Line 3185 + 0xd bytes C++ QtCored4.dll!QString::fromAscii(const char * str=0xfffffffe, int size=31) Line 3383 + 0xf bytes C++ QtCored4.dll!QString::fromStdString(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & s=<Bad Ptr>) Line 995 + 0x28 bytes C++ MantidPlot.exe!PropertyHandler::init() Line 88 + 0x4e bytes C++ MantidAPI.dll!Mantid::API::IFunction::setHandler(Mantid::API::FunctionHandler * handler=0x0dc82898) Line 358 C++ MantidPlot.exe!FitPropertyBrowser::createCompositeFunction(const QString & str={...}) Line 275 C++ MantidPlot.exe!FitPropertyBrowser::FitPropertyBrowser(QWidget * parent=0x0dc265a8) Line 193 + 0x27 bytes C++ MantidPlot.exe!MantidUI::MantidUI(ApplicationWindow * aw=0x0dc265a8) Line 80 + 0x26 bytes C++ MantidPlot.exe!ApplicationWindow::ApplicationWindow(bool factorySettings=false) Line 197 + 0x26 bytes C++ MantidPlot.exe!main(int argc=1, char * * argv=0x0dc22f68) Line 168 + 0x3c bytes C++ MantidPlot.exe__tmainCRTStartup() Line 555 + 0x19 bytes C MantidPlot.exe!mainCRTStartup() Line 371 C
kernel32.dll!_BaseProcessStart@4() + 0x23 bytes
Change History
comment:4 Changed 10 years ago by Roman Tolchenov
- Status changed from accepted to testing
- Resolution set to fixed
comment:5 Changed 10 years ago by Nick Draper
- Status changed from testing to verify
Moved to verify state
comment:6 Changed 10 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
Despite my best efforts to format it, that backtrace got messed up as usual. Anyway, here's the important line:
Here's that line: m_browser->m_registeredFunctions.indexOf(QString::fromStdString(m_fun->name()));
m_fun has not been initialised so BOOM!