mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
209 stars 122 forks source link

segfault when algorithm dialog opens when MD workspace is present #17165

Closed rosswhitfield closed 8 years ago

rosswhitfield commented 8 years ago

The problem doesn't exist at d1be85cb95a75b9ad7b3b0ae4255e861e773499b but does exist at 1e56170f874b7d5b1ff5d58e66d89e77c8d6ed0f therefore was introduced with #16967

To reproduce:

Result is:

MantidApplication-[Fatal] Unexpected exception: basic_string::_M_create
MantidApplication-[Fatal] Continue working.
tcmalloc: large alloc 7021238724389208064 bytes == (nil) @ 
MantidApplication-[Fatal] Unexpected exception: std::bad_alloc
MantidApplication-[Fatal] Continue working.
bin/launch_mantidplot.sh: line 49: 23857 Segmentation fault      (core dumped) LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} TCMALLOC_LARGE_ALLOC_REPORT_THRESHOLD=${TCM_REPORT} LD_LIBRARY_PATH=${LOCAL_LDPATH} QT_API=pyqt $VGLRUN$INSTALLDIR/MantidPlot $*

MD algorithms work fine e.g. PlusMD

It looks like MD workspaces are being included in the list of possible InputWorkspaces when they shouldn't be.

@AndreiSavici and @VickieLynch can confirm the problem.

cc: @raquelalvarezbanos @FedeMPouzols @martyngigg as you were also involved in the pull request

AndreiSavici commented 8 years ago

I tried the following:

Load(Filename='CNCS_7860', OutputWorkspace='CNCS_7860_event')
ConvertToMD(InputWorkspace='CNCS_7860_event', QDimensions='Q3D', dEAnalysisMode='Elastic', QConversionScales='HKL', OutputWorkspace='b')

Then from the MantidPlot GUI I try to create another MD workspace, with a different name. Sometimes it works, sometimes it crashes. It depends on the name of the output workspace

peterfpeterson commented 8 years ago

This is not a MD specific issue. Another way to produce it:

  1. CreateEmptyTableWorkspace with any name for the workspace
  2. Add gui/dialog
  3. :boom: with a message about Attempt to free invalid pointer