Bug 429108 - FPX image crashes on selection
Summary: FPX image crashes on selection
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Setup-Views (show other bugs)
Version: 7.1.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2020-11-14 19:10 UTC by Alastair
Modified: 2021-04-24 09:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.3.0
Sentry Crash Report:


Attachments
Sample fpx file which crashes digikam (725.50 KB, image/vnd.fpx)
2020-11-15 10:27 UTC, Alastair
Details
First backtrace under guidance (11.80 KB, text/plain)
2020-11-22 13:25 UTC, Alastair
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alastair 2020-11-14 19:10:47 UTC
I have ImageMagick installed with libfpx included and working.  
I have Imagemagick included as an image loader.
I have included fpx in the mime types in Settings>View Mime types
When I select an image.fpx picture the program crashes immediately.
This happens every time.

STEPS TO REPRODUCE
1. Select an .fpx picture with the Mime type set as fpx

OBSERVED RESULT

1. System crashes immediately.
3. Unable to obtain backtrace or receive request for debugging tools.

EXPECTED RESULT
Picture should be opened as fpx image in digikam

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
Operating System: openSUSE Tumbleweed 20201111
KDE Plasma Version: 5.20.2
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.9.1-2-default
OS Type: 64-bit
Processors: 8 × Intel® Xeon® CPU E5606 @ 2.13GHz
Memory: 15.6 GiB of RAM
Graphics Processor: AMD CAICOS

ADDITIONAL INFORMATION
Comment 1 Alastair 2020-11-14 21:15:08 UTC
ImageMagick version 7.0.10-38 Q16 x86_64
Comment 2 Alastair 2020-11-14 21:15:26 UTC
ImageMagick version 7.0.10-38 Q16 x86_64
Comment 3 Maik Qualmann 2020-11-14 22:58:27 UTC
Please provide a backtrace. My ImageMagick here under OpenSUSE is compiled without libfpx, I can't test it.

Maik
Comment 4 Alastair 2020-11-15 09:52:23 UTC
On 14/11/2020 22:58, Maik Qualmann wrote:
> https://bugs.kde.org/show_bug.cgi?id=429108
> 
> Maik Qualmann <metzpinguin@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |metzpinguin@gmail.com
> 
> --- Comment #3 from Maik Qualmann <metzpinguin@gmail.com> ---
> Please provide a backtrace. My ImageMagick here under OpenSUSE is compiled
> without libfpx, I can't test it.
> 
> Maik
> 
Hi Maik,
Try as I might I cannot get the backtrace button to work.  Will try again today.
Comment 5 caulier.gilles 2020-11-15 10:01:29 UTC
Please add link to FPX image samples to try to reproduce the problem. Thanks in advance

Gilles Caulier
Comment 6 Alastair 2020-11-15 10:21:27 UTC
On 15/11/2020 10:01, bugzilla_noreply@kde.org wrote:
> https://bugs.kde.org/show_bug.cgi?id=429108
> 
> caulier.gilles@gmail.com changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |caulier.gilles@gmail.com
> 
> --- Comment #5 from caulier.gilles@gmail.com ---
> Please add link to FPX image samples to try to reproduce the problem. Thanks in
> advance
> 
> Gilles Caulier
> 
Hi Gilles,
Sorry to be so dumb but exactly what should I link to where.  I have all files on my drive and could post a sample to dropbox or pcloud.  What do you need?
I tried several times to get the backtrace but none is available.  I could look in the logs if you tell me where to look using systemctl etc.
Comment 7 Alastair 2020-11-15 10:27:53 UTC
Created attachment 133348 [details]
Sample fpx file which crashes digikam

I hope this is what you need.  All attempts to load this file in digikam crash the app immediately.
Comment 8 caulier.gilles 2020-11-15 10:41:43 UTC
yes, thanks for the FPX sample
Comment 9 Alastair 2020-11-22 11:14:34 UTC
Hi Gilles,
I have found that a single fpx file in an album directory does not crash the system and I can then access the album and view the fpx image and view it both as thumbnail and full size.  It seems the problem is due to working on more than one image.  I shall add images and see how I get on.

Meanwhile this is more of a problem for me than I thought because if I convert the image using imagemagick and convert or mogrify -format, the jpg image does not have the date the photo was taken neither does it have the metadata.  I shall try copying the metadata using exiftool but It would be better if this bug can be fixed please.
Comment 10 Alastair 2020-11-22 11:24:21 UTC
Further to my last note, I added one more fpx image and had no problem but when I added a third image to the album and tried to open it, digikam crashed immediately.  I hope this helps.
Comment 11 Maik Qualmann 2020-11-22 12:46:16 UTC
Start digiKam in the terminal with:

gdb digikam

Type "r" + Enter for run.

After the crash type:

"bt" + Enter for the backtrace

