Bug 131446 - using inpainting tool crashes DigiKam
Summary: using inpainting tool crashes DigiKam
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-GmicQt (show other bugs)
Version: 0.8.0
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-27 20:32 UTC by Thomas Basset
Modified: 2023-03-23 09:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.0
Sentry Crash Report:


Attachments
backtrace (1.72 KB, text/plain)
2006-08-07 21:16 UTC, Thomas Basset
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Basset 2006-07-27 20:32:44 UTC
Version:           0.8.0 (using KDE KDE 3.5.2)
Installed from:    Ubuntu Packages
OS:                Linux

When I try to use the InPainting plugin for DigiKam, the toolbox opens well. But if I select OK, DigiKam crashes without warning.
Comment 1 caulier.gilles 2006-07-27 20:37:00 UTC
Thomas, 

Give us a suitable backtrace using gdb. You need to re-compile digiKam and DigikamImagePlugins for that using ".configure --enable-debug=full" option.

Thanks in advance

Gilles Caulier
Comment 2 Thomas Basset 2006-07-28 15:33:51 UTC
I won't be able to take a look at this until next week but will definitely work on it.
Comment 3 Thomas Basset 2006-08-07 21:16:59 UTC
Created attachment 17274 [details]
backtrace

Here is the required backtrace.

I recompiled digikam and digikamimageplugins using the following commands:
apt-src install X
./configure --enable-debug=full
make
make install

Hope this helps as I can't understand anything about this backtrace ;)
Comment 4 Marcel Wiesweg 2006-08-07 22:43:53 UTC
Ok, thanks. It seems we need to catch the CImgExceptions which can be thrown from the lib.
Another question is why this exception is thrown here.
Comment 5 Thomas Basset 2006-08-07 23:22:07 UTC
The version that is packaged in Ubuntu is 0.8.2-rc1, not 0.8.0
Comment 6 caulier.gilles 2007-03-12 16:38:25 UTC
SVN commit 641782 by cgilles:

digikam from trunk : CImg library can generate a C++ exception. Just drive it to prevent digiKam crash.
CCBUGS: 131446

 M  +16 -13    greycstorationiface.cpp  


--- trunk/extragear/graphics/digikamimageplugins/common/greycstoration/greycstorationiface.cpp #641781:641782
@@ -18,18 +18,9 @@
  * 
  * ============================================================ */
 
- // C Ansi includes
-
-extern "C"
-{
-#include <unistd.h>
-}
-  
 // C++ includes. 
  
-#include <cstdio>
-#include <cmath>
-#include <cstring>
+#include <cassert>
 
 // Qt includes.
 
@@ -209,10 +200,22 @@
     
     DDebug() << "GreycstorationIface::Process Computation..." << endl;
 
-    //FIXME : add inpainting and resize mode.              
+    try 
+    {
+        //FIXME : add inpainting and resize mode.              
+    
+        restoration(); 
+    }
+    catch(...)         // Everything went wrong.
+    {
+       DDebug() << "GreycstorationIface::Error during Greycstoration filter computation!" << endl;
+       
+       if (m_parent)
+          postProgress( 0, false, false );   
+          
+       return;
+    }
 
-    restoration(); 
-    
     // Copy CImg onto destination.
     
     DDebug() << "GreycstorationIface::Finalization..." << endl;
Comment 7 caulier.gilles 2007-03-13 13:12:53 UTC
SVN commit 642127 by cgilles:

digiKam from trunk : new version of Photograph Inpainting tool using the new version of CImg library (1.1.9)

CCMAIL: David.Tschumperle@greyc.ensicaen.fr
CCMAIL: mvoorberg@yahoo.com
CCMAIL: gerhard@kulzer.net
CCMAIL: digikam-devel@kde.org

CCBUG: 131446

 M  +2 -4      Makefile.am  
 M  +49 -230   imageeffect_inpainting.cpp  
 M  +19 -43    imageeffect_inpainting.h  
Comment 8 caulier.gilles 2007-03-13 17:26:48 UTC
SVN commit 642201 by cgilles:

digiKam from trunk : Improvement of Photograph Inpainting tool : now this plugin give a preview of effect (like new Red Eyes correction tool). 

A fresh screenshot can be seen at this url :

http://digikam3rdparty.free.fr/Screenshots/newinpaintingtool.png

CCMAIL: David.Tschumperle@greyc.ensicaen.fr
CCMAIL: mvoorberg@yahoo.com
CCMAIL: gerhard@kulzer.net
CCMAIL: digikam-devel@kde.org

CCBUG: 131446

 M  +129 -151  imageeffect_inpainting.cpp  
 M  +22 -57    imageeffect_inpainting.h  
 M  +2 -2      imageplugin_inpainting.cpp  
Comment 9 caulier.gilles 2007-03-15 15:13:14 UTC
Thomas, 

With digiKam 0.9.2, the Greycstoration interface handle properlly the C++ Exception generated by Cimg library.

I close this file now.

Gilles Caulier
Comment 10 caulier.gilles 2017-09-05 05:09:57 UTC
With 5.8.0, in-painting image editor tool was been replaced by a Clone tool.

More details here : 

https://community.kde.org/GSoC/2017/StatusReports/shazaismailkaoud

Gilles Caulier