<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>131446</bug_id>
          
          <creation_ts>2006-07-27 20:32:44 +0000</creation_ts>
          <short_desc>using inpainting tool crashes DigiKam</short_desc>
          <delta_ts>2023-03-23 09:41:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>digikam</product>
          <component>Plugin-Editor-GmicQt</component>
          <version>0.8.0</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Thomas Basset">thomasbasset</reporter>
          <assigned_to name="Digikam Developers">digikam-bugs-null</assigned_to>
          <cc>caulier.gilles</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin>5.8.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>456256</commentid>
    <comment_count>0</comment_count>
    <who name="Thomas Basset">thomasbasset</who>
    <bug_when>2006-07-27 20:32:44 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>456257</commentid>
    <comment_count>1</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2006-07-27 20:37:00 +0000</bug_when>
    <thetext>Thomas, 

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

Thanks in advance

Gilles Caulier</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>456373</commentid>
    <comment_count>2</comment_count>
    <who name="Thomas Basset">thomasbasset</who>
    <bug_when>2006-07-28 15:33:51 +0000</bug_when>
    <thetext>I won&apos;t be able to take a look at this until next week but will definitely work on it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>458814</commentid>
    <comment_count>3</comment_count>
      <attachid>17274</attachid>
    <who name="Thomas Basset">thomasbasset</who>
    <bug_when>2006-08-07 21:16:59 +0000</bug_when>
    <thetext>Created attachment 17274
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&apos;t understand anything about this backtrace ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>458835</commentid>
    <comment_count>4</comment_count>
    <who name="Marcel Wiesweg">marcel.wiesweg</who>
    <bug_when>2006-08-07 22:43:53 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>458854</commentid>
    <comment_count>5</comment_count>
    <who name="Thomas Basset">thomasbasset</who>
    <bug_when>2006-08-07 23:22:07 +0000</bug_when>
    <thetext>The version that is packaged in Ubuntu is 0.8.2-rc1, not 0.8.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>514675</commentid>
    <comment_count>6</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2007-03-12 16:38:25 +0000</bug_when>
    <thetext>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 &quot;C&quot;
-{
-#include &lt;unistd.h&gt;
-}
-  
 // C++ includes. 
  
-#include &lt;cstdio&gt;
-#include &lt;cmath&gt;
-#include &lt;cstring&gt;
+#include &lt;cassert&gt;
 
 // Qt includes.
 
@@ -209,10 +200,22 @@
     
     DDebug() &lt;&lt; &quot;GreycstorationIface::Process Computation...&quot; &lt;&lt; endl;
 
-    //FIXME : add inpainting and resize mode.              
+    try 
+    {
+        //FIXME : add inpainting and resize mode.              
+    
+        restoration(); 
+    }
+    catch(...)         // Everything went wrong.
+    {
+       DDebug() &lt;&lt; &quot;GreycstorationIface::Error during Greycstoration filter computation!&quot; &lt;&lt; endl;
+       
+       if (m_parent)
+          postProgress( 0, false, false );   
+          
+       return;
+    }
 
-    restoration(); 
-    
     // Copy CImg onto destination.
     
     DDebug() &lt;&lt; &quot;GreycstorationIface::Finalization...&quot; &lt;&lt; endl;
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>514856</commentid>
    <comment_count>7</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2007-03-13 13:12:53 +0000</bug_when>
    <thetext>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  
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>514892</commentid>
    <comment_count>8</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2007-03-13 17:26:48 +0000</bug_when>
    <thetext>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  
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>515266</commentid>
    <comment_count>9</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2007-03-15 15:13:14 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1699025</commentid>
    <comment_count>10</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2017-09-05 05:09:57 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>17274</attachid>
            <date>2006-08-07 21:16:59 +0000</date>
            <delta_ts>2006-08-07 21:16:59 +0000</delta_ts>
            <desc>backtrace</desc>
            <filename>output.txt</filename>
            <type>text/plain</type>
            <size>1759</size>
            <attacher name="Thomas Basset">thomasbasset</attacher>
            
              <data encoding="base64">UHJvZ3JhbSByZWNlaXZlZCBzaWduYWwgU0lHQUJSVCwgQWJvcnRlZC4KW1N3aXRjaGluZyB0byBU
aHJlYWQgLTEyNDc3MDQxNDQgKExXUCAyMTY5NSldCjB4ZmZmZmU0MTAgaW4gX19rZXJuZWxfdnN5
c2NhbGwgKCkKKGdkYikgYnQKIzAgIDB4ZmZmZmU0MTAgaW4gX19rZXJ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