Exiv2 segfaults when reading files (probably Leica DNG files)

Bug #1869874 reported by Wolfram Seidler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rapid Photo Downloader
Fix Released
Medium
Damon Lynch

Bug Description

Hi,

after download, RPD remains as if still downloading photos (although finished and a message "x sec remaining", but it never ends.

Also thumbnail generation either fails or only one random thumbnail is created. Message shown that thumbnail gerneration is in process (? I have a german version installed ...).

Never had these problems before. 2 things are different:

I have a new machine, which is quite powerful, and with this new machine I am using version 0.9.20 for the first time.

Best
Wolfram

Revision history for this message
Wolfram Seidler (wos0107) wrote :
Revision history for this message
Damon Lynch (dlynch3) wrote :

Please also include the configuration file found in the directory ~/.config/Rapid Photo Downloader/

Revision history for this message
Damon Lynch (dlynch3) wrote :

Also, please explain what precisely is mounted at /media/wos/Entertainment/fotos?

In all cases similar to this in the past, the problem has been a wrongly configured network share.

Given there are no exceptions reported in the log file, I strongly suspect that is the case here too. Rapid Photo Downloader is trying to read from or copy to a device on the network, and the read or write is stalling.

Changed in rapid:
status: New → Incomplete
assignee: nobody → Damon Lynch (dlynch3)
Revision history for this message
Wolfram Seidler (wos0107) wrote : Re: [Bug 1869874] Re: No thumbnail generation and RPD stalled after download

Hi,

please find the config file attached

best
Wolfram

Am 31.03.20 um 18:09 schrieb Damon Lynch:
> Please also include the configuration file found in the directory
> ~/.config/Rapid Photo Downloader/
>

Revision history for this message
Wolfram Seidler (wos0107) wrote :

It's an external 2GB external USB drive, not a network drive.
I got my new computer just a couple of days agon, before I have been
using RPD with this external drive on my laptop without any problems.

Am 31.03.20 um 18:13 schrieb Damon Lynch:
> Also, please explain what precisely is mounted at
> /media/wos/Entertainment/fotos?
>
> In all cases similar to this in the past, the problem has been a wrongly
> configured network share.
>
> Given there are no exceptions reported in the log file, I strongly
> suspect that is the case here too. Rapid Photo Downloader is trying to
> read from or copy to a device on the network, and the read or write is
> stalling.
>
> ** Changed in: rapid
> Status: New => Incomplete
>
> ** Changed in: rapid
> Assignee: (unassigned) => Damon Lynch (dlynch3)
>

Revision history for this message
Damon Lynch (dlynch3) wrote : Re: No thumbnail generation and RPD stalled after download

In that case it is worth investigating if you have a USB connection problem (it happens sometimes, including to me on an Asrock X470 motherboard).

In any case please share with me privately some of the photos you are having problems with. If you want to send me new files of irrelevant content simply for testing so you don't need to share your private photos, that's perfectly fine. But they must fail to download on your system using Rapid Photo Downloader. If they work on my system then that will help narrow the problem down.

Revision history for this message
Wolfram Seidler (wos0107) wrote : Re: [Bug 1869874] Re: No thumbnail generation and RPD stalled after download

Hi,

what I did now, is to copy the photos to another USB drive, this time a
usb-c type. but no difference. The thing is, that the photos ARE
downloaded, but RPD ist pretending to be not finished and stalls at 99%.
I have made a screencast so that you can see what's happening.
Its 20MB, would that be ok for you?

Thanks a lot, Wolfram

Am 01.04.20 um 00:16 schrieb Damon Lynch:
> In that case it is worth investigating if you have a USB connection
> problem (it happens sometimes, including to me on an Asrock X470
> motherboard).
>
> In any case please share with me privately some of the photos you are
> having problems with. If you want to send me new files of irrelevant
> content simply for testing so you don't need to share your private
> photos, that's perfectly fine. But they must fail to download on your
> system using Rapid Photo Downloader. If they work on my system then that
> will help narrow the problem down.
>

Damon Lynch (dlynch3)
summary: - No thumbnail generation and RPD stalled after download
+ Exiv2 segfaults when reading files
Revision history for this message
Damon Lynch (dlynch3) wrote : Re: Exiv2 segfaults when reading files

Okay, now I see what is happening. Exiv2 is crashing (a segfault) on one or more of your files. I'd never seen this in a user report before, but I had seen it with my collection of test files, on one Leica DNG file. It's a not a trivial problem to fix because exiv2 segfaults without any warning and brings down the entire Python process with it. Not good.

For now the only solution for you is to:

1. figure out the problematic files and don't use Rapid Photo Downloader on them (probably your Leica files, I'd imagine)
2. upgrade (or downgrade) your version of exiv2 by compiling and installing a different version yourself, and hope the different version of exiv2 doesn't crash
3. upgrade (or downgrade) your distro to a newer or older release that already includes a different exiv2 version and likewise hope it doesn't crash

Given the difficulty of actually fixing the exiv2 crash problem, and how rarely it occurs, I think the best solution will be for a future version of Rapid Photo Downloader to give the user the option to bypass exiv2 entirely and use ExifTool instead.

ExifTool is really slow compared to exiv2, but at least it doesn't crash.

Changed in rapid:
status: Incomplete → Triaged
summary: - Exiv2 segfaults when reading files
+ Exiv2 segfaults when reading files (probably Leica DNG files)
Damon Lynch (dlynch3)
Changed in rapid:
milestone: none → 0.9.21
status: Triaged → Fix Committed
importance: Undecided → Medium
Damon Lynch (dlynch3)
Changed in rapid:
status: Fix Committed → Fix Released
Revision history for this message
Wolfram Seidler (wos0107) wrote :

Hi Damon,

first of all thanks for the quick fix!

But: unfortunately, it is still not working correctly. Let me try to summarize, what is happening:

1. RPD is downloading the photos
2. RPD is ending the Download (see logfile)
3. status bar still shows 98% or 99% or even 100% on the right side, on the left ist is showing that it is still downloading
4. the only possibility is to click the stop download button in the top right
5. looking for the next photos to download
6. RPD wanrs that the download folder is going to be changed
7. click ok - now RPD ,essage that the previous download has finished.:

Checking the logfile shows that after clicking the stop-button there is an error
"rapid.py 5220: Removed device /media/wos/Lacie_2GB/Fotosammlung/2009/12/Wien Weihnachten was being downloaded from"

So there seems to be a problem with finishing the job after all photos have been downloaded.

I am attaching the logfile here. I also made a screencast which should demonstrate, what I was trying to explain here.

But anyway I very much appreciate your efforts with this problem as well as generally with providing us with this wonderful piece of software! I couldn't really live without it.

Regards
Wolfram

Revision history for this message
Wolfram Seidler (wos0107) wrote :

and now the screencast

Revision history for this message
Damon Lynch (dlynch3) wrote :

Hi Wolfram, did you read this documentation and set the correct preference setting?

https://damonlynch.net/rapid/documentation/#miscellaneousnpreferences

See in particular "Read photo metadata using only ExifTool"

Revision history for this message
Wolfram Seidler (wos0107) wrote : Re: [Bug 1869874] Re: Exiv2 segfaults when reading files (probably Leica DNG files)

Hi Damon,

sorry! stupid me ...
now it works - thanks so much!!

regards
Wolfram

Am 07.04.20 um 18:28 schrieb Damon Lynch:
> Hi Wolfram, did you read this documentation and set the correct
> preference setting?
>
> https://damonlynch.net/rapid/documentation/#miscellaneousnpreferences
>
> See in particular "Read photo metadata using only ExifTool"
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.