Bug #998

Updated by pospelov almost 6 years ago


How to reproduce:
Set gaussian distribution for wavelength with mean=0.1, sigma=0.1, sigma_factor=2.0, then the GUI will crash with

> BornAgain: /home/pospelov/development/BornAgain/source/Core/Algorithms/src/DecouplingApproximationStrategy.cpp:55: virtual double DecouplingApproximationStrategy::evaluateForList(const cvector_t&, const Bin1DCVector&, const std::vector<std::complex<double> >&) const: Assertion `!MathFunctions::isnan(amplitude.real())' failed.

* How to fix:
** take care about negative values for wavelengths produced with IDistribution1D
** Replace 'assert' with 'throw' so GUI would be stay alive and would report the user the throw message

Back