From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Font related crash? Date: Thu, 05 Nov 2015 18:26:59 +0200 Message-ID: <83y4ecs97w.fsf@gnu.org> References: <837flxt8ue.fsf@gnu.org> <563B0B6A.9040207@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446740856 3065 80.91.229.3 (5 Nov 2015 16:27:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Nov 2015 16:27:36 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Yuan MEI Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 05 17:27:20 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZuNNf-0005zI-Ey for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 17:27:19 +0100 Original-Received: from localhost ([::1]:33366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNNe-0003m5-Rj for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 11:27:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNNb-0003m0-FY for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:27:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuNNY-0004Uh-6X for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:27:15 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:47244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNNX-0004UZ-UN for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:27:12 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NXC00M00O6EQE00@mtaout28.012.net.il> for emacs-devel@gnu.org; Thu, 05 Nov 2015 18:26:05 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXC00JG9OBGNW30@mtaout28.012.net.il>; Thu, 05 Nov 2015 18:26:05 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193312 Archived-At: > Date: Thu, 5 Nov 2015 00:45:51 -0800 > From: Yuan MEI > Cc: Eli Zaretskii , emacs-devel > > Program received signal SIGFPE, Arithmetic exception. > 0x0000000000413a88 in required_matrix_width (w=w@entry=0x21db2f8) > at dispnew.c:1727 > 1727 / ch_width) * w->ncols_scale_factor > (gdb) p ch_width > $1 = 0 > (gdb) p w->ncols_scale_factor > $2 = 1 > (gdb) p WINDOW_PIXEL_WIDTH (w) > $3 = 96 > (gdb) Martin, this probably means the code in font_open_entity, which AFAICS is the only place where we set FRAME_SMALLEST_CHAR_WIDTH, was not yet called for this frame, or maybe it was called, but the logic there that assigns a value to the above is flawed. Such a small pixel width probably means the former, in which case I think we need some simple protection in required_matrix_width against FRAME_SMALLEST_CHAR_WIDTH being zero (and a similar protection in required_matrix_height, to be called next). Or maybe when we create a frame we should simply initialize FRAME_SMALLEST_CHAR_WIDTH to 1 (and similarly with FRAME_SMALLEST_FONT_HEIGHT).