Skip to content
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

opendcp_j2k.exe crashes under Windows with: Unable to allocate memory for image #310

Open
berndporr opened this issue Apr 23, 2023 · 1 comment

Comments

@berndporr
Copy link

berndporr commented Apr 23, 2023

See below. The openJPEG encoder crashes under Windows:

OpenDCP J2K 0.30.0 (c) 2010-2014 Terrence Meiczinger. All rights reserved.
  Encoder: OpenJPEG
Unable to allocate memory for image.=                   ] 100% [115/2300]                ] 100% [102/2300] 100% [90/2300]300]
20230423104145 | ERROR | opendcp_encoder_openjpeg.c:121             | opendcp_to_opj                 | Failed to create image
20230423104146 | ERROR | opendcp_encoder_openjpeg.c:225             | opendcp_encode_openjpeg        | unable to encode jpeg2000 file E:\attyshrvj2k/attyshrv1160.j2c
20230423104146 | ERROR | opendcp_j2k.c:86                           | convert_to_j2k                 | JPEG2000 conversion failed attyshrv1160.tif
20230423104146 | ERROR | opendcp_j2k_cmd.c:593                      | main                           | JPEG2000 conversion E:\attyshrvtiff/attyshrv1160.tif failed
Exiting...

and here is another attempt with a different sequence:

PS C:\Program Files (x86)\OpenDCP\bin> .\opendcp_j2k.exe -i I:\DCPfiles -o G:\dcp\j2000film -b 125 -c srgb_complex

OpenDCP J2K 0.30.0 (c) 2010-2014 Terrence Meiczinger. All rights reserved.
  Encoder: OpenJPEG
20230423100826 | ERROR | opendcp_encoder_openjpeg.c:225             | opendcp_encode_openjpeg        | unable to encode jpeg2000 file G:\dcp\j2000film/Sequence 01000003.j2c
20230423100826 | ERROR | opendcp_encoder_openjpeg.c:225             | opendcp_encode_openjpeg        | unable to encode jpeg2000 file G:\dcp\j2000film/Sequence 01049620.j2c
20230423100826 | ERROR | opendcp_j2k.c:86                           | convert_to_j2k                 | JPEG2000 conversion failed Sequence 01049620.tif
20230423100826 | ERROR | opendcp_j2k.c:86                           | convert_to_j2k                 | JPEG2000 conversion failed Sequence 01000003.tif
20230423100826 | ERROR | opendcp_j2k_cmd.c:593                      | main                           | JPEG2000 conversion I:\DCPfiles/Sequence 01000003.tif failed
Exiting...
20230423100826 | ERROR | opendcp_j2k_cmd.c:593                      | main                           | JPEG2000 conversion I:\DCPfiles/Sequence 01049620.tif failed
Exiting...

I have been using openDCP many times without any issues. So I guess a recent windows update might have caused the trouble? Might re-compiling it with a more recent openJPEG lib fix it? I'd be happy to re-compile it if you have instructions how to compile it under Windows (especially how to get the other libs). I'm also trying to get it back to work under Ubuntu Jammy (I'm usually doing it all under linux).

@tmeiczin
Copy link
Owner

The code needs some work to compile as many of the libraries have changed. You could try using the Kakadu executables instead of OpenJPEG. You can download them from Kakadu Software. Once installed, select Kakadu and so long as kdu_compress is in your path, it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants