Bug 366234 - Import from card readers starts automatically when digikam is started
Summary: Import from card readers starts automatically when digikam is started
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-Settings (show other bugs)
Version: 5.3.0
Platform: Microsoft Windows Microsoft Windows
: NOR minor
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-29 08:42 UTC by Wolfram Kroiss
Modified: 2017-03-05 17:49 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.4.0


Attachments
complete log until album view is visible (22.72 KB, text/plain)
2016-07-29 09:08 UTC, Wolfram Kroiss
Details
log from start until the first popup is shown (2.14 KB, text/plain)
2016-07-29 09:08 UTC, Wolfram Kroiss
Details
log from start until the last series of popups is shown (after splash screen) (15.12 KB, text/plain)
2016-07-29 09:09 UTC, Wolfram Kroiss
Details
Log using wintrace tool (15.81 KB, text/plain)
2016-08-12 17:12 UTC, Twilight Sparkle
Details
Log using debug view (13.22 KB, text/plain)
2016-08-12 18:09 UTC, Twilight Sparkle
Details
Screen Shot of Startup Showing No Disk Error (259.71 KB, image/jpeg)
2016-08-25 02:19 UTC, Don
Details
Screenshot of one of the messages (804.44 KB, image/png)
2016-08-28 00:08 UTC, Twilight Sparkle
Details
Screenshot of card readers and their names. (158.09 KB, image/png)
2016-08-29 00:46 UTC, Twilight Sparkle
Details
With the patched 5.2 version (312.97 KB, image/png)
2016-08-31 14:07 UTC, Twilight Sparkle
Details
5.2 patch debugview log (7.86 KB, text/plain)
2016-08-31 14:08 UTC, Twilight Sparkle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Kroiss 2016-07-29 08:42:21 UTC
When starting the digikam application attempts to import from my card readers several times. Since I usually don't have cards inserted in all four slots (in fact I hardly have any card inserted) digikam presents me error popups ("please insert media in drive x"). That's two popups per drive before the splash screen is shown and another one per drive after.
In total I have to click away 12 popups. The behaviour is the same whatever option I select (Cancel, Retry, Continue). This is really annoying.

Reproducible: Always

Steps to Reproduce:
1. start digikam
2.
3.


Expected Results:  
digikam is supposed to search for new items in the collections that I have set up. That works fine. But I don't expect digikam to consider in any other location without being explicitly told to.

It wasn't like that during the first days after installation, it appeared only yesterday, although I didn't change the installation. Therefore I suspect a settings problem. But I didn't change any settings recently and I didn't find any setting that controls the startup behaviour.
But I used the Batch Queue Manager yesterday for the first time. Maybe this triggered the problems.
Comment 1 caulier.gilles 2016-07-29 08:54:30 UTC
There is no relation between BQM and Import tool.

The problem is not reproducible here with Windows 7 32 or 64 bits. Installation is in place since few weeks and is used to test the application.

What do you see in DebugView when digiKam is started ?

https://technet.microsoft.com/en-us/sysinternals/debugview.aspx
Comment 2 Wolfram Kroiss 2016-07-29 09:08:18 UTC
Created attachment 100370 [details]
complete log until album view is visible
Comment 3 Wolfram Kroiss 2016-07-29 09:08:51 UTC
Created attachment 100371 [details]
log from start until the first popup is shown
Comment 4 Wolfram Kroiss 2016-07-29 09:09:32 UTC
Created attachment 100372 [details]
log from start until the last series of popups is shown (after splash screen)
Comment 5 Wolfram Kroiss 2016-07-29 09:12:14 UTC
attached a few log files.

BTW: My PC runs on Windows 10 64-bit. Digikam 5.0.0 was installed on 20/07/2016 (5.0.0-2) via http://download.kde.org/stable/digikam/
Comment 6 caulier.gilles 2016-07-29 09:26:35 UTC
"D:/Eigene Dateien/Eigene Bilder/fotos" where you store database files and collection of photo is a removable media ?

Do you have any Antivirus software working in background around D: ?

Gilles Caulier
Comment 7 Wolfram Kroiss 2016-07-29 09:33:14 UTC
Yes. There is antivirus and also a backup job runs in the background. Probably you need to remove their debug messages.

