libvips / pyvips

python binding for libvips using cffi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion failed: sp->cinfo.comm.is_decompressor

euzada opened this issue · comments

Hi,

My code (python) was working correctly. One time my PC rebooted (crashed) for another reasons (wsl) and now when I try to run the script, I always get the following error:

Assertion failed: sp->cinfo.comm.is_decompressor, file /var/tmp/tmp-tiff-x86_64-w64-mingw32.shared.posix.web/tiff-4.6.0/libtiff/tif_jpeg.c, line 1115

I am on windows, I can't access /var/tmp and I don't know how to fix it. I dumped python and restart a new env (conda), but didn't help. I deleted libvips folder and past it again (it is in my PATH), but no sucess. I don't know what happened but no solution so far.

Any idea or suggestion? Google search didn't help.

Thanks,

The problem solved by building libvips without "--with-jpegli". I am not sure if it is related but it works for now.

I will build it again with "--with-jpegli" and see if it will work or not. Maybe the crash did something to my libtiff.

It sounds like libtiff is built against MozJPEG and jpegli is used at runtime, or vice versa.

When building with --with-jpegli (or --with-jpeg-turbo), you'll need to ensure a clean state by deleting the entire build/mxe/usr/<MINGW_TARGET> directory. Replace <MINGW_TARGET> with your specific target, such as x86_64-w64-mingw32.shared.posix.all, which varies depending on your build configuration.

It sounds like libtiff is built against MozJPEG and jpegli is used at runtime, or vice versa.

When building with --with-jpegli (or --with-jpeg-turbo), you'll need to ensure a clean state by deleting the entire build/mxe/usr/<MINGW_TARGET> directory. Replace <MINGW_TARGET> with your specific target, such as x86_64-w64-mingw32.shared.posix.all, which varies depending on your build configuration.

Thank you for your answer. mine is x86_64-w64-mingw32.shared.posix.web

I am going to follow your instructions and build one version with --with-jpegli and another with --with-jpeg-turbo and will test it and share my feedback.