2021-04-16 13:03 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000839Monteverdi2[Orfeo Toolbox (OTB)] Generalpublic2015-04-17 11:27
Reporterjulien 
Assigned Tocpeyrega 
PrioritynormalSeveritycrashReproducibilityrandom
StatusclosedResolutionfixed 
Summary0000839: [MVD2/OTB4] Crash when playing with high quantile
Descriptionterminate called after throwing an instance of 'std::runtime_error'
  what(): Accuracy loss when converting double (nan) to string.

Program received signal SIGABRT, Aborted.
Steps To ReproduceOpen an image. Try to modify the high quantile of the first channel. Whenever the value reaches 0.0 during editing, the exception above is raised.

Please note that a high quantile of 0.0 is a perfectly valid value.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0002074

julien (administrator)

In: http://hg.orfeo-toolbox.org/OTB/file/07d5cc738ad2/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogram.hxx#l667

I think that binProportion is null, and the Quantile method therefore returns Nan.

However, I cannot find any difference with the 3.x version of this method.

~0002075

cpeyrega (developer)

I think that the issue comes from the filling of the histogram into Monteverdi2 since the main API differences with 3x come from the itkHistogram class. I will be watching in this direction.

~0002076

cpeyrega (developer)

The issue was due to the ClipBinsAtEnds boolean set to true by default. With ITKv4, the default behavior of the last bin of histograms is different from the default settings with ITKv3:

-Last bin with ITKv3: includes the upper bound of the last bin whatever the value of ClipBinsAtEnds (true or false)

-Last bin with ITKv4: includes the upper bound of the last bin ONLY IF ClipBinsAtEnds == false.

Thus, the correction consists in setting ClipBinsAtEnds to FALSE in order to include the upper value of the last bin of histograms.

(Revision MVD2 1190: http://hg.orfeo-toolbox.org/Monteverdi2/rev/b4522c279d35)

This issue will be closed when feedback will be given.

Thank you in advance.

~0002077

grizonnetm (administrator)

Note that the segfault still appears if you've got existing dataset imported with Monteverdi2 version with changeset >= e188582b954d and < b4522c279d35 (before the fix and after the merge with itkv4).

Dataset imported before the fix still segfault even if you recompile Monteverdi2 from scratch. I remove my mvd2 repository, re-import the dataset and then it works.
+Notes

-Issue History
Date Modified Username Field Change
2013-11-26 10:41 julien New Issue
2013-11-26 11:19 cpeyrega Assigned To => cpeyrega
2013-11-26 11:19 cpeyrega Status new => assigned
2013-11-26 11:23 julien Note Added: 0002074
2013-11-26 11:32 cpeyrega Note Added: 0002075
2013-11-26 17:30 cpeyrega Note Added: 0002076
2013-11-26 17:30 cpeyrega Status assigned => feedback
2013-11-26 19:28 cpeyrega Status feedback => resolved
2013-11-26 19:28 cpeyrega Resolution open => fixed
2013-11-27 08:32 grizonnetm Note Added: 0002077
2015-04-17 11:27 julien Status resolved => closed
+Issue History