From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Font related crash? Date: Thu, 05 Nov 2015 19:16:57 +0100 Message-ID: <563B9D19.6000305@gmx.at> References: <837flxt8ue.fsf@gnu.org> <563B0B6A.9040207@gmx.at> <83y4ecs97w.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1446749492 20245 80.91.229.3 (5 Nov 2015 18:51:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Nov 2015 18:51:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii , Yuan MEI Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 05 19:51:25 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 1ZuPd6-0001r2-6k for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 19:51:24 +0100 Original-Received: from localhost ([::1]:34461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuPd5-0001Ho-Ah for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 13:51:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuP65-0007jY-Tp for emacs-devel@gnu.org; Thu, 05 Nov 2015 13:17:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuP65-0005NN-0s for emacs-devel@gnu.org; Thu, 05 Nov 2015 13:17:17 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:57556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuP61-0005Lt-5A; Thu, 05 Nov 2015 13:17:13 -0500 Original-Received: from [192.168.1.100] ([213.162.68.56]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0M5Lmp-1aemM93NuB-00zXSS; Thu, 05 Nov 2015 19:17:06 +0100 In-Reply-To: <83y4ecs97w.fsf@gnu.org> X-Provags-ID: V03:K0:uDgvEI7WkzB1hYaZpGuP7e6FThK6dSmaciXkLk56Ss6wGcelx/y uwOBbIWBqvnkJbZCxJ2+2vOFd9zcrkHwe3QwJqUUtaUw5Dk/YxtmnpSv8gS1D1J14jWWxI9 2W7Wcg6eIlff/uDG7ElNiXuv2puO+lzP99sQtsGbV8EaEI2/WG1sIKJDLpfynM/0wp8uqlE IpcrJd0vMDcmb2tIJjtew== X-UI-Out-Filterresults: notjunk:1;V01:K0:DIoAbleqqn4=:x2686Khmeq2he229DcDTQt RJocH24HSTPC9BMucc2bBUwLxLN5plY6bddX54kA12VYSzw8ZBMtwCjuQpUN4S/0IguLIgvuS DIiPPHY98gtlpv/GuxQBx57/hy2DxAd1R5GHjOyIjNHS14dCWH3Br9ToxjQCAtV6ZPU3ML3Ce 5zAt2tipF4O+yKhBpetnjwh49hV25c0L3sZ6cP8FQ6+da76cbjcLwyrnSYzoYXrRHDmFlndEK NR+VMczo7aLXoc8BDSF02un3MRyDeS1IINw8isR4GJOIbuVIGE4Id/XDRXbLZC0XctE4Y1lUR a5MB9ZJ2SEZsTdGq1DzTbtIJrMA8EZOWk0WK7aPV7jfnKuMAeoUBsKK8mhLedfjFMuPKs5xeL U1v1kliWSvtpnnaQoPGO3lyfPLJJF4KwirQ08SsO6RnL+uA4WwsZ08yPrRcX0ffhw3iADsDLr i9QLA5CBccyGG+tkhbl8qsxPyw8wIYVaQty7Ka+FzC5iYGxo2CrCKBlwqRX+cYUSRW50skdsN xIU/M96U0QahRQQ+jff4CtapXBllpDHWW1quw75KJ7vvRmzx7UMHWm7zGz+7OauEHP60/rrfs NoTz3WTkZ9v1iHpzqkRQ6qLmf+rG6GsMVjlY1BL3JFgjW1XwzVujGWuEdxUAYXizsO/HGn2bl Zw6eKO8HNxHNeUXkSHEuhYH2KsaGET+L2WZwhvwnfn+aN4eQ4Us/pgvXmu3ZpX3CwIkJkxwYj hgTpywoqmyQqMMBphTk1Rjk2yPSc2Jv8oXDSLFuKbeYrm7lfzhVobvn1PEMxsRFW2+9aZq+c X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.15 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:193324 Archived-At: > 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. If I'm not too silly the following cannot assign zero to min_width: min_width = (font->min_width ? font->min_width : font->average_width ? font->average_width : font->space_width ? font->space_width : 1); I suppose that font_open_entity returns too early. Does it pay to pursue that? > 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). We should do that in any case. > Or maybe when we create a frame we should simply initialize > FRAME_SMALLEST_CHAR_WIDTH to 1 (and similarly with > FRAME_SMALLEST_FONT_HEIGHT). Or have these macros never provide zero. My only concern is that this might hide some underlying problem. Any ideas about the OP's: > Also, sometimes when I switch to another virtual > desktop then come back to emacs, the entire frame shows only the background > color, no letter is visible. martin