Bug 408883 - Crash after opening video in Image Editor - /tmp runs out of space
Summary: Crash after opening video in Image Editor - /tmp runs out of space
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: ImageEditor-Load (other bugs)
Version First Reported In: 6.1.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-18 20:33 UTC by Kristian
Modified: 2022-02-03 03:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian 2019-06-18 20:33:57 UTC
SUMMARY
Every time I open a video in Image Editor, digikam crashes shortly after. /tmp is flooded with an ImageMagick *.pam file and due to the crash it is not destroyed. The file is several GB large. This results in crashes of further KDE programs. I need to manually delete the *.pam file to stop further crashes.

Please note that I'm not sure if this bug is correctly assigned to Image Editor component or if this is related to another component.

Console output:

digikam.general: Detected change, triggering rescan of "/home/USER/FOLDER/"
digikam.database: Starting scan!
digikam.geoiface: ----
digikam.dimg: "/home/USER/FOLDER/IMAGE-OlympusTG2.JPG"  : JPEG file identified
digikam.metaengine: Exiv2 ( 2 ) :  Directory OlympusCs, entry 0x0101: Strip 0 is outside of the data area; ignored.

digikam.metaengine: Exif color-space tag is sRGB. Using default sRGB ICC profile.
digikam.geoiface: ----
digikam.dimg: "/home/USER/FOLDER/VIDEO-OlympusTG2.MOV"  : QIMAGE file identified
digikam.metaengine: Parse metadada with FFMpeg: "/home/USER/FOLDER/VIDEO-OlympusTG2.MOV"
digikam.metaengine: -- FFMpeg video stream metadata entries :
digikam.metaengine: QMap(("creation_time", "2019-06-17T16:25:01.000000")("language", "jpn"))
digikam.metaengine: -----------------------------------------
digikam.metaengine: -- FFMpeg audio stream metadata entries :
digikam.metaengine: QMap(("creation_time", "2019-06-17T16:25:01.000000")("language", "jpn"))
digikam.metaengine: -----------------------------------------
digikam.metaengine: -- FFMpeg root container metadata entries :
digikam.metaengine: QMap(("compatible_brands", "qt  ")("creation_time", "2019-06-17T16:25:01.000000")("major_brand", "qt  ")("minor_version", "537986816"))
digikam.metaengine: ------------------------------------------
digikam.dimg.qimage: Can not load " "/home/USER/FOLDER/VIDEO-OlympusTG2.MOV" " using DImg::QImageLoader!
digikam.dimg.qimage: Error message from loader: "Unsupported image format"
digikam.dimg.qimage: ImageMagick exception [ "/home/USER/FOLDER/VIDEO-OlympusTG2.MOV" ] Magick: delegate failed `'ffmpeg' -nostdin -v -1 -i '%i' -vframes %S -vcodec pam -an -f rawvideo -y '%u.pam' 2> '%u'' @ error/delegate.c/InvokeDelegate/1867
digikam.general: Cannot load image for "/home/USER/FOLDER/VIDEO-OlympusTG2.MOV"
digikam.general: d->image is NULL
digikam.general: d->image is NULL
digikam.general: d->image is NULL
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = digikam path = /usr/bin pid = 10002
KCrash: Arguments: /usr/bin/digikam 
KCrash: Attempting to start /usr/lib/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0
pa_write() failed while trying to wake up the mainloop: Ungültiger Dateideskriptor
pa_write() failed while trying to wake up the mainloop: Ungültiger Dateideskriptor
pa_write() failed while trying to wake up the mainloop: Ungültiger Dateideskriptor
Invalid write to eventfd: Ungültiger Dateideskriptor
Code should not be reached at pulsecore/fdsem.c:199, function pa_fdsem_post(). Aborting.
Unable to start Dr. Konqi
Re-raising signal for core dump handling.
Abgebrochen (Speicherabzug geschrieben)



STEPS TO REPRODUCE
1. Open several images in Image Editor including video file
2. Skip to video file 
3. digikam crashes
4. /tmp runs out of disk space
5. Further programs crash

OBSERVED RESULT
Crash

EXPECTED RESULT
Open video

SOFTWARE/OS VERSIONS
Application: digikam (6.1.0)
Qt Version: 5.12.4
Frameworks Version: 5.59.0
Operating System: Linux 5.1.11-arch1-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

ADDITIONAL INFORMATION
- No backtrace. Presumably because /tmp runs out of space.
- If only the video is selected to be opened Image Editor, the standard video program starts.
- As workaround I filter out videos before using the Image Editor.
Comment 1 caulier.gilles 2019-06-18 20:37:33 UTC
This problem must be resolved in next 6.2.0 release as a better type mime check is performed to prevent video loading in Image Editor.

You can test with 6.2.0 pre-version Linux AppImage bundle available here :

https://files.kde.org/digikam/

Gilles Caulier
Comment 2 Maik Qualmann 2019-06-18 21:06:10 UTC
So what is that? DigiKam-6.1.0 does not have an ImageMagick Loader. It looks like the message comes from the QImage Loader. I suspect your distribution installs a weird kimageformat packet. This explains why I temporarily had Gimp-2.10 support with the QImage Loader. However, openSUSE has removed it again.

Maik
Comment 3 Maik Qualmann 2019-06-18 21:19:55 UTC
Git commit 1464bb13b630c5658de6a2c1698d30e3a7c88bef by Maik Qualmann.
Committed on 18/06/2019 at 21:18.
Pushed by mqualmann into branch 'master'.

only files with image mime type for the QImageLoader
FIXED-IN: 6.2.0

M  +2    -1    NEWS
M  +10   -0    core/libs/dimg/loaders/qimageloader.cpp

https://invent.kde.org/kde/digikam/commit/1464bb13b630c5658de6a2c1698d30e3a7c88bef