libvips / build-win64-mxe

76 stars 15 forks source link

Regression has happened to x86 version of VIPS binaries after 8.7.4 #9

Closed Megadino closed 4 years ago

Megadino commented 4 years ago

It seems something has happened with x86 binaries when version was raised from 8.7.4 to 8.8.0

VIPS that is bundled in all vips-dev-w32-all-8.8.X.zip packages can not initialize at all, and hangs forever on call:

return Vips.Init("NetVips") == 0;

with high CPU utilization. Looks like it is stuck in infinite cycle. Tested and it appears on both Windows 10(64) and Windows 7(64).

Version vips-dev-w32-all-8.7.4.zip works fine. Version vips-dev-w64-all-8.8.3.zip works fine.

kleisauke commented 4 years ago

I suspect this could be a DLL load issue, as I couldn't reproduce this with NetVips 1.1.0 and:

(the releases are always tested on the NetVips test suite before they are published).

Perhaps it picks up the old (v8.7.4) dependencies?

Tips to solve DLL load issues:

Megadino commented 4 years ago

Figured out it's because of Visual Studio. When a project is being ran from Visual Studio, and Visual Studio is attached as a debugger - then the library hangs on return Vips.Init("NetVips") == 0;

This is reproducible on Windows 7 and 10, using Visual Studio 2017 and Visual Studio 2019. If to run a project as a regular .EXE process without attached Visual Studio it works fine.

kleisauke commented 4 years ago

Sorry, this fell off my radar. It looks like this was caused by GLib: https://gitlab.gnome.org/GNOME/glib/-/issues/2025

I've updated GLib to 2.64.1 with https://github.com/libvips/build-win64-mxe/commit/65e1a6d44a3afa551f4835bdab1c67f2c12e5785, you can test these binaries here: https://github.com/libvips/build-win64-mxe/releases/tag/v8.9.1-static

Thanks for reporting this! This update will be included in the forthcoming NetVips.Native release.

kleisauke commented 4 years ago

NetVips.Native v8.9.2 is now available.

I'll close this issue for now, please feel free to re-open if there's still a problem.