Closed kimbraeckman closed 8 years ago
OK, MRView shouldn't crash like this, we should fix that. In the meantime, there are two possible explanations: the mih file produced by convert_bruker
is badly formed - particularly the file: ...
line, it looks like it's badly set given the error message (it complains about not finding the file /Users/medisip//Users/medisip/Dropbox
, which I can clearly see is non-existent). So its either a problem in the mih file itself, or a problem in how the mih format handler interprets this (less likely). If you could post the contents of your mih file, that would answer that question...
OK, space in filename is causing the problem. I'll need to fix that - and also fix the format handler so it doesn't crash out when the file can't be found...
Right, there was an issue with the filename handling in the mih format handler when the file:
was specified as an absolute path. Recent commit should fix this. MRView crashing looks like it might be caused by trying to display the related error message before the GUI is actually ready. Probably the simplest will be to change the order of operations a little to ensure images are loaded later on in the process.
For completeness, this is what valgrind shows when it crashes (no prior errors - at least none related to our code as such):
==22918== Invalid read of size 8
==22918== at 0x636DA4F: QGuiApplication::font() (in /usr/lib/libQt5Gui.so.5.5.0)
==22918== by 0x6414DC0: QFont::QFont() (in /usr/lib/libQt5Gui.so.5.5.0)
==22918== by 0x5B5A10F: QWidgetPrivate::QWidgetPrivate(int) (in /usr/lib/libQt5Widgets.so.5.5.0)
==22918== by 0x5D4DA3A: QMessageBox::QMessageBox(QMessageBox::Icon, QString const&, QString const&, QFlags<QMessageBox::StandardButton>, QWidget*, QFlags<Qt::WindowType>) (in /usr/lib/libQt5Widgets.so.5.5.0)
==22918== by 0x46ABDB: MR::GUI::Dialog::display_exception(MR::Exception const&, int) (in /home/jdt13/mrtrix3/bin/mrview)
==22918== by 0x423A6C: main (in /home/jdt13/mrtrix3/bin/mrview)
==22918== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==22918==
==22918==
==22918== Process terminating with default action of signal 11 (SIGSEGV)
==22918== Access not within mapped region at address 0x0
==22918== at 0x636DA4F: QGuiApplication::font() (in /usr/lib/libQt5Gui.so.5.5.0)
==22918== by 0x6414DC0: QFont::QFont() (in /usr/lib/libQt5Gui.so.5.5.0)
==22918== by 0x5B5A10F: QWidgetPrivate::QWidgetPrivate(int) (in /usr/lib/libQt5Widgets.so.5.5.0)
==22918== by 0x5D4DA3A: QMessageBox::QMessageBox(QMessageBox::Icon, QString const&, QString const&, QFlags<QMessageBox::StandardButton>, QWidget*, QFlags<Qt::WindowType>) (in /usr/lib/libQt5Widgets.so.5.5.0)
==22918== by 0x46ABDB: MR::GUI::Dialog::display_exception(MR::Exception const&, int) (in /home/jdt13/mrtrix3/bin/mrview)
==22918== by 0x423A6C: main (in /home/jdt13/mrtrix3/bin/mrview)
OK, for this issue, we still need to make sure the error handlers are set after Qt has been initialised. I'll look into it when I have a minute.
Having had a look at the code, I can't see that this would be an issue any more... I'll close, and if this issue comes up again, we'll look into it with some test data - things certainly don't seem to crash on invalid images at the moment...
Hi,
I am trying to open a .mih file with the mrview command. It works fine but the file I want to open is converted from raw bruker data:
gast096e:~ medisip$ mrview /Users/medisip/NODDI_shell2.mih mrview: [ERROR] cannot stat file "/Users/medisip//Users/medisip/Dropbox": No such file or directory Segmentation fault: 11
also a window pops up that states: mrview quit unexpectedly
I tried the advanced debugging: gast096e:mrtrix3 medisip$ ./configure -debug debug; ./build debug
MRtrix build type requested: debug
Detecting OS: darwin Checking for C++11 compliant compiler [clang++]: 4.2.1 - tested ok Detecting pointer size: 64 bit Detecting byte order: little-endian Checking for variable-length array support: yes Checking for non-POD variable-length array support: no Checking for zlib compression library: 1.2.5 Checking for GNU Scientific Library: 1.16 Checking whether GSL compiles with -DHAVE_INLINE: yes Checking shared library generation: yes Checking for Qt moc: moc (version 5.5.1) Checking for Qt qmake: qmake (version 5.5.1) Checking for Qt rcc: rcc (version 5.5.1) Checking for Qt: 5.5.1
writing configuration to file './config.debug': ok
[CC] lib/threaddebug.o [CC] src/dwi/tractography/ACT/gmwmidebug.o [CC] cmd/tckstatsdebug.o [CC] lib/image/handler/defaultdebug.o [CC] cmd/peaks2ampdebug.o [CC] src/dwi/tractography/SIFT2/tckfactordebug.o [CC] cmd/fixelcfestatsdebug.o [CC] cmd/tckfixcountdebug.o [CC] cmd/fixel2tsfdebug.o [CC] src/dwi/tractography/SIFT2/fixel_updaterdebug.o [MOC] src/gui/mrview/tool/vectordebug_moc.cpp [CC] cmd/roigendebug.o [CC] lib/image/adapter/reslicedebug.o [CC] lib/image/format/mrtrix_gzdebug.o [CC] lib/file/dicom/treedebug.o [CC] lib/image/format/mridebug.o [CC] src/gui/mrview/mode/slicedebug.o [CC] src/gui/mrview/adjust_buttondebug.o [MOC] src/gui/mrview/tool/connectome/connectomedebug_moc.cpp [CC] src/gui/opengl/fontdebug.o [CC] lib/image/format/ramdebug.o [MOC] src/gui/mrview/tool/odf__debug_moc.cpp [CC] src/gui/mrview/tool/viewdebug.o [CC] src/dwi/tractography/SIFT2/reg_calculatordebug.o [CC] cmd/dwi2responsedebug.o [CC] src/gui/mrview/tool/connectome/node_overlaydebug.o [CC] src/gui/mrview/mode/basedebug.o [CC] cmd/dwi2qbidebug.o [MOC] src/gui/mrview/tool/roi_editor/roi__debug_moc.cpp [CC] lib/image/format/analysedebug.o [CC] lib/mrtrixdebug.o [CC] cmd/mrthresholddebug.o [CC] src/connectome/connectomedebug.o [CC] lib/file/mgh_utilsdebug.o [MOC] src/gui/mrview/mode/lightboxdebug_moc.cpp [CC] cmd/mrmathdebug.o [CC] cmd/dwi2foddebug.o [CC] cmd/amp2shdebug.o [CC] lib/image/format/mrtrix_utilsdebug.o [CC] cmd/mrtransformdebug.o [CC] src/mesh/meshdebug.o [CC] src/dwi/tractography/connectome/connectomedebug.o [CC] src/gui/mrview/colourmapdebug.o [MOC] src/gui/mrview/windowdebug_moc.cpp [CC] cmd/label2colourdebug.o [CC] src/dwi/tractography/SIFT/track_contribution__debug.o [CC] src/gui/mrview/tool/connectome/matrix_listdebug.o [CC] src/gui/dwi/rendererdebug.o [CC] src/dwi/tractography/resampledebug.o [CC] cmd/tsfinfodebug.o [CC] src/dwi/directions/maskdebug.o [CC] src/gui/shapes/spheredebug.o [CC] src/dwi/tractography/mapping/mapper_pluginsdebug.o [CC] src/dwi/tractography/SIFT/sifterdebug.o [CC] src/dwi/tractography/mapping/voxeldebug.o [CC] cmd/tckgendebug.o [CC] src/dwi/tractography/SIFT2/streamline_statsdebug.o [CC] cmd/dirmergedebug.o [CC] src/gui/dialog/image_propertiesdebug.o [CC] src/gui/mrview/imagedebug.o [CC] src/gui/mrview/tool/roi_editor/roidebug_mocdebug.o [CC] cmd/mrconvertdebug.o [CC] cmd/shconvdebug.o [CC] cmd/sh2responsedebug.o [CC] src/gui/mrview/mode/lightboxdebug_mocdebug.o [CC] cmd/dwi2adcdebug.o [CC] cmd/fixel2voxeldebug.o [CC] src/dwi/tractography/mapping/writerdebug.o [CC] cmd/warpinitdebug.o [CC] lib/image/format/xdsdebug.o [CC] cmd/dwiextractdebug.o [RCC] src/gui/mrview/icons.cpp [CC] src/dwi/tractography/propertiesdebug.o [CC] lib/math/LUdebug.o [CC] cmd/dwi2tensordebug.o [CC] src/gui/dialog/report_exceptiondebug.o [CC] src/dwi/tractography/mapping/mapperdebug.o [CC] cmd/tck2connectomedebug.o [CC] cmd/dirorderdebug.o [CC] src/gui/mrview/displayabledebug.o [CC] cmd/dirgendebug.o [MOC] src/gui/mrview/tool/overlaydebug_moc.cpp [CC] src/gui/mrview/tool/overlaydebug_mocdebug.o [CC] lib/file/ofstreamdebug.o [CC] cmd/5tt2visdebug.o [CC] cmd/fixelthresholddebug.o [CC] src/dwi/tractography/weightsdebug.o [CC] lib/image/stridedebug.o [MOC] src/gui/mrview/colourmap_buttondebug_moc.cpp [MOC] src/gui/color_buttondebug_moc.cpp [CC] cmd/tsfdividedebug.o [CC] cmd/tsfsmoothdebug.o [CC] src/dwi/tractography/seeding/gmwmi__debug.o [CC] src/dwi/tractography/SIFT/proc_maskdebug.o [CC] lib/image/name_parserdebug.o [CC] src/dwi/directions/predefineddebug.o [CC] src/gui/dialog/dicomdebug.o [CC] cmd/tckimportdebug.o [CC] cmd/dcminfodebug.o [CC] cmd/dirflipdebug.o [CC] src/gui/mrview/tool/connectome/connectomedebug_mocdebug.o [CC] src/gui/projectiondebug.o [CC] src/gui/opengl/lighting__debug.o [CC] lib/image/format/nifti1_gzdebug.o [CC] cmd/tcksampledebug.o [CC] src/dwi/tractography/editing/editingdebug.o [CC] src/gui/guidebug.o [CC] cmd/connectome2tckdebug.o [CC] src/gui/mrview/windowdebug_mocdebug.o [CC] lib/image/format/dicomdebug.o [CC] cmd/tensor2metric__debug.o [CC] src/gui/mrview/colourmap_buttondebug_mocdebug.o [CC] cmd/tsfthresholddebug.o [CC] src/gui/mrview/iconsdebug.o [CC] src/gui/mrview/tool/vectordebug_mocdebug.o [CC] src/gui/mrview/tool/connectome/selectiondebug.o [CC] src/dwi/sdeconv/rf_estimationdebug.o [CC] src/gui/dialog/listdebug.o [CC] src/dwi/fmlsdebug.o [CC] cmd/5ttgendebug.o [CC] src/gui/mrview/tool/roi_editor/roidebug.o [MOC] src/gui/mrview/tool/connectome/selectiondebug_moc.cpp [MOC] src/gui/mrview/combo_box_errordebug_moc.cpp [CC] src/dwi/tractography/connectome/matrix__debug.o [CC] src/gui/opengl/gl_core_3_3debug.o [CC] lib/image/format/nifti1debug.o [CC] src/dwi/sdeconv/constraineddebug.o [CC] src/dwi/tractography/editing/workerdebug.o [CC] lib/file/dicom/imagedebug.o [CC] lib/argsdebug.o [CC] src/dwi/tractography/connectome/exemplardebug.o [MOC] src/gui/mrview/spin_boxdebug_moc.cpp [CC] src/gui/mrview/spin_boxdebug_mocdebug.o [CC] cmd/tsfmultdebug.o [CC] lib/image/handler/mosaicdebug.o [CC] src/gui/mrview/tool/connectome/selectiondebug_mocdebug.o [CC] src/connectome/mat2vecdebug.o [CC] src/dwi/tractography/SIFT2/coeff_optimiserdebug.o [CC] cmd/mrstatsdebug.o [CC] src/dwi/tractography/mapping/gaussian/mapperdebug.o [CC] src/gui/dialog/opengldebug.o [CC] src/gui/cursordebug.o [MOC] src/gui/mrview/mode/orthodebug_moc.cpp [CC] src/gui/mrview/tool/odf_previewdebug.o [CC] cmd/mrpaddebug.o [CC] cmd/5tteditdebug.o [CC] src/dwi/tractography/tracking/tractographydebug.o [CC] src/dwi/tractography/seeding/dynamicdebug.o [CC] lib/file/dicom/dictdebug.o [CC] lib/file/dicom/select_cmdlinedebug.o [MOC] src/gui/mrview/tool/screen_capturedebug_moc.cpp [CC] src/gui/mrview/tool/screen_capturedebug_mocdebug.o [CC] lib/file/dicom/quick_scandebug.o [CC] lib/image/handler/gzdebug.o [CC] lib/appdebug.o [CC] cmd/sh2peaksdebug.o [CC] src/dwi/tractography/mapping/mappingdebug.o [CC] lib/image/format/listdebug.o [MOC] src/gui/mrview/tool/tractography/tractographydebug_moc.cpp [CC] cmd/mrclusterstatsdebug.o [CC] cmd/fod2fixeldebug.o [MOC] src/gui/lighting_dockdebug_moc.cpp [CC] cmd/mrcatdebug.o [CC] src/gui/color_buttondebug.o [CC] src/gui/mrview/tool/fixeldebug.o [MOC] src/gui/mrview/tool/connectome/node_listdebug_moc.cpp [CC] src/dwi/tractography/mapping/fixel_td_mapdebug.o [CC] src/gui/mrview/tool/roi_editor/modeldebug.o [CC] lib/file/dicom/elementdebug.o [MOC] src/gui/gui__debug_moc.cpp [MOC] src/gui/opengl/lightingdebug_moc.cpp [CC] src/dwi/tractography/file_basedebug.o [CC] src/gui/mrview/combo_box_errordebug_mocdebug.o [CC] src/dwi/gradientdebug.o [CC] cmd/sh2powerdebug.o [CC] lib/image/format/mgzdebug.o [CC] cmd/voxel2fixeldebug.o [CC] src/dwi/tractography/editing/receiverdebug.o [CC] cmd/tckinfodebug.o [CC] src/gui/opengl/lightingdebug_mocdebug.o [CC] src/dwi/tractography/SIFT/gradient_sortdebug.o [CC] src/gui/mrview/windowdebug.o [MOC] src/gui/mrview/tool/view__debug_moc.cpp [CC] lib/file/dicom/patientdebug.o [CC] lib/image/format/mrtrix_sparsedebug.o [CC] cmd/dirsplitdebug.o [CC] src/gui/mrview/tool/tractography/track_scalar_filedebug.o [CC] src/gui/shapes/cylinderdebug.o [CC] src/gui/lighting_dockdebug_moc__debug.o [CC] lib/file/nifti1_utilsdebug.o [CC] src/gui/shapes/halfspheredebug.o [CC] src/gui/shview/render_window__debug.o [CC] src/gui/mrview/tool/screen_capturedebug.o [CC] cmd/mrcalcdebug.o [CC] lib/file/key_valuedebug.o [CC] src/dwi/tractography/seeding/basicdebug.o [CC] cmd/5tt2gmwmidebug.o [CC] cmd/afdconnectivitydebug.o [CC] cmd/tcksiftdebug.o [CC] cmd/fixeldividedebug.o [CC] cmd/sh2ampdebug.o [CC] lib/versiondebug.o [MOC] src/gui/dwi/render_framedebug_moc.cpp [CC] src/gui/mrview/mode/orthodebug_mocdebug.o [CC] cmd/tcknormalisedebug.o [CC] lib/datatype__debug.o [CC] src/dwi/tractography/tracking/write_kerneldebug.o [CC] src/gui/lighting_dockdebug.o [CC] src/dwi/tractography/SIFT/track_index_rangedebug.o [CC] src/dwi/tractography/mapping/twi_statsdebug.o [CC] src/gui/guidebug_mocdebug.o [CC] cmd/tck2vtkdebug.o [CC] lib/file/dicom/seriesdebug.o [CC] lib/math/besseldebug.o [CC] lib/image/axisdebug.o [CC] cmd/mrcropdebug.o [MOC] src/gui/mrview/tool/tractography/tractogramdebug_moc.cpp [CC] src/gui/mrview/tool/tractography/tractogram__debug_mocdebug.o [CC] src/gui/mrview/colourmap_buttondebug.o [CC] src/gui/mrview/tool/connectome/connectomedebug.o [CC] cmd/mesh2pvedebug.o [CC] lib/image/format/mrtrixdebug.o [CC] src/gui/mrview/tool/overlaydebug.o [CC] src/gui/mrview/tool/connectome/colourmap_observersdebug.o [CC] lib/image/headerdebug.o [CC] src/dwi/tractography/ACT/actdebug.o [CC] cmd/mrviewdebug.o [CC] lib/file/mmapdebug.o [MOC] src/gui/mrview/displayabledebug_moc.cpp [CC] src/gui/mrview/tool/connectome/nodedebug.o [CC] src/gui/color_buttondebug_mocdebug.o [RCC] src/gui/shview/icons.cpp [CC] src/gui/shview/iconsdebug.o [CC] src/gui/mrview/tool/connectome/node_listdebug.o [CC] cmd/dirstatdebug.o [CC] src/gui/dialog/progressdebug.o [CC] cmd/mrmeshdebug.o [CC] lib/image/handler/sparsedebug.o [CC] src/gui/opengl/gldebug.o [CC] cmd/mrresizedebug.o [CC] cmd/label2meshdebug.o [CC] cmd/meshconvertdebug.o [CC] src/gui/mrview/tool/basedebug.o [CC] lib/file/dicom/mapperdebug.o [CC] src/gui/shapes/cubedebug.o [CC] src/dwi/shellsdebug.o [CC] lib/image/infodebug.o [CC] src/connectome/config/configdebug.o [CC] lib/math/SHdebug.o [CC] cmd/shviewdebug.o [CC] cmd/dcmeditdebug.o [CC] src/gui/mrview/mode/volumedebug.o [CC] src/gui/dialog/filedebug.o [CC] src/gui/mrview/tool/roi_editor/itemdebug.o [CC] src/dwi/directions/setdebug.o [CC] src/dwi/tractography/roi__debug.o [MOC] src/gui/mrview/tool/odf_previewdebug_moc.cpp [CC] cmd/dwi2noisedebug.o [CC] src/gui/mrview/tool/odf_preview__debug_mocdebug.o [CC] src/connectome/lutdebug.o [CC] cmd/fixel2shdebug.o [CC] cmd/shbasisdebug.o [CC] src/dwi/tractography/SIFT2/line_searchdebug.o [CC] lib/image/format/mghdebug.o [CC] src/gui/mrview/displayable__debug_mocdebug.o [CC] src/gui/mrview/tool/viewdebug_mocdebug.o [CC] src/gui/mrview/combo_box_errordebug.o [CC] lib/file/configdebug.o [CC] cmd/tckmapdebug.o [CC] lib/progressbardebug.o [CC] src/dwi/tractography/connectome/extractdebug.o [CC] src/dwi/tractography/SIFT/siftdebug.o [CC] src/gui/mrview/tool/odfdebug_mocdebug.o [CC] src/gui/dwi/render_framedebug_mocdebug.o [CC] src/gui/opengl/shaderdebug.o [CC] cmd/labelconfig__debug.o [CC] src/gui/mrview/tool/connectome/node_listdebug_mocdebug.o [CC] cmd/tckeditdebug.o [CC] src/dwi/tractography/seeding/listdebug.o [CC] src/gui/mrview/tool/tractography/tractogramdebug.o [CC] lib/image/format/pipedebug.o [CC] src/gui/mrview/tool/connectome/shadersdebug.o [CC] cmd/tcksift2__debug.o
clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -Wall -O0 -g -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1 -Isrc -Icmd -Ilib -Icmd -I/opt/local/include -DHAVE_INLINE cmd/tckmap.cpp -o cmd/tckmap__debug.o:
In file included from cmd/tckmap.cpp:27: In file included from lib/point.h:29: lib/math/vector.h:701:14: warning: implicit conversion turns floating-point number into bool: 'double' to 'bool' [-Wimplicit-conversion-floating-point-to-bool] return sqrt (norm2 (V, size, stride));