Ticket #1422 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

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:1 Changed 10 years ago by Russell Taylor

Despite my best efforts to format it, that backtrace got messed up as usual. Anyway, here's the important line:

MantidPlot.exe!PropertyHandler::init() Line 88 + 0x4e bytes C++

Here's that line: m_browser->m_registeredFunctions.indexOf(QString::fromStdString(m_fun->name()));

m_fun has not been initialised so BOOM!

comment:2 Changed 10 years ago by Roman Tolchenov

(In [5351]) Disable curve fitting if the fitting plugin is missing. re #1422

comment:3 Changed 10 years ago by Roman Tolchenov

  • Status changed from new to accepted

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

comment:7 Changed 10 years ago by Martyn Gigg

  • Status changed from verifying to closed

Working in #5882

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2269

Note: See TracTickets for help on using tickets.