[Digikam-devel] digikam just crashed (fwd)

Oliver Dörr oliver at doerr-privat.de
Sun Jun 19 20:55:47 BST 2005


Hi Renchi,

this patch fixed the problem!

By the way, how do i remove a patch? Cause i don't know i had to remove 
my whole digikam source directory and unpack the tarball again before i 
could apply the new patch

Oliver

Renchi Raju wrote:

>
> duh.... i forgot that recently a patch was applied from gphoto2 
> upstream in gpiface.cpp. and it causes an invalid pointer reference 
> and so a crash. i don't have a gphoto2 supported camera anymore and so 
> never saw the bug.
>
> Oliver, i have attached an updated patch which fixes this bug 
> (hopefully). can you try it out? you will need to remove the previous 
> patch.
>
> renchi
>
>------------------------------------------------------------------------
>
>Index: utilities/setup/gpiface.cpp
>===================================================================
>--- utilities/setup/gpiface.cpp	(revision 426554)
>+++ utilities/setup/gpiface.cpp	(working copy)
>@@ -57,17 +57,35 @@
>         return -1;
>     }
> 
>-    for (int i = 0; i < count; i++) {
>-        gp_list_get_name  (camList, i, &camModel_);
>-        gp_list_get_value (camList, i, &camPort_);
>+    camModel_ = 0;
>+    camPort_  = 0;
>+    
>+    for (int i = 0; i < count; i++)
>+    {
>+        if (gp_list_get_name  (camList, i, &camModel_) != GP_OK)
>+        {
>+            gp_list_free (camList);
>+            return -1;
>+        }
>+
>+        if (gp_list_get_value (camList, i, &camPort_) != GP_OK)
>+        {
>+            gp_list_free (camList);
>+            return -1;
>+        }
>+
>+        if (camModel_ && camPort_)
>+        {
>+            model = QString::fromLatin1(camModel_);
>+            port  = QString::fromLatin1(camPort_);
>+            gp_list_free (camList);
>+            return 0;
>+        }
>     }
> 
>     gp_list_free (camList);
> 
>-    model = camModel_;
>-    port  = camPort_;
>-
>-    return 0;
>+    return -1;
> }
> 
> void GPIface::getSupportedCameras(int& count, QStringList& clist)
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Digikam-devel mailing list
>Digikam-devel at kde.org
>https://mail.kde.org/mailman/listinfo/digikam-devel
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20050619/e465ab27/attachment.html>


More information about the Digikam-devel mailing list