unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: "Rudolf Adamkovič" <salutis@me.com>
Cc: 49688@debbugs.gnu.org
Subject: bug#49688: 28.0.50; Attempting to show images crashes Emacs
Date: Thu, 22 Jul 2021 08:52:32 +0100	[thread overview]
Message-ID: <YPkjwEtuVcyu4sRU@idiocy.org> (raw)
In-Reply-To: <m235s78ff5.fsf@me.com>

On Thu, Jul 22, 2021 at 12:34:22AM +0200, Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
> On macOS 11.2.3 (20D91), my Emacs often crashes when trying to show images.
> For instance, when I launch EMMS (Emacs Multimedia System) with album art,
> it crashes Emacs approximately 7 out of 10 times. The crashes are frequent
> but arbitrary. For instance, perhaps once per 2 weeks, I can launch EMMS
> without Emacs crashing. Further, I recently started using images in Org
> Mode, and they crash Emacs too, albeit rarely. This bug impacts my
> day-to-day life, hence I am asking for help. Thank you!
> 
> Here is a crash report from the most recent crash:

<snip>

> 	0x0000000109e41e4d deliver_fatal_signal + 125 (sysdep.c:1768) 11
> libsystem_platform.dylib      	0x00007fff204c2d7d _sigtramp + 29 12  ???
> 	000000000000000000 0 + 0 13  com.apple.AppleVPAFramework
> 	0x00007fff31bb8847 0x7fff31b8f000 + 170055 14  com.apple.AppleVPAFramework
> 0x00007fff31bb0ac8 0x7fff31b8f000 + 137928 15 com.apple.CoreFoundation
> 	0x00007fff20640cf2 _CFRelease + 244 16  com.apple.CoreFoundation
> 	0x00007fff20517761 __RELEASE_OBJECTS_IN_THE_ARRAY__ + 118 17
> com.apple.CoreFoundation      	0x00007fff205176a4 -[__NSArrayM dealloc] +
> 279 18  com.apple.MediaToolbox 0x00007fff2c0bbe70 0x7fff2c087000 + 216688 19
> com.apple.CoreFoundation      	0x00007fff20640cf2 _CFRelease + 244 20
> com.apple.ImageIO             	0x00007fff28b98c35
> AppleJPEGReadPlugin::copyIOSurfaceCallback(InfoRec*, CGImageProvider*,
> __CFDictionary const*) + 1229 21 com.apple.ImageIO
> 	0x00007fff28b9934e
> AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*,
> CGImageProvider*, CGSize, __CFDictionary const*) + 154 22 com.apple.ImageIO
> 	0x00007fff28b2bb8f AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*,
> CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 2165 23
> com.apple.ImageIO             	0x00007fff28b2adde
> IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize,
> __CFDictionary const*) + 100 24  com.apple.ImageIO 0x00007fff28b489a7
> IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect,
> CGSize, __CFDictionary const*) + 663 25  com.apple.ImageIO
> 0x00007fff28b2ad16 IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*,
> CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 684 26
> com.apple.ImageIO             	0x00007fff28b4f220
> IIOImagePixelDataProvider::getBytesImageProvider(void*, unsigned long) +
> 2020 27  com.apple.ImageIO             	0x00007fff28b4e2ae
> TIFFWritePlugin::writeOne(tiff*, void*, IIOImagePixelDataProvider*,
> IIODictionary*) + 5176 28 com.apple.ImageIO             	0x00007fff28b13455
> TIFFWritePlugin::writeAll() + 237 29  com.apple.ImageIO 0x00007fff28b13331
> IIO_Writer_TIFF::write(void*, void*) + 27 30 com.apple.ImageIO
> 	0x00007fff28bddc5c IIOImageDestination::finalizeDestination() + 830 31
> com.apple.ImageIO             	0x00007fff28b131e4 CGImageDestinationFinalize
> + 104 32  com.apple.AppKit 0x00007fff23034199
> +[NSBitmapImageRep(NSBitmapImageFileTypeExtensions)
> representationOfImageRepsInArray:usingType:properties:] + 2096 33
> com.apple.AppKit              	0x00007fff23032b2b -[NSImage
> TIFFRepresentationUsingCompression:factor:] + 212 34 org.gnu.Emacs
> 	0x0000000109f68126 +[EmacsImage allocInitFromFile:] + 134 (nsimage.m:269)
> 35  org.gnu.Emacs 0x0000000109f67eac ns_load_image + 220 (nsimage.m:148) 36
> org.gnu.Emacs                 	0x0000000109f377d9 lookup_image + 1497

This is spectacularly hard to read given it's been mangled by the
email client, but as far as I can see this crash is deep within
cocoa's image loading code. I don't really have any idea what we can
be doing wrong to cause this.

Are there particular images or image types that cause the crash?

If you rebuild using --without-native-image-api does it work better?
-- 
Alan Third





  reply	other threads:[~2021-07-22  7:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 22:34 bug#49688: 28.0.50; Attempting to show images crashes Emacs Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-22  7:52 ` Alan Third [this message]
2021-07-22 10:33   ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-22 19:50     ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-22 21:01       ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-22 22:11         ` Alan Third
2021-07-23 22:52           ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-23 23:27             ` Alan Third
2021-07-24 16:09               ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-24 16:52                 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-24 17:05                   ` Alan Third
2021-07-24 22:44                     ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-24 23:22                       ` Alan Third
2021-07-25 23:45                         ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-26 20:05                           ` Alan Third
2021-10-20 15:22                             ` Stefan Kangas
2021-10-20 20:13                               ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YPkjwEtuVcyu4sRU@idiocy.org \
    --to=alan@idiocy.org \
    --cc=49688@debbugs.gnu.org \
    --cc=salutis@me.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).