GNU bug report logs -
#55654
28.1.50; HEAP Error with ImageMagick on Windows MSYS2
Previous Next
Reported by: Fabio Leimgruber <fabio.leimgruber <at> web.de>
Date: Thu, 26 May 2022 10:07:02 UTC
Severity: normal
Tags: moreinfo
Found in version 28.1.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 55654 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> I think this happens because ImageMagick tries to free memory that
> Emacs allocated. Emacs on MS-Windows uses its own implementation of
> malloc and free, so a scenario where Emacs allocates and some library
> frees, or vice versa, will never work.
>
> Does ImageMagick has a facility whereby an application can tell it
> what functions to use for allocation and deallocation of memory? If
> so, we can use those facilities to force ImageMagick to use our
> allocation functions.
>
> If the above doesn't help, I think the way to debug this is to install
> ImageMagick sources and debug info, or build it with debug information
> on your machine, and see what memory is being free'd here, and where
> was it allocated.
Thanks for your analysis and the suggestions.
I just recompiled after upgrading MSYS2 ImageMagick to 7.1.0.35 and the error is gone.
Your comment about malloc and free on MS-Windows got me thinking on how ImageMagick has been working on this machine with Emacs 27.2.50 in the first place. I was then searching for supported ImageMagick versions, but it seems that starting with Emacs 27 ImageMagick is disabled by default. Maybe a note on ImageMagick compat for Emacs 28 on MS-Windows MSYS2 could be added to the docs, as long as the option --with-imagemagick is still available?
In any case, please consider this solved from my side.
This bug report was last modified 3 years and 33 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.