From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: More info on sporadic OS/X crash Date: Thu, 15 Apr 2004 16:15:25 -0700 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082073498 29928 80.91.224.253 (15 Apr 2004 23:58:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Apr 2004 23:58:18 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 16 01:58:11 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BEGkF-0002h8-00 for ; Fri, 16 Apr 2004 01:58:11 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BEGkF-0003qO-00 for ; Fri, 16 Apr 2004 01:58:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BEGit-0002tM-MH for emacs-devel@quimby.gnus.org; Thu, 15 Apr 2004 19:56:47 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BEGin-0002sI-Gv for emacs-devel@gnu.org; Thu, 15 Apr 2004 19:56:41 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BEGiG-0002lz-9V for emacs-devel@gnu.org; Thu, 15 Apr 2004 19:56:39 -0400 Original-Received: from [204.251.10.82] (helo=iris2.directnic.com) by monty-python.gnu.org with smtp (Exim 4.30) id 1BEGiF-0002lp-JW for emacs-devel@gnu.org; Thu, 15 Apr 2004 19:56:07 -0400 Original-Received: by iris2.directnic.com (iris/0.153:492879); 15 Apr 2004 23:56:04 +0000 X-Iris-Host: 1084492519/adsl-64-164-10-231.dsl.snfc21.pacbell.net Original-Received: from adsl-64-164-10-231.dsl.snfc21.pacbell.net (EHLO Majnun.local) (64.164.10.231) by pop.directnic.com (iris/0.153:492879/relay) with ESMTP for ; 15 Apr 2004 23:56:06 +0000 Original-Received: by Majnun.local (Postfix, from userid 501) id C46CE222330; Thu, 15 Apr 2004 16:15:25 -0700 (PDT) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (darwin) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21722 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21722 I've been running Emacs built with -g, waiting for the frequent OS/X Carbon crash to appear. Now I have much more info, though I still don't know what it means: The crash occurs here: 0x9158ccd0 : lwz r4,0(r4) because $r4 is -1. This value comes from: 0x9158ccc4 : lwz r4,24(r3) because r3 points to a structure (at 0xbfffd314; argument?), containing a pointer at byte offset 24 that points to the value -1. Here is the structure: 0xbfffd314: 0xba1bb000 0xffff8940 0xffea0000 0x020d0245 0xbfffd324: 0x00040010 0x20030890 *0x007e63a4* 0xffea0000 0xbfffd334: 0x00000020 0x00000053 0x00053300 0x006e5db8 0xbfffd344: 0x01f10001 0x01fe0244 0x01f10001 0x01fe0244 0xbfffd354: 0x01f10001 0x01fe0244 0x00000000 0xbfffd3c0 0xbfffd364: 0x01010000 0x00f9f46d 0x927d14fc 0x031d98b0 And the pointer: (gdb) x/1 0x7e63a4 0x7e63a4: 0xffffffff ---------------------------------------------------------------------- This is the backtrace leading to the crash. Note that the arguments to DrawText (macterm.c:764) look just fine: Program received signal EXC_BAD_ACCESS, Could not access memory. 0x9158ccd4 in SetupOffscreenGDevice () (gdb) bt #0 0x9158ccd4 in SetupOffscreenGDevice () #1 0x91587990 in PortToNQDPixMap () #2 0x91587990 in PortToNQDPixMap () #3 0x915755d4 in StdText () #4 0x00206608 in mac_draw_string_common (display=0x0, w=0x25c9e20, gc=0x3139970, x=1, y=507, buf=0xbfffd620 "-:** #emacs@saberhagen.OPN 3:33PM 1.04 (ERC Abbrev)--Bot", '-' , "R", nchars=83, mode=1, bytes_per_char=1) at macterm.c:764 #5 0x00206678 in XDrawString (display=0x0, w=0x25c9e20, gc=0x3139970, x=1, y=507, buf=0xbfffd620 "-:** #emacs@saberhagen.OPN 3:33PM 1.04 (ERC Abbrev)--Bot", '-' , "R", nchars=83) at macterm.c:779 #6 0x00208e20 in x_draw_glyph_string_foreground (s=0xbfffd6e0) at macterm.c:2087 #7 0x0020b718 in x_draw_glyph_string (s=0xbfffd6e0) at macterm.c:3070 #8 0x0005585c in draw_glyphs (w=0x25e88c0, x=582, row=0x4e3804c, area=TEXT_AREA, start=0, end=83, hl=DRAW_NORMAL_TEXT, overlaps_p=0) at xdisp.c:17978 #9 0x00058fa0 in x_write_glyphs (start=0x4f80400, len=83) at xdisp.c:18979 #10 0x000110d0 in update_text_area (w=0x25e88c0, vpos=51) at dispnew.c:4288 #11 0x00011a68 in update_window_line (w=0x25e88c0, vpos=51, mouse_face_overwritten_p=0xbfffda54) at dispnew.c:4512 #12 0x00010a88 in update_window (w=0x25e88c0, force_p=0) at dispnew.c:4110 #13 0x000101f8 in update_window_tree (w=0x25e88c0, force_p=0) at dispnew.c:3897 #14 0x0000fffc in update_frame (f=0x31c07a0, force_p=0, inhibit_hairy_id_p=0) at dispnew.c:3829 #15 0x0003e69c in redisplay_internal (preserve_echo_area=0) at xdisp.c:10132 #16 0x0003c0f8 in redisplay () at xdisp.c:9337 ---------------------------------------------------------------------- And lastly, the disassembly for SetupOffscreenGDevice. I can't find documentation on this function anywhere, so I have no idea what the bad pointer means. Dump of assembler code for function SetupOffscreenGDevice: 0x9158cc00 : mflr r0 0x9158cc04 : bcl- 20,4*cr7+so,0x9158cc08 0x9158cc08 : stmw r29,-12(r1) 0x9158cc0c : mflr r31 0x9158cc10 : addis r29,r31,4093 0x9158cc14 : stw r0,8(r1) 0x9158cc18 : addi r10,r29,29020 0x9158cc1c : stwu r1,-80(r1) 0x9158cc20 : lwz r2,0(r10) 0x9158cc24 : addi r11,r3,8 0x9158cc28 : lwz r0,0(r3) 0x9158cc2c : lwz r2,0(r2) 0x9158cc30 : lwz r2,22(r2) 0x9158cc34 : lwz r30,0(r2) 0x9158cc38 : li r2,-32768 0x9158cc3c : stw r0,0(r30) 0x9158cc40 : addi r9,r30,6 0x9158cc44 : lhz r0,6(r3) 0x9158cc48 : or r0,r0,r2 0x9158cc4c : lis r2,72 0x9158cc50 : sth r0,4(r30) 0x9158cc54 : lswi r7,r11,8 0x9158cc58 : stswi r7,r9,8 0x9158cc5c : li r9,0 0x9158cc60 : lhz r0,16(r3) 0x9158cc64 : stw r2,26(r30) 0x9158cc68 : sth r0,14(r30) 0x9158cc6c : li r0,0 0x9158cc70 : sth r0,16(r30) 0x9158cc74 : stw r9,18(r30) 0x9158cc78 : stw r2,22(r30) 0x9158cc7c : lhz r0,18(r3) 0x9158cc80 : sth r0,30(r30) 0x9158cc84 : lbz r0,20(r3) 0x9158cc88 : extsb r0,r0 0x9158cc8c : sth r0,32(r30) 0x9158cc90 : lbz r0,21(r3) 0x9158cc94 : extsb r0,r0 0x9158cc98 : sth r0,34(r30) 0x9158cc9c : lbz r0,22(r3) 0x9158cca0 : stw r9,46(r30) 0x9158cca4 : extsb r0,r0 0x9158cca8 : stw r9,38(r30) 0x9158ccac : sth r0,36(r30) 0x9158ccb0 : lwz r2,0(r10) 0x9158ccb4 : lwz r2,0(r2) 0x9158ccb8 : addi r2,r2,34 0x9158ccbc : lswi r8,r11,8 0x9158ccc0 : stswi r8,r2,8 0x9158ccc4 : lwz r4,24(r3) 0x9158ccc8 : cmpwi cr7,r4,0 0x9158cccc : beq- cr7,0x9158ccf0 0x9158ccd0 : lwz r4,0(r4) 0x9158ccd4 : lha r0,6(r4) ; r4 = -1