Spatial Correlation Function crashes on some structures

I think it depends on the size of the simulation cell. As an example, open the following file in OVITO:

POSCAR
1
15.0 0.0 0.0
0.0 9.0 0.0
0.0 0.0 4.0
H
1
Cartesian
7.0 5.0 3.0

Then go to Add Modifications → Spatial Correlation Function. The program will crash. If the c vector of the cell is changed to 9.0 it will be fine.
Tested on 3.13.1.

Thanks for reporting this issue.

Unfortunately, I have not been able to reproduce the crash so far. I assume it also depends on the precise settings of the Spatial Correlation modifier. Can you tell me your settings or send me a .ovito state file? (The latter for the working POSCAR file, otherwise you cannot save the state file before the crash.) Thanks!

Hi, thanks for the response.
The settings are here (I added the modifier on the “good” input file and then took the screenshots):



I also tested it on an almost new installation (which I am quite sure that I never touched the settings of this modifier) and it also crashed.

This is the beginning part of the backtrace I got in gdb:

#0  0x0000704b8818177b in double_conversion::BignumDtoa(double, double_conversion::BignumDtoaMode, int, double_conversion::Vector<char>, int*, int*) () from /path/to/ovito/bin/../lib/ovito/libQt6Core.so.6
#1  0x0000704b88183ac2 in double_conversion::DoubleToStringConverter::DoubleToAscii(double, double_conversion::DoubleToStringConverter::DtoaMode, int, char*, int, bool*, int*, int*) () from /path/to/ovito/bin/../lib/ovito/libQt6Core.so.6
#2  0x0000704b8808a607 in qt_doubleToAscii(double, QLocaleData::DoubleForm, int, char*, long long, bool&, int&, int&) ()
   from /path/to/ovito/bin/../lib/ovito/libQt6Core.so.6
#3  0x0000704b8808c72c in QString dtoString<QString>(double, QLocaleData::DoubleForm, int, bool) ()
   from /path/to/ovito/bin/../lib/ovito/libQt6Core.so.6
#4  0x0000704b8808d122 in qdtoBasicLatin(double, QLocaleData::DoubleForm, int, bool) ()
   from /path/to/ovito/bin/../lib/ovito/libQt6Core.so.6
#5  0x0000704b88093ce1 in QString::number(double, char, int) () from /path/to/ovito/bin/../lib/ovito/libQt6Core.so.6
#6  0x0000704b8c47f2c7 in QFont::toString() const () from /path/to/ovito/bin/../lib/ovito/libQt6Gui.so.6
#7  0x0000704b8c482f8f in QFont::key() const () from /path/to/ovito/bin/../lib/ovito/libQt6Gui.so.6
#8  0x00000000014461a9 in QwtPlainTextEngine::textMargins(QFont const&, QString const&, double&, double&, double&, double&) const ()
#9  0x00000000013cf916 in QwtText::textSize(QFont const&) const ()
#10 0x00000000013c6c9f in QwtScaleDraw::labelRect(QFont const&, double) const ()
#11 0x00000000013c72e3 in QwtScaleDraw::getBorderDistHint(QFont const&, int&, int&) const ()
#12 0x0000000001416fbd in QwtScaleWidget::layoutScale(bool) ()
#13 0x00000000013db79a in QwtPlot::setAxisScaleEngine(int, QwtScaleEngine*) ()
#14 0x000000000107bf5b in Ovito::SpatialCorrelationFunctionModifierEditor::plotAllData()::{lambda()#1}::operator()() const ()
#15 0x000000000107e56a in Ovito::SpatialCorrelationFunctionModifierEditor::plotAllData() ()
#16 0x0000704b87ffb1a0 in void doActivate<false>(QObject*, int, void**) ()
   from /path/to/ovito/bin/../lib/ovito/libQt6Core.so.6
#17 0x00000000007bfd32 in Ovito::PropertiesEditor::contentsChanged(Ovito::RefTarget*) ()
#18 0x000000000087db58 in non-virtual thunk to Ovito::PropertiesEditor::referenceEvent(Ovito::RefTarget*, Ovito::ReferenceEvent const&)
    ()
#19 0x0000000000634c0b in Ovito::RefTarget::notifyDependentsImpl(Ovito::ReferenceEvent const&) [clone .part.0] ()
#20 0x000000000106886e in Ovito::SpatialCorrelationFunctionModifier::notifyDependentsImpl(Ovito::ReferenceEvent const&) ()
#21 0x000000000062507c in Ovito::PropertyFieldBase::generateTargetChangedEvent(Ovito::RefMaker*, Ovito::PropertyFieldDescriptor const*, int) ()
#22 0x000000000107c942 in Ovito::SpatialCorrelationFunctionModifierEditor::plotAllData()::{lambda()#1}::operator()() const ()
#23 0x000000000107e56a in Ovito::SpatialCorrelationFunctionModifierEditor::plotAllData() ()
#24 0x0000704b87ffb1a0 in void doActivate<false>(QObject*, int, void**) ()
   from /path/to/ovito/bin/../lib/ovito/libQt6Core.so.6
#25 0x00000000007bfd32 in Ovito::PropertiesEditor::contentsChanged(Ovito::RefTarget*) ()

Thank you for the additional information. We were able to reproduce the crash. It only occurs in the graphical environment under Linux. There seems to have been a problem with the graph plotting component, which does not handle empty data tables well. (If the FFT grid spacing is larger than the simulation cell, the resulting correlation function has zero data points.)

We have addressed the issue in the next version of OVITO. A new development build is available here: OVITO Development Builds — OVITO

1 Like