Cannot open HEIF/HEIC images in 23.04/lunar anymore

Bug #2017420 reported by Marian Rainer-Harbach
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
eog (Ubuntu)
Invalid
Undecided
Unassigned
Lunar
Invalid
Undecided
Unassigned
gdk-pixbuf (Ubuntu)
Invalid
Undecided
Unassigned
Lunar
Invalid
Undecided
Unassigned
libheif (Ubuntu)
Fix Released
High
Unassigned
Lunar
Fix Released
High
Unassigned

Bug Description

* Impact

The libheif loader is bailing out due to a missing plugin directory which leads to image viewer as eog not being able to open pictures in that format anymore

* Testcase

Install libheif1 and heif-gdk-pixbuf and try to open a .heif file in eog

* Where problems could occur

The package build is using the option to not split the codec in separate plugins but the version of Lunar doesn't handle the missing plugins directory and bails out. The code of the version in mantic has been refactored in a way which fixes this problem. For lunar it's easier to just create the directory. The directory is included in the libheif1 binary but that should not create any conflict, it's a temporary situation for lunar only and even if the soname changed dpkg allows for several deb packages to provide the same directory.

----------------------------------------------

In previous Ubuntu versions, including 22.10, I was able to open HEIF/HEIC files by installing libheif1 and heif-gdk-pixbuf. This does not work anymore in 23.04.

Running eog in a terminal displays:
$ eog IMG_9996.HEIC

** (eog:44492): WARNING **: 14:29:17.537: Cannot read plugin directory.

(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.537: gdk_pixbuf_animation_is_static_image: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed

(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.538: gdk_pixbuf_animation_get_iter: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed

(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.538: gdk_pixbuf_animation_iter_get_pixbuf: assertion 'GDK_IS_PIXBUF_ANIMATION_ITER (iter)' failed

** (eog:44492): WARNING **: 14:29:17.543: Cannot read plugin directory.

(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.543: gdk_pixbuf_animation_is_static_image: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed

(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.543: gdk_pixbuf_animation_get_iter: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed

(eog:44492): GdkPixbuf-CRITICAL **: 14:29:17.543: gdk_pixbuf_animation_iter_get_pixbuf: assertion 'GDK_IS_PIXBUF_ANIMATION_ITER (iter)' failed

eog then shows "Could not load image “IMG_9996.HEIC”. Image loading failed."

gpicview even crashes immediately:
$ gpicview IMG_9996.HEIC
Gtk-Message: 14:30:30.216: Failed to load module "canberra-gtk-module"

** (gpicview:44624): WARNING **: 14:30:30.260: Cannot read plugin directory.

** (gpicview:44624): WARNING **: 14:30:30.265: Cannot read plugin directory.
Segmentation fault (core dumped)

The problem concerns all HEIF/HEIC images I tested.

The installed versions of the (possibly) relevant packages are:
libheif1: 1.14.2-1
heif-gdk-pixbuf: 1.14.2-1
libgdk-pixbuf-2.0-0: 2.42.10+dfsg-1build1
eog: 44.0-1
gpicview: 0.2.5-3build1

tags: added: lunar
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in eog (Ubuntu):
status: New → Confirmed
Changed in gdk-pixbuf (Ubuntu):
status: New → Confirmed
Changed in libheif (Ubuntu):
status: New → Confirmed
Revision history for this message
Dirk Farin (dirk-farin) wrote :

This is probably due to an incorrectly set plugin directory. See my comments here: https://github.com/strukturag/libheif/issues/827

Revision history for this message
Marian Rainer-Harbach (marianrh) wrote (last edit ):

Dirk is correct: The library tries to open /usr/lib/x86_64-linux-gnu/libheif/plugins, which doesn't exist, but is required in the libheif version in 23.04.

After creating the path, both eog and gpicview can show HEIF/HEIC files again, so this is an easy workaround.

According to Dirk's comment in https://github.com/strukturag/libheif/issues/827#issuecomment-1519070458, the package in Ubuntu should either create the path, or libheif should be upgraded to at least v1.15.0, preferably v1.15.2.

Revision history for this message
Tux Freedom (jauntyjackalope) wrote :

Thank you for the workaround which works in my case as well.

Ubuntu 23.04 6.2.0-20-generic
libheif 1.14.2-1

Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is fixed in https://launchpad.net/ubuntu/+source/libheif/1.15.1-1 , we will issue a stable update also for Lunar

Changed in libheif (Ubuntu):
importance: Undecided → High
Changed in gdk-pixbuf (Ubuntu):
status: Confirmed → Invalid
Changed in eog (Ubuntu):
status: Confirmed → Invalid
Changed in libheif (Ubuntu):
status: Confirmed → Fix Released
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

Where does one get a .heif file to use for the test case?

Changed in eog (Ubuntu Lunar):
status: New → Invalid
Changed in gdk-pixbuf (Ubuntu Lunar):
status: New → Invalid
Changed in libheif (Ubuntu Lunar):
status: New → Incomplete
importance: Undecided → High
Revision history for this message
Sebastien Bacher (seb128) wrote :

I've tested it with files from https://filesamples.com/formats/heif which was in the first returns of a google query for heif examples, that's not an official recommendation of that website though...

Changed in libheif (Ubuntu Lunar):
status: Incomplete → New
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Marian, or anyone else affected,

Accepted libheif into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libheif/1.14.2-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libheif (Ubuntu Lunar):
status: New → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Marian Rainer-Harbach (marianrh) wrote :

I tested the package from proposed after deleting the manually created plugins directory first. The new package correctly creates the directory and HEIF files can be opened. Thanks!

tags: added: verification-done verification-done-lunar
removed: verification-needed verification-needed-lunar
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for libheif has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libheif - 1.14.2-1ubuntu1

---------------
libheif (1.14.2-1ubuntu1) lunar; urgency=medium

  * debian/libheif1.dirs:
    - create the plugins directory, if it's missing the loader is bailing
      out. Fix opening of heif files in eog (lp: #2017420)

 -- Sebastien Bacher <email address hidden> Thu, 01 Jun 2023 11:31:10 +0200

Changed in libheif (Ubuntu Lunar):
status: Fix Committed → Fix Released
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.