From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57267: 28.1; emacs crashes when loading too many images Date: Fri, 19 Aug 2022 08:55:16 +0300 Message-ID: <837d34g4l7.fsf@gnu.org> References: <83v8qqawsh.fsf@gnu.org> <83a681fk6i.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24977"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57267@debbugs.gnu.org To: james@jojojames.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 19 07:56:25 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOuzY-0006KW-PR for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Aug 2022 07:56:24 +0200 Original-Received: from localhost ([::1]:53152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOuzW-0006Gq-Pc for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Aug 2022 01:56:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOuzC-0006Gi-Nw for bug-gnu-emacs@gnu.org; Fri, 19 Aug 2022 01:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOuzC-0006OI-FU for bug-gnu-emacs@gnu.org; Fri, 19 Aug 2022 01:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOuzC-0007J2-BL for bug-gnu-emacs@gnu.org; Fri, 19 Aug 2022 01:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Aug 2022 05:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57267 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57267-submit@debbugs.gnu.org id=B57267.166088853428050 (code B ref 57267); Fri, 19 Aug 2022 05:56:02 +0000 Original-Received: (at 57267) by debbugs.gnu.org; 19 Aug 2022 05:55:34 +0000 Original-Received: from localhost ([127.0.0.1]:57248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOuyj-0007IM-Kd for submit@debbugs.gnu.org; Fri, 19 Aug 2022 01:55:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOuyg-0007I7-VB for 57267@debbugs.gnu.org; Fri, 19 Aug 2022 01:55:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOuyb-00069R-Eu; Fri, 19 Aug 2022 01:55:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=AYRVTIuqI3RgtOgKuP6VMR4IyK4e+TC/nh8u5ixWtz8=; b=KFG4ntwWC0Yd /VuenHqTIrV1BZWdl/P2hOFX55+3VwKSXufn2B1rDAL4okkhNfwYxM7J+WUf1UWaQIMLSclMEwlus skw6eGyNkwpEbz/shlLZPzeoIIu5BIsp2CHWy7DXBQMFpGEgLT4/6DfkdlUmRhJhRJSbwO8J8RiKT 4fZBcMn7mMaD99athDaFj3Xa9u7qKy0TcyYmH9GXCScQnvqOVPqKVXq4ohUwZnA8lg1fIvGXCq4ZI pp7Nqac+4IQTQbUPGDDTGlpbaofS5rJb54e0CR7EsU/GuEmXpBIAMMZbkAqdKkQlHyXJFjlMYKscR qC+4PNRF564KnsGas1JhcQ==; Original-Received: from [87.69.77.57] (port=4889 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOuyZ-0006IW-UK; Fri, 19 Aug 2022 01:55:24 -0400 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240190 Archived-At: > From: james@jojojames.com > Date: Thu, 18 Aug 2022 16:14:26 -0400 > Cc: 57267@debbugs.gnu.org > > Process 35748 stopped > * thread #44, stop reason = EXC_BAD_ACCESS (code=2, address=0x718b828a0) > frame #0: 0x0000000718b828a0 > -> 0x718b828a0: addb %al, (%rax) > 0x718b828a2: addb %al, (%rax) > 0x718b828a4: addb %al, (%rax) > 0x718b828a6: addb %al, (%rax) > Target 0: (Emacs) stopped. > (lldb) Thread 44 doesn't look like our thread. If it stopped due to EXC_BAD_ACCESS, then I don't know what to say about this. Thread 1, which is the main Lisp thread, seems to be inside the Apple library that handles JPEG images: > (lldb) thread select 1 > * thread #1, queue = 'com.apple.main-thread' > frame #0: 0x00007fff204709de libsystem_kernel.dylib`__ulock_wait + 10 > libsystem_kernel.dylib`__ulock_wait: > -> 0x7fff204709de <+10>: jae 0x7fff204709e8 ; <+20> > 0x7fff204709e0 <+12>: movq %rax, %rdi > 0x7fff204709e3 <+15>: jmp 0x7fff2046fac9 ; cerror_nocancel > 0x7fff204709e8 <+20>: retq > (lldb) bt > * thread #1, queue = 'com.apple.main-thread' > * frame #0: 0x00007fff204709de libsystem_kernel.dylib`__ulock_wait + 10 > frame #1: 0x00007fff204a5f60 libsystem_pthread.dylib`_pthread_join + 362 > frame #2: 0x00007fff31a4287c AppleVPA`___lldb_unnamed_symbol456$$AppleVPA + 132 > frame #3: 0x00007fff31a3abde AppleVPA`___lldb_unnamed_symbol279$$AppleVPA + 72 > frame #4: 0x00007fff2066775a CoreFoundation`_CFRelease + 244 > frame #5: 0x00007fff2053e583 CoreFoundation`__RELEASE_OBJECTS_IN_THE_ARRAY__ + 118 > frame #6: 0x00007fff2053e4c6 CoreFoundation`-[__NSArrayM dealloc] + 279 > frame #7: 0x00007fff2c082f12 MediaToolbox`___lldb_unnamed_symbol186$$MediaToolbox + 270 > frame #8: 0x00007fff2066775a CoreFoundation`_CFRelease + 244 > frame #9: 0x00007fff28b7ce57 ImageIO`AppleJPEGReadPlugin::copyIOSurfaceCallback(InfoRec*, CGImageProvider*, __CFDictionary const*) + 1229 > frame #10: 0x00007fff28b7d570 ImageIO`AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, __CFDictionary const*) + 154 > frame #11: 0x00007fff28b0f679 ImageIO`AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1955 > frame #12: 0x00007fff28b0e998 ImageIO`IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 100 > frame #13: 0x00007fff28b2c527 ImageIO`IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 663 > frame #14: 0x00007fff28b0e8d0 ImageIO`IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 680 > frame #15: 0x00007fff250e82d0 CoreGraphics`imageProvider_retain_data + 77 > frame #16: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75 > frame #17: 0x00007fff250e826b CoreGraphics`provider_for_destination_retain_data + 17 > frame #18: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75 > frame #19: 0x00007fff250e80f6 CoreGraphics`CGAccessSessionCreate + 98 > frame #20: 0x00007fff250e9e57 CoreGraphics`get_access_session + 44 > frame #21: 0x00007fff250e954c CoreGraphics`img_raw_read + 1302 > frame #22: 0x00007fff251440f9 CoreGraphics`img_interpolate_read + 753 > frame #23: 0x00007fff250e75bc CoreGraphics`img_data_lock + 6164 > frame #24: 0x00007fff250e22f0 CoreGraphics`CGSImageDataLock + 1230 > frame #25: 0x00007fff250e1de9 CoreGraphics`RIPImageDataInitializeShared + 164 > frame #26: 0x00007fff250e1aaa CoreGraphics`RIPImageCacheGetRetained + 750 > frame #27: 0x00007fff250e1574 CoreGraphics`ripc_AcquireRIPImageData + 384 > frame #28: 0x00007fff250e02a1 CoreGraphics`ripc_DrawImage + 1180 > frame #29: 0x00007fff250df4f7 CoreGraphics`CGContextDrawImageWithOptions + 454 > frame #30: 0x00007fff22f119c5 AppKit`__74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 902 > frame #31: 0x00007fff22f114fa AppKit`-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 936 > frame #32: 0x00007fff233b1dbc AppKit`__71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1340 + 967 > frame #33: 0x00007fff22eea8b9 AppKit`-[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129 > frame #34: 0x00007fff22f10ec1 AppKit`-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1359 > frame #35: 0x000000010049358c Emacs`ns_dumpglyphs_image(s=0x00007ffeefbfa220, r=(origin = (x = 10, y = 222), size = (width = 700, height = 507))) at nsterm.m:3952:7 > frame #36: 0x000000010048f75e Emacs`ns_draw_glyph_string(s=0x00007ffeefbfa220) at nsterm.m:4349:7 > frame #37: 0x0000000100092b81 Emacs`draw_glyphs(w=0x0000000106152630, x=672, row=0x000000010424f700, area=TEXT_AREA, start=0, end=20, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:30449:5 So again, I don't see what that has to do with Emacs. OTOH, redisplay works on macOS very differently from other platforms, so maybe we are somehow causing this?