From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Printing to STDERR when %d is "Cannot access memory ..." Date: Wed, 13 Jun 2018 11:37:09 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1528915010 27030 195.159.176.226 (13 Jun 2018 18:36:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2018 18:36:50 +0000 (UTC) To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 13 20:36:45 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTAdQ-0006sY-Ua for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2018 20:36:45 +0200 Original-Received: from localhost ([::1]:36295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTAfY-0003z1-0m for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2018 14:38:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTAeU-0003Gl-Dk for emacs-devel@gnu.org; Wed, 13 Jun 2018 14:37:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTAeQ-0007h1-FG for emacs-devel@gnu.org; Wed, 13 Jun 2018 14:37:50 -0400 Original-Received: from gateway33.websitewelcome.com ([192.185.146.85]:17268) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fTAeP-0006vl-NF for emacs-devel@gnu.org; Wed, 13 Jun 2018 14:37:46 -0400 Original-Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway33.websitewelcome.com (Postfix) with ESMTP id EAB741981DD8 for ; Wed, 13 Jun 2018 13:37:32 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id TAdqfXxdsbXuJTAe3fls5s; Wed, 13 Jun 2018 13:37:32 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=OHG/4d1d/t3aplvnURc8q+sU2bA6WWQsIn2i0TOp8W4=; b=VmQEB7q+9gCwR0RcBa2AGvz8zp AvcHxZMH0D9Spz7nbh1WXKNSFkiUGvByd2nkIagFSSUOGf+wdBZrzEPsQJL1l7KeWEXN4Z72d8R1w el4MeyTJuWZhYrqX3TVcI3UFpVzK9HO5+m2z4eswivWeLrDrcT+3rXmPs1fDdtONXiYaSL7IHf5S5 ZmuFKZy4IdK0yu1rX9pQVFmpVFyQr+jLQhQIjs6+Px00QLvwO+ax/3Bc37DMLe8Y4964OMzAb4CdA ODz0FV/WE4dBzIt6gPX5+y+XuSE9wjV+JtDPL2Tk4nGQc4rEM0u2/cfzkJ4IPKpiBUwsBoijolfR1 rsxh3H5A==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:51433 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1fTAdq-0005ID-Dm for emacs-devel@gnu.org; Wed, 13 Jun 2018 13:37:10 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1fTAdq-0005ID-Dm X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:51433 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.146.85 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226301 Archived-At: I am working on crosshairs (17684) and multiple fake cursors (22873) and created a little problem for myself in that a character not recognized by the font (U0001D4D5) [aka a pretty letter f] on a line all by itself does not have a font->space_width and causes Emacs to crash when printing said value to STDERR. GDB returns "Cannot access memory at address 0xa0" when printing the value of font->space_width. This came about by using the following setting for a Form Feed character: (setq buffer-display-table (make-display-table)) (aset buffer-display-table ?\014 (vector (make-glyph-code ?\U0001D4D5 'font-lock-warning-face))) I am by passing the problem by not using ?\U0001D4D5. However, I would like to come up with programmatic solution to avoid crashing Emacs when printing values to STDERR. I tried: fprintf (stderr, "(%d)", (font->space_width == NULL ? 0 : font->space_width); However, that didn't fix the problem. Thanks, Keith