NConvert: JPEG XL convert fails with Exit code -1073740791

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

mdnava
Posts: 11
Joined: Fri Mar 06, 2020 8:08 pm

NConvert: JPEG XL convert fails with Exit code -1073740791

Post by mdnava »

Hello!

NConvert is failing with exit code: -1073740791 whenever I try to convert/replace an image to JPEG XL

This is the command used (important: commands are generated by an automated tool, and all input files are JPEGs):

Code: Select all

$ nconvert.exe -rtype lanczos -out jpegxl -q 85 -D -overwrite "D:\path\to\folder\*.*"
The very same command works perfectly for jpeg and webp:

Code: Select all

$ nconvert.exe -rtype lanczos -out jpeg -q 85 -D -overwrite "D:\path\to\folder\*.*"
$ nconvert.exe -rtype lanczos -out webp -q 85 -D -overwrite "D:\path\to\folder\*.*"
However, if I save to a subfolder, then it works

Code: Select all

$ nconvert.exe -rtype lanczos -out jpegxl -q 85 -o "_workspace_\%.jxl" "D:\path\to\folder\*.*"
======================

In the making of this post I noticed a difference between the two commands, the one in the same folder and
the command to convert to a different folder, only the latter having the -o "%.jxl" params. So I did a test and
with the next command I was able to successfully convert the directory I was having the issue with:

Code: Select all

$ nconvert.exe -rtype lanczos -out jpegxl -q 85 -D -overwrite "D:\path\to\folder\*.*"
So, I cheered and I was about to erase all this text, but I did another test with the same command, on a different folder,
and again it failed with exit code -1073740791. The difference I can see is that the new folder has bigger JPEG photographs,
each about ~4MB and over 9000px wide.

But then I tried downsizing the same folder images using JPEG XL (to 6000px on its longest side) and it worked (twice):

Code: Select all

$ nconvert.exe -rtype lanczos -resize longest 6000 -rflag decr -out jpegxl -q 85 -o "_workspace_\%.jxl" "D:\path\to\folder\*.*"
So it seems NConvert cannot write JPEG XL with dimensions of around 8000px/9000px !?
And also, it seems like the {{ -o %.jxl }} flag is mandatory for JPEG XL even when overwriting/replacing, but not for other formats.

I'd appreciate any comments..

Best regards!
User avatar
xnview
Author of XnView
Posts: 44473
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: NConvert: JPEG XL convert fails with Exit code -1073740791

Post by xnview »

mdnava wrote: Fri Aug 09, 2024 5:03 am So, I cheered and I was about to erase all this text, but I did another test with the same command, on a different folder,
and again it failed with exit code -1073740791. The difference I can see is that the new folder has bigger JPEG photographs,
each about ~4MB and over 9000px wide.

But then I tried downsizing the same folder images using JPEG XL (to 6000px on its longest side) and it worked (twice):
Are you able to reproduce the problem on one file?
Pierre.
mdnava
Posts: 11
Joined: Fri Mar 06, 2020 8:08 pm

Re: NConvert: JPEG XL convert fails with Exit code -1073740791

Post by mdnava »

Hello Pierre, thank you for answering..
xnview wrote: Mon Aug 12, 2024 6:26 am Are you able to reproduce the problem on one file?
No, I tried exactly 5 times, with 5 different files (each over 8000px wide) and they all converted successfully to JPEG XL.

But then I tried converting five different series of images (each series also over 8000px wide):
» Two times the conversion was successful, but processor usage was abnormally high.. rare for NConvert.
» Three times it failed as it did before, NConvert started writting the first image and exited with code -1073740791

I'm gonna try to do some more testing before Friday to give more details.. I'm leaving town for a couple days.

Best regards..
mdnava
Posts: 11
Joined: Fri Mar 06, 2020 8:08 pm

Re: NConvert: JPEG XL convert fails with Exit code -1073740791

Post by mdnava »

Hello Pierre,

I have been trying unsuccessfully to replicate the reported issue over the past week.

It's very strange, it didn't happen just once, it was a constant issue when trying to convert very big images to JXL.

All I can think of at this time is that it could've been caused by something external, like Window Defender, or possibly
memory leak was happening. One thing that did change is that I restarted the system when I came back last week.

I'm sorry if it was a false flag in the end.

However, one thing that appears to happen 100% of the tests whenever I try to convert a list of big images (over 10000px)
to JPEG XL is that the system becomes unresponsive. Even though NConvert is doing the conversion, I don't think it
would be viable to use it for this purpose.

Best regards!