The complete log was made first. Then I closed digikam and restarted, creating the two other log files. So I guess you can safely assume that only those events that appear in all logs are relevant.

BTW: I tried with one card inserted. The behaviour is similar except that I don't get the popup for the drive holding the card.

BTW2: Whenever I push the Import button in digikam (or I select any specific card reader in Menu-->Import-->Card Reader, even if I select the inserted card) digikam would present me the same series of popups.
Comment 8 caulier.gilles 2016-07-29 11:35:21 UTC
I suspect that the removable media D:/ is the problem here.

I suspect that KDE Solid framework do not work under Windows. Removable media UUID is provided by Solid and is registered in database

Can you try 2 workaround in a new account :

1/ store database files somewhere in C:/ and use removable media to store collections.

2/ store all somewhere in C:/ (databases and collections).

For both, look if the problem is reproducible.

Gilles Caulier
Comment 9 Wolfram Kroiss 2016-07-29 11:52:09 UTC
What do you mean with "removable media D:\". This is the second partition of my hdd. I can't move data to C: because the first partition is just large enough to hold the OS and the applications. I have >200GB of images which I'm not going to move anywhere else.

I'll wait until the backup is done (probably not before tomorrow afternoon/evening). Then I will reboot the machine, deactivate anti-virus, and start digikam before any other application was started. Let's see if the problem still appears then. If yes, we would at least have a clean debug log.
Comment 10 caulier.gilles 2016-07-29 13:23:48 UTC
Ah so D:/ is not a removable disk as i suspected.... Ok.

How D:/ is formatted ? NTFS ? FAT ?

Gilles Caulier
Comment 11 Wolfram Kroiss 2016-07-29 13:31:24 UTC
NTFS.
Comment 12 Wolfram Kroiss 2016-07-31 10:58:10 UTC
After restarting the computer this phenomenon doesn't appear. Severity decreased to "minor". I would like to do some additional tests (e.g. what happens if a memory card was inserted, then ejected, then digikam). But I'll run them end of August when I'm not so busy. I hope we can keep this defect open until then.
Comment 13 Twilight Sparkle 2016-08-12 17:02:51 UTC
With 5.00 and 5.10 I've experienced this same problem.

It does not go away after a reboot.

Win 7 64 bit.
Comment 14 caulier.gilles 2016-08-12 17:08:31 UTC
Thanks for the feedback.

Typically, there is no interaction with memory card device under Windows, as KDE::Solid API dedicated for that as under Linux do not work under Windows.

We plan to add separated code to handle USB device notifications.

Other problem is to test here under windows : there is no real computer with Windows, only a virtual machine. So the results can be different.

Gilles Caulier
Comment 15 Twilight Sparkle 2016-08-12 17:12:49 UTC
Created attachment 100563 [details]
Log using wintrace tool

I did a log as well following the previous post directions.
Comment 16 caulier.gilles 2016-08-12 17:31:44 UTC
The end of the trace is very very strange... Typically we see only these message (and limited ones) at end of digiKam session, not at startup...

Gilles Caulier
Comment 17 caulier.gilles 2016-08-12 17:40:08 UTC
Twilight,

I think you will have more trace with debugview tool, especially from operating system.

Gilles Caulier
Comment 18 Twilight Sparkle 2016-08-12 18:09:42 UTC
Created attachment 100566 [details]
Log using debug view

Line 22 is where the trace was when the first error box appeared.  

