MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001288Orfeo Toolbox (OTB)Generalpublic2016-10-07 14:412017-04-27 15:32
Reporterjulien 
Assigned To 
PrioritynormalSeveritycrashReproducibilitysometimes
StatusclosedResolutionfixed 
PlatformOSOS Version
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

-  Notes
(0003750)
grizonnetm (administrator)
2016-10-11 13:10

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)
2016-10-11 13:25

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)
2016-10-11 14:27

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)
2016-10-11 17:04

+1 for nothrow
(0003774)
julien (administrator)
2016-10-14 16:22

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)
2016-10-17 15:04

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)
2016-12-05 09:17

issue still there?
(0003949)
Ludovic (developer)
2017-01-24 14:52

No more issue with 5.10 version on Windows
(0003954)
grizonnetm (administrator)
2017-01-25 08:13

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


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker