2018-05-27 14:04 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001288Orfeo Toolbox (OTB)Generalpublic2017-05-02 14:09
Assigned To 
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'

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 :
Additional InformationProbably comes from some unchecked linear algebra operation in sar sensor model class.
TagsNo tags attached.
Attached Files

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



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:


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


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());
         } catch (...) {
            throw std::runtime_error("Cannot invert 3x3 matrix in projToSurface");


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.


grizonnetm (administrator)

+1 for nothrow


julien (administrator)

Patch here :


No more crashes, but monteverdi sometimes lose the image.


grizonnetm (administrator)

merged in release-5.8:


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


rashadkm (developer)

issue still there?


Ludovic (developer)

No more issue with 5.10 version on Windows


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.

-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