2017-12-18 23:08 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001288Orfeo Toolbox (OTB)Generalpublic2017-05-02 14:09
Reporterjulien 
Assigned To 
PrioritynormalSeveritycrashReproducibilitysometimes
StatusclosedResolutionfixed 
Summary0001288: Monteverdi crashes with some S1 images
DescriptionWith some S1 images, monteverdi crashes as soon as the mouse hoovers the image.

Console says :

WARNG> Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'std::runtime_error'
  what():

An exception has been thrown
Runtime error:- detected by Newmat: matrix is singular

MatrixType = Crout # Rows = 3; # Cols = 3
Trace: Crout(lubksb); GeneralSolv.

Steps To ReproduceProduct tested :
S1A_EW_GRDH_1SDH_20160117T204113_20160117T204213_009539_00DDC4_E9E1.SAFE
Additional InformationProbably comes from some unchecked linear algebra operation in sar sensor model class.
TagsNo tags attached.
Attached Files

-Relationships
related to 0001352assignedgpasero Monteverdi Loss of visibility of an S1 image during a zoom out. 
+Relationships

-Notes

~0003750

grizonnetm (administrator)

I've got a similar issue using Monteverdi on Windows from Windows standalone package.

I open the S1 extract available in OTB training course data package:

https://www.orfeo-toolbox.org/packages/doc/Theia2016/

Then, after opening the image in monteverdi, zoom out (CTRL + Mouse wheel) to a zoom level superior to 1:90.

The error message is not exactly the one reported in the previous description.

In my case:

terminate called after throwing an instance of 'std::runtime_error'
  what(): Cannot invert 3x3 matrix in projToSurface

~0003752

julien (administrator)

According to this code sample from ossim::SarSensorModel::projToSurface(), this is actually the same error with different behaviour when on windows OS :

try {
            dR = B.i() * F;
#if !(defined(__MINGW32__) || defined(__CYGWIN__) || defined(_MSC_VER) || defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__))
         } catch (NEWMAT::SingularException const& e) {
            // NEWMATH exception
            throw std::runtime_error(e.what());
#endif
         } catch (...) {
            throw std::runtime_error("Cannot invert 3x3 matrix in projToSurface");
         }

~0003755

julien (administrator)

So the problem comes from a non-inversible matrix that triggers an uncaught std::runtime exception. What are we supposed to do in this case ?

We can not have every single client code catching runtime exceptions, I would prefer a nothrow contract here.

This snippet comes from an iterative estimation loop. My opinion is that in this case we should return the best estimation obtained so far.

~0003761

grizonnetm (administrator)

+1 for nothrow

~0003774

julien (administrator)

Patch here :

https://git.orfeo-toolbox.org/otb.git/shortlog/refs/heads/bugfix-1288

No more crashes, but monteverdi sometimes lose the image.

~0003780

grizonnetm (administrator)

merged in release-5.8:

https://git.orfeo-toolbox.org/otb.git/commit/b1e47ec13c2c0011f833cb718f0a9b0959af14ed

I've also remove remaining traces which appear in release mode

~0003882

rashadkm (developer)

issue still there?

~0003949

Ludovic (developer)

No more issue with 5.10 version on Windows

~0003954

grizonnetm (administrator)

The application does not crash but as Julien added monteverdi sometimes lose the image because unchecked linear algebra (singular matrix can not be inverted. Returning best estimation so far).

Not easy to fix but we should keep perhaps a bug open about it on Mantis.
+Notes

-Issue History
Date Modified Username Field Change
2016-10-07 14:41 julien New Issue
2016-10-11 13:10 grizonnetm Note Added: 0003750
2016-10-11 13:25 julien Note Added: 0003752
2016-10-11 14:27 julien Note Added: 0003755
2016-10-11 17:04 grizonnetm Note Added: 0003761
2016-10-14 16:22 julien Note Added: 0003774
2016-10-17 15:04 grizonnetm Note Added: 0003780
2016-10-18 11:16 grizonnetm Status new => acknowledged
2016-12-05 09:17 rashadkm Note Added: 0003882
2017-01-24 14:52 Ludovic Note Added: 0003949
2017-01-24 14:52 Ludovic Status acknowledged => resolved
2017-01-24 14:52 Ludovic Resolution open => fixed
2017-01-25 08:13 grizonnetm Note Added: 0003954
2017-04-27 15:32 julien Status resolved => closed
2017-05-02 14:09 grizonnetm Relationship added related to 0001352
+Issue History