libgd icon indicating copy to clipboard operation
libgd copied to clipboard

Test heif/heif_read fails with libheif 1.18.0+

Open loqs opened this issue 1 year ago • 1 comments

Describe the bug The test heif/heif_read fails with libheif 1.18.0 or newer which contain https://github.com/strukturag/libheif/commit/0b236060d0585d744e26e2f745cb18419a38ccb8. The failing test in gd appears to be triggerd by a new check in libheif that returns an error Image has no 'ispe' property from heif_context_read_from_memory_without_copy for tests/heif/label.heic.

To Reproduce Steps to reproduce the behavior:

 ./bootstrap.sh
 ./configure \
    --prefix=/usr \
    --disable-rpath
make
make check

Expected behavior All checks should pass.

Actual results The test heif/heif_read fails with:

FAIL: heif/heif_read
====================

dlopen: libavcodec.so.61: cannot open shared object file: No such file or directory
GD Warning: gd-heif context creation failed
heif/heif_read.c:23: Assert failed in <heif/heif_read.c:23>
FAIL heif/heif_read (exit status: 2)

Environment (please complete the following information):

  • OS: Arch Linux
  • Version rolling
  • fontconfig 2.15.0
  • libxpm 3.5.17
  • libwebp 1.4.0
  • libavif 1.1.1
  • libheif 1.18.2

Additional context test-suite.log https://gitlab.archlinux.org/archlinux/packaging/packages/gd/-/issues/1

loqs avatar Sep 15 '24 22:09 loqs

Indeed, all four MinGW CI jobs are failing because of this.

I do not understand, though, what this test is really supposed to be testing. The comment is

https://github.com/libgd/libgd/blob/6e42ee80eb3bcf840c9fc03c6adc0550c1e02c63/tests/heif/heif_read.c#L2-L3

but apparently, the test checks for the opposite. Maybe @YakoYakoYokuYoku can clarify?

cmb69 avatar Oct 14 '24 10:10 cmb69

Maybe @YakoYakoYokuYoku can clarify?

It was meant to check that libgd indeed supports reading HEIF images, can't remember why the me from the past chose such confusing words.

YakoYakoYokuYoku avatar Oct 24 '24 01:10 YakoYakoYokuYoku

I'm in doubt, because FFmpeg can read the image but libheif cannot. Said image was produced with a version previous to v1.12.0, possibly v1.10.0, which didn't add the elusive ispe property. This is an upstream issue with libheif, so an issue should be opened there.

YakoYakoYokuYoku avatar Oct 26 '24 21:10 YakoYakoYokuYoku

The issue has been resolved upstream, and the MinGW builds (using libheif 1.19.5-2) are green again (one fails for another test case), so I'd close this issue if the test wasn't failing for me locally with a self-built libheif 1.19.5 (using libde265 1.0.15). I'll check that ASAP.

cmb69 avatar Dec 21 '24 14:12 cmb69

if the test wasn't failing for me locally

Actually another test fails for me (heif_im2im), so I consider this issue to be resolved.

cmb69 avatar Dec 22 '24 10:12 cmb69