Bug #998

GUI: beam wavelength with wide gaussian distribution cause crash

Added by pospelov over 5 years ago. Updated about 5 years ago.

Status:ArchivedStart date:06 Mar 2015
Priority:NormalDue date:
Assignee:pospelov% Done:

0%

Category:-
Target version:Sprint 26

Description

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

History

#1 Updated by pospelov over 5 years ago

  • Description updated (diff)
  • Status changed from New to Sprint
  • Target version set to Sprint 26

#2 Updated by pospelov over 5 years ago

  • Assignee set to pospelov

#3 Updated by pospelov over 5 years ago

  • Status changed from Sprint to Resolved

#4 Updated by pospelov about 5 years ago

  • Status changed from Resolved to Archived

Also available in: Atom PDF