Ticket #10365 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

SliceViewer crash

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: blocker Milestone: Release 3.3
Component: GUI Keywords:
Cc: Blocked By:
Blocking: #9995 Tester: Federico M Pouzols

Description

Issue reported by Ross Stuart

  • Uses SofQW3.
  • Plots in the SliceViewer
  • Brings up the LineViewer
  • Moves the line -> Crash. Bad alloc

I can reproduce the error starting with this

# create sample inelastic workspace for MARI instrument containing 1 at all spectra
ws=CreateSimulationWorkspace(Instrument='MAR',BinParams='-10,1,10')
# convert workspace into Matrix workspace with Q-dE coordinates
ws=SofQW3(InputWorkspace=ws,QAxisBinning='-3,0.1,3',Emode='Direct',EFixed=12)

plotSlice(ws)

Attachments

Screen Shot 2014-10-09 at 12.22.04.png (87.7 KB) - added by Owen Arnold 6 years ago.
Screen Shot 2014-10-20 at 13.34.14.png (78.2 KB) - added by Owen Arnold 6 years ago.

Change History

Changed 6 years ago by Owen Arnold

comment:1 Changed 6 years ago by Owen Arnold

  • Priority changed from major to blocker
  • Component changed from Framework to User Interface
  • Milestone changed from Backlog to Release 3.3

comment:2 Changed 6 years ago by Nick Draper

  • Owner set to Owen Arnold
  • Status changed from new to assigned

comment:3 Changed 6 years ago by Owen Arnold

  • Status changed from assigned to inprogress

refs #10365. Add regression test.

No fix yet. But helps with TDD.

Changeset: 55a549a037806e9ea50219f475f952ab1b2338e7

comment:4 Changed 6 years ago by Owen Arnold

refs #10365. Use numeric axis not y values!

Changeset: f1a7939dc3756bcdb6beeab50463fa938bda5343

comment:5 Changed 6 years ago by Owen Arnold

Still need to work out why it's crashing out here:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libstdc++.6.dylib             	0x00007fff894defde std::string::compare(std::string const&) const + 10
1   MantidPlotExec                	0x000000010df47cdb bool std::operator!=<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 35
2   libMantidKernel.dylib         	0x000000010eff6d69 Mantid::Kernel::PropertyWithValue<bool>::operator==(Mantid::Kernel::PropertyWithValue<bool> const&) const + 71 (PropertyWithValue.h:341)
3   MantidPlotExec                	0x000000010dfca662 Mantid::Kernel::IPropertyManager* Mantid::Kernel::IPropertyManager::setTypedProperty<bool>(std::string const&, bool const&, boost::integral_constant<bool, false> const&) + 270
4   MantidPlotExec                	0x000000010e01a99d Mantid::Kernel::IPropertyManager* Mantid::Kernel::IPropertyManager::setProperty<bool>(std::string const&, bool const&) + 57
5   libMantidQtSliceViewer.dylib  	0x0000000111a70562 MantidQt::SliceViewer::LineViewer::applyMatrixWorkspace(boost::shared_ptr<Mantid::API::MatrixWorkspace>) + 1436 (LineViewer.cpp:309)
6   libMantidQtSliceViewer.dylib  	0x0000000111a73c53 MantidQt::SliceViewer::LineViewer::apply() + 657 (LineViewer.cpp:488)
7   libMantidQtSliceViewer.dylib  	0x0000000111afa3ef MantidQt::SliceViewer::SliceViewerWindow::lineChanged(QPointF, QPointF, double) + 93 (SliceViewerWindow.cpp:367)
8   libMantidQtSliceViewer.dylib  	0x0000000111b0a258 MantidQt::SliceViewer::SliceViewerWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 496 (moc_SliceViewerWindow.cxx:82)
9   QtCore                        	0x00000001139171ee QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 1566
10  libMantidQtSliceViewer.dylib  	0x0000000111b0790c MantidQt::SliceViewer::LineOverlay::lineChanged(QPointF, QPointF, double) + 180 (moc_LineOverlay.cxx:110)
11  libMantidQtSliceViewer.dylib  	0x0000000111a6a513 MantidQt::SliceViewer::LineOverlay::mouseReleaseEvent(QMouseEvent*) + 219 (LineOverlay.cpp:597)
12  QtGui                         	0x000000011296b355 QWidget::event(QEvent*) + 2421
13  QtGui                         	0x000000011290e9ed QApplicationPrivate::notify_helper(QObject*, QEvent*) + 189
14  QtGui                         	0x0000000112915590 QApplication::notify(QObject*, QEvent*) + 2384
15  MantidPlotExec                	0x000000010dfafc24 MantidApplication::notify(QObject*, QEvent*) + 74
16  QtCore                        	0x00000001138ff20c QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
17  QtGui                         	0x0000000112912fdd QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) + 333
18  QtGui                         	0x00000001128c2acb qt_mac_handleMouseEvent(NSEvent*, QEvent::Type, Qt::MouseButton, QWidget*, bool) + 763
19  com.apple.AppKit              	0x00007fff9068d5d6 -[NSWindow sendEvent:] + 7053
20  QtGui                         	0x00000001128b7bb7 -[QCocoaWindow sendEvent:] + 87
21  com.apple.AppKit              	0x00007fff90689644 -[NSApplication sendEvent:] + 5761
22  QtGui                         	0x00000001128bcbf4 -[QNSApplication sendEvent:] + 84
23  com.apple.AppKit              	0x00007fff9059f21a -[NSApplication run] + 636
24  QtGui                         	0x00000001128c7a80 QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1824
25  QtCore                        	0x00000001138fe114 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 68
26  QtCore                        	0x00000001138fe4c4 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 324
27  QtCore                        	0x0000000113900bac QCoreApplication::exec() + 188
28  MantidPlotExec                	0x000000010e19c4f7 main + 4355
29  libdyld.dylib                 	0x00007fff8d2d17e1 start + 1

