[digikam] [Bug 338629] New: Digikam freezes on Import

classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=338629

--- Comment #20 from Gilles Caulier <[hidden email]> ---
Bernd,

With my last commit, i add a processEvent() in DHistoryView.

This enough to solve your problem ?

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

Bernd Buschinski
In reply to this post by Bernd Buschinski
https://bugs.kde.org/show_bug.cgi?id=338629

--- Comment #21 from Bernd Buschinski <[hidden email]> ---
So I updated to git master and tested it.

Well, it does not completly "freeze", as the gui still repaints and I can even
scroll in the import dialog, (NOTE: the scroll is very laggy and extremly slow)
BUT it does not solve the issue, I waited for 5min and it still was busy
looking in all subdirs and no image thumbnails was displayed.

Btw I also tested a very old camera with way more images, but "no" subdirs, it
was waaaay faster, like all image thumbnails  where displayed almost instantly.
So the subdirs(lookups)&history really are the problem.

I would generally vote "yes" to the "drop thumbnail History" idea, but I maybe
sometimes later, another person will find a bug were the import(lookup) gets
stuck in a specific directory, wouldn't that make the debugging harder for him?
But this would be the only real use-case I can think of.
BTW: Only the "Listing files" parts in the History causes the problems (as I
have millions of them), I only have 126 Images, so the "getting thumbnail" part
is just a few quick Lines.

Thinking about it...
Is the "Listing files in ..." part done async in another (multiple) thread(s)?
So can it be that try to add 2 history entries at the exact same time? (just
guessing)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

Gilles Caulier-4
In reply to this post by Bernd Buschinski
https://bugs.kde.org/show_bug.cgi?id=338629

--- Comment #22 from Gilles Caulier <[hidden email]> ---
Bernd,

Just for testing, to not recieve thumbnail notification to log in history, just
comment this line :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/importui/backend/cameracontroller.cpp#L550

The "Listing Files" stage is managed here from controller :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/importui/backend/cameracontroller.cpp#L511

It call d->camera->getItemsInfoList(). This method time processing depend of :

- Camera type : UMS or gphoto.
- the arguments passed to get extra metadata. This can be modified in digiKam
Camera settings from "Behavior" section.

The loop to list file from camera interfaces are here :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/importui/backend/gpcamera.cpp#L736

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/importui/backend/umscamera.cpp#L181

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

Bernd Buschinski
In reply to this post by Bernd Buschinski
https://bugs.kde.org/show_bug.cgi?id=338629

--- Comment #23 from Bernd Buschinski <[hidden email]> ---
Created attachment 88634
  --> https://bugs.kde.org/attachment.cgi?id=88634&action=edit
no Files in, or foldern in Log patch

so for testing I commented

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/importui/backend/cameracontroller.cpp#L550
but it did not help, waited 5min

then I commented the
"Listing files in" log
but it still did not help, waited 5min again.

then I commented
"Listing folders in" log
and weeeeeeeeh! I have never seen the import dialog that fast :)

NOTE: there is a "Failed to list files in ..." so the missing begin/end "files
in" log is not a big problem IMHO

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

Gilles Caulier-4
In reply to this post by Bernd Buschinski
https://bugs.kde.org/show_bug.cgi?id=338629

--- Comment #24 from Gilles Caulier <[hidden email]> ---
If you have commented these lines :

         case (CameraCommand::cam_listfolders):
         {
             QString folder = cmd->map["folder"].toString();
-            sendLogMsg(i18n("Listing folders in %1...", folder));
+            //sendLogMsg(i18n("Listing folders in %1...", folder));

             d->camera->getFolders(folder);

-            sendLogMsg(i18n("The folders in %1 have been listed.", folder));
+            //sendLogMsg(i18n("The folders in %1 have been listed.", folder));
             break;
         }

To fix the problem, well, i'm lost... There is nothing special here. Only 2
lines are add to history. There is no bombarding events between controler and
GUI...

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

Bernd Buschinski
In reply to this post by Bernd Buschinski
https://bugs.kde.org/show_bug.cgi?id=338629

--- Comment #25 from Bernd Buschinski <[hidden email]> ---
Created attachment 88635
  --> https://bugs.kde.org/attachment.cgi?id=88635&action=edit
debug counters

digikam(23823)/digikam (core) Digikam::CameraController::executeCommand: Files:
1318
digikam(23823)/digikam (core) Digikam::CameraController::executeCommand:
Folders: 1318

so everything x2
(as we have sendLogMsg(i18n("Listing files in %1...", folder)); and
sendLogMsg(i18n("The files in %1 have been listed.", folder));)

those things add (1318 Files + 1318 Folders) * 2  = 5272 LogLines

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

Gilles Caulier-4
In reply to this post by Bernd Buschinski
https://bugs.kde.org/show_bug.cgi?id=338629

--- Comment #26 from Gilles Caulier <[hidden email]> ---
Ah, now i understand. You have plenty of dirs on your media. now, i know what's
i need to fix.

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

David Kredba
In reply to this post by Bernd Buschinski
https://bugs.kde.org/show_bug.cgi?id=338629

David Kredba <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #27 from David Kredba <[hidden email]> ---
*** Bug 338949 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

Bernd Buschinski
In reply to this post by Bernd Buschinski
https://bugs.kde.org/show_bug.cgi?id=338629

--- Comment #28 from Bernd Buschinski <[hidden email]> ---
While trying the Import again (some days old git master), with open history, I
noticed that sometimes an "old" item gets selected, not the latest one, and
then it freezes.
So there is very likely some kind of race condition here.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 338629] digiKam freezes on Import

Gilles Caulier-4
In reply to this post by Bernd Buschinski
https://bugs.kde.org/show_bug.cgi?id=338629

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |4.4.0
      Latest Commit|                            |http://commits.kde.org/digi
                   |                            |kam/54b51f06b9d413e663a07b6
                   |                            |4d9bbe2eff69d9713
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #29 from Gilles Caulier <[hidden email]> ---
Git commit 54b51f06b9d413e663a07b64d9bbe2eff69d9713 by Gilles Caulier.
Committed on 25/09/2014 at 12:32.
Pushed by cgilles into branch 'master'.

Only report error or warnings in Import console history. No need to bloat
history content with unnecessary contents which can freeze GUI
FIXED-IN: 4.4.0

M  +2    -1    NEWS
M  +49   -51   utilities/importui/backend/cameracontroller.cpp
M  +63   -61   utilities/importui/backend/gpcamera.cpp
M  +31   -30   utilities/importui/backend/umscamera.cpp

http://commits.kde.org/digikam/54b51f06b9d413e663a07b64d9bbe2eff69d9713

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12