Maik
Comment 12 Alastair 2020-11-22 13:25:35 UTC
Created attachment 133562 [details]
First backtrace under guidance

I hope this is right.  Digikam froze this time rather than crash and I may not have all you need.  Tell me if you need me to repeat.
Comment 13 caulier.gilles 2020-11-22 14:52:24 UTC
It crash in the flashpix library used by ImageMagick.

It sound like the problem is not in digiKam as well, but in low level library used to decode image.

Can you process this fpx image with ImageMagick, for ex using "display" command line tool ?

If ImageMagick crash also, please report this problem as UPSTREAM to ImageMagick team. 

Gilles Caulier
Comment 14 Alastair 2020-11-22 17:15:12 UTC
Hi Maik,
I had no problems with using magick display command.  No crashes from imagemagick since I built it.  

My only complaint with imagemagick is that I cannot find the date the original picture was taken in the converted files.  The date is in the fpx files but gets lost in translation.
Comment 15 Alastair 2020-11-24 13:32:22 UTC
Hi Maik,
As I said, no problems with imagemagick.
Have you given up on this or can we do more to fix it?
Comment 16 Maik Qualmann 2020-11-26 09:53:03 UTC
I don't see how we can fix a crash in ImageMagick. I think we are using the ImageMagick API correctly in digiKam. We have already considered completely removing ImageMagick from digiKam. We have now given the loader the lowest priority and blocked known problematic image formats (XCF).

Maik
Comment 17 caulier.gilles 2021-03-30 06:53:40 UTC
digiKam 7.2.0 official release is published with more than 360 files closed from bugzilla:

https://www.digikam.org/news/2021-03-22-7.2.0_release_announcement/

Can you reproduce the dysfunction with this version ?

Thanks in advance for your feedback

Gilles Caulier
Comment 18 caulier.gilles 2021-04-24 09:38:25 UTC
Alastair,
With digiKam 7.3.0, the crash is not reproducible with your FPX sample :

https://imgur.com/s2d1tYy

Of course we don't get any thumbnail or preview. 

Maik, 

ExifTool support well FLashPix format as you can see :

File name: Bouquet.fpx (ExifTool)

>>> Composite <<<

ImageSize : 1536 1024
Megapixels : 1.572864


>>> File <<<

Directory : /home/gilles/Images
FileAccessDate : 2021:04:24 11:25:19+02:00
FileInodeChangeDate : 2021:04:24 11:25:19+02:00
FileModifyDate : 2021:04:24 11:24:54+02:00
FileName : Bouquet.fpx
FilePermissions : 664
FileSize : 742912
FileType : FPX
FileTypeExtension : FPX
MIMEType : image/vnd.fpx


>>> FlashPix <<<

CachedImageHeight : 1024
CachedImageWidth : 1536
CodePage : 1200
ColorTwistMatrix : 
CompObjUserType : FlashPix Object
CompObjUserTypeLen : 16
ContrastAdjustment : 1
CreateDate : 1999:02:14 17:14:17
CreatingTransform : 1
DataCreateDate : 1999:02:14 17:14:17
DataModifyDate : 1999:02:14 17:14:25
DataObjectID : 0F0DAC63-C439-11D2-9F8E-BD4517B3E445
DataObjectStatus : 0
DecimationMethod : 8
FileSource : 3
Filtering : 0
ImageHeight : 1024
ImageWidth : 1536
InputDataObjectList : 1
JPEGTables : binary data...
Make : Eastman Kodak Company
MaximumImageIndex : 2
MaximumOperationIndex : 1
MaximumTransformIndex : 1
MaxJPEGTableIndex : 254
Model : KODAK DC260
NumberOfResolutions : 6
NumChannels : 3
OperationClassID : 56616A00-C154-11CE-8553-00AA00A1F95B
OperationID : 56616A00-C154-11CE-8553-00AA00A1F95B
OperationNumber : 1
OutputDataObjectList : 2
RectangleOfInterest : 
ResultAspectRatio : 1.5
Software : Picture Easy Software 3
SpatialOrientation : 
SubimageColor : 03 0003
SubimageHeight : 256
SubimageHeight : 32
SubimageNumericalFormat : 17
SubimageTileCount : 1
SubimageTileHeight : 64
SubimageTileWidth : 64
SubimageWidth : 384
SubimageWidth : 48
ThumbnailClip : binary data...
TransformCreateDate : 1999:02:14 17:14:17
TransformModifyDate : 1999:02:14 17:14:25
TransformNodeID : 0F0DAC62-C439-11D2-9F8E-BD4517B3E445
UsingTransforms : 
VisibleOutputs : 2

The tag "ThumbnailClip" has binary data which can be used certainly as image preview. But it's another topic to do in another file in bugzilla.

As the crash is away, i close this file now.

Gilles Caulier