Also I screwed up on previous post, I meant  debugview but wrote wintrace.  :-P
Comment 19 Twilight Sparkle 2016-08-12 18:12:59 UTC
(In reply to caulier.gilles from comment #16)
> The end of the trace is very very strange... Typically we see only these
> message (and limited ones) at end of digiKam session, not at startup...
> 
> Gilles Caulier

That's because I closed digikam before saving the trace.  I've redone the trace and left digikam running.
Comment 20 Ergin 2016-08-20 18:17:49 UTC
I am experiencing the same issue but in my case I get the popup 4 times for the 4 card reader drives I have and the messages appear at least twice; very annoying.
//*Ergin
Comment 21 Wolfram Kroiss 2016-08-21 18:18:08 UTC
Today I experienced this behavior again, directly after installing digikam 5.1.0.

Earlier today I used the card reader to retrieve images. I ejected the medium properly afterwards. Later I started digikam and got the message boxes twice for each of the four card drives.

A strange thing happened after retrieving the images from the memory card: All files have been properly copied. But after copying the memory card disappeared from "My Computer", i.e. the drive e: didn't show any medium inserted. After removing the card and re-inserting the drive behaved as usual. Probably the two events are not related at all. But I don't want to waste any piece of information that helps to reproduce this bug.
Comment 22 caulier.gilles 2016-08-21 18:19:48 UTC
This is really strange because KDE::Solid interface used under Linux to discovered in live the removable media do not work under Windows as i know.

Gilles Caulier
Comment 23 Don 2016-08-25 00:20:45 UTC
My install of digiKam on Windows 10 (64-bit) exhibits the same problem.  When starting digiKam, there is a warning for each card slot that nothing is installed.  Selecting continue for each error eventually lets digiKam start.  This has happened each time after the first that digiKam is started.  A couple of times, it seemed like digiKam was beginning to cycle through the card slots a second time.

Don
Comment 24 caulier.gilles 2016-08-25 01:17:52 UTC
Can you take a screenshot of the problem ?

Gilles Caulier
Comment 25 Don 2016-08-25 02:19:12 UTC
Created attachment 100747 [details]
Screen Shot of Startup Showing No Disk Error

Four "drives" on memory card reader (F:, G:, H:, and I:).  For this screen shot, the No Disk dialog came up 5 times for each drive letter (FGHI-FGHI-FGHI ....) then digiKam started.
Comment 26 Twilight Sparkle 2016-08-28 00:08:21 UTC
Created attachment 100813 [details]
Screenshot of one of the messages

Here is a screenshot of the problem on my system.
Comment 27 Maik Qualmann 2016-08-28 08:29:48 UTC
Git commit 6010949f407ba9de35e06a216a4225442442d4d5 by Maik Qualmann.
Committed on 28/08/2016 at 08:28.
Pushed by mqualmann into branch 'master'.

try to fix the card reader access problem under windows

M  +65   -45   app/main/digikamapp.cpp

http://commits.kde.org/digikam/6010949f407ba9de35e06a216a4225442442d4d5
Comment 28 caulier.gilles 2016-08-28 08:44:20 UTC
Maik, 

This want mean that KDE::Solid interface start to work under Windows ? If yes, this is a great news.

Gilles Caulier
Comment 29 Maik Qualmann 2016-08-28 09:40:15 UTC
I have on work 2 computers with built-in card reader. None of these computer this problem is to reproduce here. However, the computer still running with older Windows versions. When I plug in there a USB flash drive, automatically appears in the digiKam menu - but in the card reader menu. But works. This commit prevents access to card reader volumes to get label or size,  if not a volume exists.

Maik
Comment 30 Twilight Sparkle 2016-08-29 00:46:02 UTC
Created attachment 100836 [details]
Screenshot of card readers and their names.

Don't know if this helps... but here is a screenshot giving some details about the card reader in my computer.   If you need more details on the device ask and I'll send it.
Comment 31 caulier.gilles 2016-08-30 20:39:48 UTC
Beta Windows 64bits installer for digiKam 5.2.0 for testing is here :

https://drive.google.com/open?id=0BzeiVr-byqt5a19HZEcyeXZrTHM

It include last patch from comment #27

Gilles Caulier
Comment 32 Twilight Sparkle 2016-08-31 14:07:28 UTC
Created attachment 100862 [details]
With the patched 5.2 version

(In reply to caulier.gilles from comment #31)
> Beta Windows 64bits installer for digiKam 5.2.0 for testing is here :
> 
> https://drive.google.com/open?id=0BzeiVr-byqt5a19HZEcyeXZrTHM
> 
> It include last patch from comment #27
> 
> Gilles Caulier

Problem persists.  Attached is a screenshot showing the debugview and the error message at the same time.
Comment 33 Twilight Sparkle 2016-08-31 14:08:45 UTC
Created attachment 100863 [details]
5.2 patch debugview log
Comment 34 Maik Qualmann 2016-08-31 18:53:31 UTC
Git commit 9bcc19c2701202599e11bfe53cfed8f18b30509d by Maik Qualmann.
Committed on 31/08/2016 at 18:52.
Pushed by mqualmann into branch 'master'.

revert commit #6010949f407ba9de35e06a216a4225442442d4d5

M  +45   -65   app/main/digikamapp.cpp

http://commits.kde.org/digikam/9bcc19c2701202599e11bfe53cfed8f18b30509d
Comment 35 Twilight Sparkle 2016-09-07 11:13:19 UTC
Maybe add some more messages that the debugview can grab to help pin down the problem?
Comment 36 Twilight Sparkle 2016-10-26 01:07:05 UTC
Found an interesting behavior that might help pinpoint the bug.
When I go to import and select the device that has a memory card in it... I get the same error message as when starting, except only repeated once.
Comment 37 Twilight Sparkle 2016-11-08 13:32:37 UTC
Bug present 5.3
Comment 38 Nicolas Brisset 2016-11-20 20:34:09 UTC
I also see this bug (5.2.0 installed, Windows 7 64 bits AND Windows 10 64 bits on a different PC). I also use a card reader to transfer the pictures, I suspect this has something to do with the issue.

Now, the interesting thing in my case is that I live close to Salon de Provence => @Gilles C.: if you still live in the area, we could maybe organize a live debug session on the PC with the problem, since it seems you can't reproduce it. I also have a couple of other problems we could look at... I'd be really happy to help improve digikam, it's such a great program!
Comment 39 Maik Qualmann 2016-11-20 20:57:29 UTC
I have now access to a Windows7 computer where I can reproduce the problem. I will create a special debug version in the next days and look.

Maik
Comment 40 Anthony Cartmell 2016-11-21 10:39:03 UTC
I also get this problem, and Digikam also wants to access the floppy disk in drive A: here!

The problem occurs whether or not I ask to scan for changes on startup.
Comment 41 Maik Qualmann 2016-12-21 19:41:55 UTC
I have created a special debug version. I can not reproduce the problem on my test computer. I think the problem was fixed in the Solid framework now.

Please try the latest Windows build (digiKam-5.4.0) from Gilles Google drive for testing:

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Maik
Comment 42 caulier.gilles 2016-12-21 22:32:59 UTC
Just for info, last KF5 5.29.0 is now used to build digiKam bundles. In this KF5 release, Solid changelog report : "winutils_p.h: Restore compatibility with WinXP SDK".

This can be the solution of the problem.

So please check if new Windows installer work fine now, as Maik said.
Thanks in advance for your feedback.

Gilles Caulier
Comment 43 Anthony Cartmell 2016-12-22 10:56:45 UTC
It's a lot better, but not quite fully fixed.

I only get one error popup now, saying that drive A: is not ready. It no longer pops up lots of errors for the card reader drives.
Comment 44 Twilight Sparkle 2016-12-28 20:36:14 UTC
I just tried the new build.  It fixed the bug completly for me.

@ Anthony Cartmell
Do you have a floppy drive?  I don't and I'm no logger getting any error messages.  (I was just wondering since A is traditionally the drive name for floppies.)
Comment 45 Anthony Cartmell 2016-12-29 11:21:24 UTC
Aha, somehow the A: drive was present on my Windows 7 machine, even though it doesn't have a floppy drive. A restart via the BIOS settings to disable the legacy floppy drive fixed this problem.

So I can report that the beta release of 5.4 works perfectly here, Windows 7 64-bit. Thanks to everyone involved!
Comment 46 caulier.gilles 2016-12-29 11:24:42 UTC
Thanks to all for your feedbacks and tests under Windows.
It's very appreciate, as we are not Windows users (as developers). Remmeber that whole digiKam (including all dependencies are cross-compiled under Linux).

This take age (around 4 hours to build 32 and 64 bits version from scratch). The tests are don in a VM with Windows 7. Results can be different with a real install on computer.

Gilles Caulier
Comment 47 Wolfram Kroiss 2017-03-05 16:41:00 UTC
Dear Gilles and Maik (and all others who contributed),

during the last few weeks of using digikam 5.4.0 I didn't experience the problem at all. Therefore I set the status to VERIFIED. Hope this is ok for everyone following this thread.

Thank you very much!