Bug 420543 - Batch conversion from png to jp2 fails to process random images
Summary: Batch conversion from png to jp2 fails to process random images
Status: RESOLVED UPSTREAM
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Bqm-Convert (show other bugs)
Version: 6.4.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-25 08:16 UTC by scpketer
Modified: 2022-01-15 16:28 UTC (History)
2 users (show)

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


Attachments
Debug trace (2.20 MB, text/plain)
2020-04-25 10:35 UTC, scpketer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description scpketer 2020-04-25 08:16:18 UTC
I have around 1.3k images in png which I want to store in JP2 instead.

In batch image conversion process random images are not getting processed (and I don't even know why - there are no error messages in the batch log.

STEPS TO REPRODUCE
1. Run batch image processing to convert around 100-200 images from PNG to JP2.
2. Monitor batch processing log for "Failed to process item" messages.

OBSERVED RESULT
Some images were not processed and not converted into JP2.

EXPECTED RESULT
All images in a queue should be converted into JP2?

SOFTWARE/OS VERSIONS
Linux: 5.6.6-arch1-1
KDE Plasma Version: KDE Plasma 5.18.4.1-1
KDE Frameworks Version: 5.69.0-2
Qt Version: 5.14.2-1

ADDITIONAL INFORMATION
After processing, if I manually convert PNG to JP2 as a single item in batch processing, it is getting processed with no errors, which makes me think this is not an issue with corrupted images.
Comment 1 caulier.gilles 2020-04-25 09:15:44 UTC
start digiKam from a console following note from this page :

https://www.digikam.org/contribute/

... and report the debug trace here.

Gilles Caulier
Comment 2 scpketer 2020-04-25 10:35:27 UTC
Created attachment 127855 [details]
Debug trace
Comment 3 Maik Qualmann 2020-04-25 19:42:12 UTC
I don't see an error in the log? Could you please give the image name that failed?

Maik
Comment 4 Maik Qualmann 2020-05-16 05:00:38 UTC
The libjasper in your distribution is patched. The problem with the outdated libjasper is well known.

--------------------
Invalid use of jas_stream_memopen detected.
WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!
WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!
WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!
YOUR CODE IS RELYING ON DEPRECATED FUNCTIONALTIY IN THE JASPER LIBRARY.
THIS FUNCTIONALITY WILL BE REMOVED IN THE NEAR FUTURE.
PLEASE FIX THIS PROBLEM BEFORE YOUR CODE STOPS WORKING!
The specific problem is as follows:
A user-provided buffer for jas_stream_memopen cannot be growable.
--------------------

From time to time the jas_image_encode() then fails to recognize the output format passed.

I suspect the patch of your distribution is the problem. Can you reproduce the problem with the AppImage from www.digikam.org?

Maik
Comment 5 caulier.gilles 2020-05-16 05:48:27 UTC
Maik,

Jasper library will be banned by all Linux distributions because it's not maintained and full of security holes. We must port JPEG2000 plugin to OpenJPEG library.

Gilles
Comment 6 caulier.gilles 2020-08-01 07:54:53 UTC
Maik,

The libjasper development is back and fix all main bugs in library using static analysers and ASan+Unit-tests. A new version is out just in time with the 7.0.0 release.

Gilles
Comment 7 caulier.gilles 2020-08-01 07:55:01 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Thanks in advance

Gilles Caulier
Comment 8 caulier.gilles 2022-01-08 16:28:33 UTC
Hi,

Please give us a fresh feedback about this entry using current digiKam 7.5.0 pre release AppImage bundle avaialable here :

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

Thanks in advance

Gilles Caulier
Comment 9 caulier.gilles 2022-01-15 16:28:40 UTC
Regarding commen #4 from Maik, it soud like an UPSTREAM problem.