Subject: bug#31771: 26.1; Writing image file with emacs hangs entire system

From: Adam <[email-masked]>
Date: Sun, 10 Jun 2018 13:53:30 -0400

On 06/09/2018 10:53 PM, Noam Postavsky wrote:
> So it definitely sounds like a graphics driver problem.  Do you get
> anything in the Xorg logs?  Are there any graphics driver settings you
> can fiddle with?  I suppose it doesn't happen if you run imagemagick's
> 'display' command on the image?

`display` doesn't hang my system, and I see nothing out of the ordinary
in my Xorg logs. I was able to figure out which line causes the hang,
though: A call to MagickMergeImageLayers at image.c:8728 (on the emacs
26.1 tag)

 8724   {
 8725     MagickWand *new_wand;
 8726     MagickSetImageBackgroundColor (image_wand, bg_wand);
 8727 #ifdef HAVE_MAGICKMERGEIMAGELAYERS
 8728     new_wand = MagickMergeImageLayers (image_wand, MergeLayer);
 8729 #else
 8730     new_wand = MagickFlattenImages (image_wand);
 8731 #endif
 8732     DestroyMagickWand (image_wand);
 8733     image_wand = new_wand;
 8734   }

Using the deprecated MagickFlattenImages call also causes the hang. I'll
compile a libmagick6 later and see if I can find the underlying problem,
but this definitely isn't emacs' fault.

Thanks for all the help!