Exceptions thrown inside applications are not caught
Mantis Issue 478, reported by gpasero, assigned to gpasero, created: 2012-01-16
When an exception is thrown inside an application (during ExecuteAndWriteOutput), it is not catched by the try/catch block at launcher level. It seems that we can't catch exceptions thrown from libraries.
1326960956 - gpaseroIn the example given (with Stereo appli), the exception is thrown during DoExecute(), inside otb::DEMHandler::OpenDEMDirectory().
I have tested exceptions thrown inside the DoExecute() and also in the Stereo filter constructor. In both cases they are correctly catched by the application launcher. I guess this not a problem of library. It could be that the uncaught exception was thrown by a different thread, I will investigate on that.
1327262594 - julienmtest fixed in http://hg.orfeo-toolbox.org/OTB/rev/9a7d211c351e so i can actually run it
1327262611 - julienmGDB says :
(gdb) bt #0 0x0012e416 in __kernel_vsyscall () #1 (closed) 0x041e4941 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 (closed) 0x041e7e42 in abort () at abort.c:92 #3 (closed) 0x04161055 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6 #4 (closed) 0x0415ef35 in ?? () from /usr/lib/libstdc++.so.6 #5 (closed) 0x0415ef72 in std::terminate() () from /usr/lib/libstdc++.so.6 #6 (closed) 0x0415ef95 in ??