comment:6 Changed 6 years ago by Owen Arnold

refs #10365. Missing init call.

We don't need a managed algorithm. Not sure how this ever worked! Later on, I'll create a MantidPlot test for the Rebin2D lineviewer functionality to stop this from falling over again.

Changeset: 8b6a517bd47b30fa52387a3da6920c654a861a04

Changed 6 years ago by Owen Arnold

comment:7 Changed 6 years ago by Owen Arnold

  • Status changed from inprogress to verify
  • Resolution set to fixed

This is fixed now (screenshot above was part of my testing) taken from the original problem provided by the user.

Tester, you are best off using the small example in the ticket description to test this. There should be no crash. The plotting in the SliceViewer LinePlot should work. However, you will note that the Y scale of the plots is wrong (prints SpectraNumber), which is a general problem, which I will open a separate ticket up for.

comment:8 Changed 6 years ago by Owen Arnold

Created #10365 for the plot axis label issue.

comment:9 Changed 6 years ago by Owen Arnold

refs #10365. Fix warnings.

Changeset: a16912806148eabc0635043a108d54ebb9e3ee7c

comment:10 Changed 6 years ago by Federico M Pouzols

  • Status changed from verify to verifying
  • Tester set to Federico M Pouzols

comment:11 Changed 6 years ago by Federico M Pouzols

  • Status changed from verifying to closed

I'm happy to confirm the crash in previous versions, and that after the fix there's no crash

Before, you would get a pop-up as in the screenshot, and messages like this:

tcmalloc: large alloc 1073741824 bytes == 0x44434000 @  0x7f377e22bdcb 0x7f377e22bf1b 0x7f377e22bf35 0x7f377e22bba5 0x7f377e22c474 0x7f377e22c544 0x7f377e25e87e 0x7f37844d7d8f 0x7f37844d7e40 0x7d7274 0x7f37841df178 0x7f37841dfbf7 0x7f37841dffb5 0x7f37841e9dc7 0x7f37841e664a 0x7f3786ffe4f0 0x7f378704009f 0x7f37845d7c5c 0x7f378703e6cc 0x7f3786ff42c5 0x7f378531cf37 0x7f37852c931c 0x7f37852cff7f 0x862959 0x7f37845c2cad 0x7f37852cf5af 0x7f37853462fe 0x7f3785344cb2 0x7f378536df92 0x7f3778fb4c5d 0x7f3778fb4f48
tcmalloc: large alloc 2147491840 bytes == 0x84434000 @  0x7f377e22bdcb 0x7f377e22bf1b 0x7f377e22bf35 0x7f377e22bba5 0x7f377e22c474 0x7f377e22c544 0x7f377e25e87e 0x7f37844d7d8f 0x7f37844d7e40 0x7d7274 0x7f37841df178 0x7f37841dfbf7 0x7f37841dffb5 0x7f37841e9dc7 0x7f37841e664a 0x7f3786ffe4f0 0x7f378704009f 0x7f37845d7c5c 0x7f378703e6cc 0x7f3786ff42c5 0x7f378531cf37 0x7f37852c931c 0x7f37852cff7f 0x862959 0x7f37845c2cad 0x7f37852cf5af 0x7f37853462fe 0x7f3785344cb2 0x7f378536df92 0x7f3778fb4c5d 0x7f3778fb4f48
tcmalloc: large alloc 18446744071562076160 bytes == (nil) @  0x7f377e22bdcb 0x7f377e22bf1b 0x7f377e22bf35 0x7f377e22bba5 0x7f377e22c474 0x7f377e22c544 0x7f377e25e87e 0x7f37844d7d8f 0x7f37844d7e40 0x7d7274 0x7f37841df178 0x7f37841dfbf7 0x7f37841dffb5 0x7f37841e9dc7 0x7f37841e664a 0x7f3786ffe4f0 0x7f378704009f 0x7f37845d7c5c 0x7f378703e6cc 0x7f3786ff42c5 0x7f378531cf37 0x7f37852c931c 0x7f37852cff7f 0x862959 0x7f37845c2cad 0x7f37852cf5af 0x7f37853462fe 0x7f3785344cb2 0x7f378536df92 0x7f3778fb4c5d 0x7f3778fb4f48
MantidApplication-[Fatal] Unexpected exception: std::bad_alloc

(the code changes look sound to me, and it comes with a new test).

comment:12 Changed 6 years ago by Federico Montesino Pouzols

Merge remote-tracking branch 'origin/feature/10365_slice_viewer_crash'

Full changeset: a841023b0767f1283dc34fa577dd0153b84bfcf8

comment:13 Changed 6 years ago by Owen Arnold

  • Blocking 9995 added

(In #9995) Reference pre-tickets that were stopping me from working on this.

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11207

Note: See TracTickets for help on using tickets.