-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.17.0: test suite is failing in encode
unit
#986
Comments
encode
unit
Strange, I cannot reproduce this even when using exactly your cmake config. |
And when you run
|
Could you please be a little more precise about what exactly you want me to execute? 🤔 |
Sorry. So take any arbitrary JPEG image (e.g.
In the output, search for Do the same again, just with
This does not cover all test cases, but checks if the encoding works at all. |
First I don't see any .jpg file in source ot build tree. |
Any image on your machine will do. @farindk It must be working a bit - the uncompressed test is working OK. |
@bradh Can you reproduce the failing test? |
[tkloczko@pers-jacek examples]$ ./heif-enc heif-enc -A /usr/share/doc/sqlite-devel/images/cpu-usage.jpg out.avif
Not a JPEG file: starts with 0x7f 0x45
[tkloczko@pers-jacek examples]$ file /usr/share/doc/sqlite-devel/images/cpu-usage.jpg
/usr/share/doc/sqlite-devel/images/cpu-usage.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 96x96, segment length 16, comment: "speed-size-graph.ods - LibreOffice Calc", baseline, precision 8, 899x501, components 3 |
It passes for me. @kloczek Does it help if you turn on the WITH_JPEG_DECODER and/or WITH_JPEG_ENCODER options? |
cmake -L otput: -- Cache values
BUILD_SHARED_LIBS:BOOL=ON
BUILD_TESTING:BOOL=ON
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr
ENABLE_MULTITHREADING_SUPPORT:BOOL=ON
ENABLE_PARALLEL_TILE_DECODING:BOOL=ON
ENABLE_PLUGIN_LOADING:BOOL=ON
FUZZING_COMPILE_OPTIONS:STRING=-fsanitize=fuzzer,address,shift,integer -fno-sanitize-recover=shift,integer
FUZZING_CXX_COMPILER:STRING=clang++
FUZZING_C_COMPILER:STRING=clang
FUZZING_LINKER_OPTIONS:STRING=
PLUGIN_DIRECTORY:STRING=/usr/lib64/libheif
WITH_AOM_DECODER:BOOL=ON
WITH_AOM_DECODER_PLUGIN:BOOL=OFF
WITH_AOM_ENCODER:BOOL=ON
WITH_AOM_ENCODER_PLUGIN:BOOL=OFF
WITH_DAV1D:BOOL=OFF
WITH_DAV1D_PLUGIN:BOOL=ON
WITH_DEFLATE_HEADER_COMPRESSION:BOOL=OFF
WITH_EXAMPLES:BOOL=ON
WITH_FFMPEG_DECODER:BOOL=OFF
WITH_FFMPEG_DECODER_PLUGIN:BOOL=OFF
WITH_FUZZERS:BOOL=OFF
WITH_GDK_PIXBUF:BOOL=ON
WITH_JPEG_DECODER:BOOL=OFF
WITH_JPEG_DECODER_PLUGIN:BOOL=OFF
WITH_JPEG_ENCODER:BOOL=OFF
WITH_JPEG_ENCODER_PLUGIN:BOOL=OFF
WITH_KVAZAAR:BOOL=OFF
WITH_KVAZAAR_PLUGIN:BOOL=OFF
WITH_LIBDE265:BOOL=ON
WITH_LIBDE265_PLUGIN:BOOL=OFF
WITH_LIBSHARPYUV:BOOL=ON
WITH_OpenJPEG_DECODER:BOOL=OFF
WITH_OpenJPEG_DECODER_PLUGIN:BOOL=ON
WITH_OpenJPEG_ENCODER:BOOL=OFF
WITH_OpenJPEG_ENCODER_PLUGIN:BOOL=ON
WITH_RAV1E:BOOL=OFF
WITH_RAV1E_PLUGIN:BOOL=ON
WITH_REDUCED_VISIBILITY:BOOL=ON
WITH_SvtEnc:BOOL=OFF
WITH_SvtEnc_PLUGIN:BOOL=ON
WITH_UNCOMPRESSED_CODEC:BOOL=ON
WITH_X265:BOOL=ON
WITH_X265_PLUGIN:BOOL=OFF So decoder is enabled as plugin. |
The goal was to find out if the plugin system is the problem - possibly in the uninstalled state, possibly globally. I am trying to help, but I can't reproduce the problem locally. |
I managed to reproduce it like this:
@kloczek I'm quite sure that you also have an old installation on your system that is manipulating the test results. I think, we can close this. |
Prev version 1.16.2 in the same env was OK. -- Cache values
BUILD_SHARED_LIBS:BOOL=ON
BUILD_TESTING:BOOL=ON
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr
ENABLE_MULTITHREADING_SUPPORT:BOOL=ON
ENABLE_PARALLEL_TILE_DECODING:BOOL=ON
ENABLE_PLUGIN_LOADING:BOOL=ON
FUZZING_COMPILE_OPTIONS:STRING=-fsanitize=fuzzer,address,shift,integer -fno-sanitize-recover=shift,integer
FUZZING_CXX_COMPILER:STRING=clang++
FUZZING_C_COMPILER:STRING=clang
FUZZING_LINKER_OPTIONS:STRING=
PLUGIN_DIRECTORY:STRING=/usr/lib64/libheif
WITH_AOM_DECODER:BOOL=ON
WITH_AOM_DECODER_PLUGIN:BOOL=ON
WITH_AOM_ENCODER:BOOL=ON
WITH_AOM_ENCODER_PLUGIN:BOOL=ON
WITH_DAV1D:BOOL=OFF
WITH_DAV1D_PLUGIN:BOOL=ON
WITH_DEFLATE_HEADER_COMPRESSION:BOOL=OFF
WITH_EXAMPLES:BOOL=ON
WITH_FFMPEG_DECODER:BOOL=OFF
WITH_FFMPEG_DECODER_PLUGIN:BOOL=ON
WITH_FUZZERS:BOOL=OFF
WITH_GDK_PIXBUF:BOOL=ON
WITH_JPEG_DECODER:BOOL=OFF
WITH_JPEG_DECODER_PLUGIN:BOOL=ON
WITH_JPEG_ENCODER:BOOL=OFF
WITH_JPEG_ENCODER_PLUGIN:BOOL=ON
WITH_KVAZAAR:BOOL=OFF
WITH_KVAZAAR_PLUGIN:BOOL=ON
WITH_LIBDE265:BOOL=ON
WITH_LIBDE265_PLUGIN:BOOL=ON
WITH_LIBSHARPYUV:BOOL=ON
WITH_OpenJPEG_DECODER:BOOL=OFF
WITH_OpenJPEG_DECODER_PLUGIN:BOOL=ON
WITH_OpenJPEG_ENCODER:BOOL=OFF
WITH_OpenJPEG_ENCODER_PLUGIN:BOOL=ON
WITH_RAV1E:BOOL=OFF
WITH_RAV1E_PLUGIN:BOOL=ON
WITH_REDUCED_VISIBILITY:BOOL=ON
WITH_SvtEnc:BOOL=OFF
WITH_SvtEnc_PLUGIN:BOOL=ON
WITH_UNCOMPRESSED_CODEC:BOOL=ON
WITH_X265:BOOL=ON
WITH_X265_PLUGIN:BOOL=ON in TWO units + cd libheif-1.17.0
+ /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48
Internal ctest changing into directory: /home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/x86_64-redhat-linux-gnu
Test project /home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/x86_64-redhat-linux-gnu
Start 1: encode
Start 2: region
Start 3: uncompressed_decode
Start 4: uncompressed_encode
1/4 Test #1: encode ...........................***Failed 0.01 sec
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encode is a Catch v2.13.9 host application.
Run with -? for options
-------------------------------------------------------------------------------
ispe odd size
-------------------------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/encode.cc:165
...............................................................................
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/encode.cc:140: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
3 == 0
===============================================================================
test cases: 1 | 1 failed
assertions: 4 | 3 passed | 1 failed
2/4 Test #2: region ...........................***Failed 0.01 sec
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
region is a Catch v2.13.9 host application.
Run with -? for options
-------------------------------------------------------------------------------
create regions
-------------------------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/region.cc:46
...............................................................................
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/region.cc:60: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
3 == 0
-------------------------------------------------------------------------------
create mask region
-------------------------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/region.cc:228
...............................................................................
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/region.cc:245: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
3 == 0
-------------------------------------------------------------------------------
create inline mask region from data
-------------------------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/region.cc:353
...............................................................................
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/region.cc:370: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
3 == 0
-------------------------------------------------------------------------------
create inline mask region from image
-------------------------------------------------------------------------------
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/region.cc:448
...............................................................................
/home/tkloczko/rpmbuild/BUILD/libheif-1.17.0/tests/region.cc:465: FAILED:
REQUIRE( err.code == heif_error_Ok )
with expansion:
3 == 0
===============================================================================
test cases: 5 | 1 passed | 4 failed
assertions: 20 | 16 passed | 4 failed
3/4 Test #3: uncompressed_decode .............. Passed 0.02 sec
4/4 Test #4: uncompressed_encode .............. Passed 0.53 sec
50% tests passed, 2 tests failed out of 4
Total Test time (real) = 0.53 sec
The following tests FAILED:
1 - encode (Failed)
2 - region (Failed)
Errors while running CTest |
As I just experienced the same problem while working on Debian packaging: make sure to set |
So looks like issue is around missing setting that env variable .. |
Any progress? |
FWIW, the tests are passing for me in 1.19.3 now. |
cmake -L
and test suite is failing
The text was updated successfully, but these errors were encountered: