Navigation skips images if ARW files are present
Taking pictures with a Sony DSC-RX100M6 produces JPG and ARW (Sony raw) files stored in the same folder. If I open such a folder and start navigating, imv exhibits some wrong behavior. Given this folder containing 4 images in JPG and ARW formats:
> ls
DSC05659.ARW
DSC05659.JPG
DSC05661.ARW
DSC05661.JPG
DSC05662.ARW
DSC05662.JPG
DSC05663.ARW
DSC05663.JPG
running imv ./*, imv opens up and its title is:
imv - [1/5] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05661.JPG [scale to fit]
Why 1/5, I don't know, since 4 or 8 would make more sense, depending whether it counts the ARW files or not. Why it starts with 5661 and not 5659, I can't say either, because the input order should be alphabetical in my shell. If I press the right arrow key to go to the next picture, the title changes very quickly several times:
imv - [2/5] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05662.ARW [scale to fit]
imv - [2/3] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05663.ARW [scale to fit]
imv - [2/2] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05663.JPG [scale to fit]
Now, only two images can be browsed. Pressing right arrow just switches between two remaining images:
imv - [1/2] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05661.JPG [scale to fit]
imv - [2/2] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05663.JPG [scale to fit]
imv - [1/2] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05661.JPG [scale to fit]
imv - [2/2] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05663.JPG [scale to fit]
imv - [1/2] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05661.JPG [scale to fit]
imv - [2/2] [5472x3648] [23%] /home/shapeshifter/temp/imv-bug/DSC05663.JPG [scale to fit]
If I try this again a few times, sometimes 3 images remain, sometimes 2. When launching imv, it sometimes prints
freeimage: open_path(/home/shapeshifter/temp/imv-bug/DSC05659.ARW)
but most times it doesn't. It always prints something variation of:
FreeImage_Load returned NULLFreeImage_Load returned NULLFreeImage_Load returned NULLFreeImage_Load returned NULLFreeImage_Load returned NULL
Here's some info on the image files:
shapeshifter@atticora> file DSC05659.ARW
DSC05659.ARW: TIFF image data, little-endian, direntries=19, compression=JPEG (old), description= , manufacturer=SONY, model=DSC-RX100M6, orientation=upper-left, xresolution=292, yresolution=300, resolutionunit=2, software=DSC-RX100M6 v1.00, datetime=2020:05:23 12:41:07
shapeshifter@atticora> file DSC05659.JPG
DSC05659.JPG: JPEG image data, Exif standard: [TIFF image data, little-endian, direntries=12, description= , manufacturer=SONY, model=DSC-RX100M6, orientation=upper-left, xresolution=208, yresolution=216, resolutionunit=2, software=DSC-RX100M6 v1.00, datetime=2020:05:23 12:41:07], baseline, precision 8, 5472x3648, components 3
shapeshifter@atticora> exiv2 DSC05659.ARW
File name : DSC05659.ARW
File size : 21595136 Bytes
MIME type : image/tiff
Image size : 5504 x 3672
Camera make : SONY
Camera model : DSC-RX100M6
Image timestamp : 2020:05:23 12:41:07
Image number :
Exposure time : 1/800 s
Aperture : F4.5
Exposure bias : 0 EV
Flash : No, auto
Flash bias : 0 EV
Focal length : 72.0 mm (35 mm equivalent: 200.0 mm)
Subject distance:
ISO speed : 125
Exposure mode : Auto
Metering mode : Multi-segment
Macro mode :
Image quality : Raw + JPEG
Exif Resolution : 5504 x 3672
White balance : Auto
Thumbnail : image/jpeg, 12771 Bytes
Copyright :
Exif comment :
shapeshifter@atticora> exiv2 DSC05659.JPG
File name : DSC05659.JPG
File size : 18570630 Bytes
MIME type : image/jpeg
Image size : 5472 x 3648
Camera make : SONY
Camera model : DSC-RX100M6
Image timestamp : 2020:05:23 12:41:07
Image number :
Exposure time : 1/800 s
Aperture : F4.5
Exposure bias : 0 EV
Flash : No, auto
Flash bias : 0 EV
Focal length : 72.0 mm (35 mm equivalent: 200.0 mm)
Subject distance:
ISO speed : 125
Exposure mode : Auto
Metering mode : Multi-segment
Macro mode :
Image quality : Raw + JPEG
Exif Resolution : 5472 x 3648
White balance : Auto
Thumbnail : image/jpeg, 12771 Bytes
Copyright :
Exif comment :
This is imv v4.1.0.r11.gf6046f8 built from git using the Arch AUR PKGBUILD, only modification being --buildtype=debug. freeimage 3.18.0-5.
There is no problem if I remove the ARW files from the folder or if I run imv ./*.JPG. In that case, it correctly shows [4/4] from the beginning and during navigation. Also, it starts with 5659 and pictures are in order.