From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Question about display engine Date: Sun, 13 Oct 2019 21:38:36 +0200 Message-ID: <20191013193836.jl3odnemyh6l7hzb@Ergus> References: <20191012222305.jpjinkd5y2lz6xiv@Ergus> <83mue5kmfx.fsf@gnu.org> <20191013154052.yzluijtwvf2ppvks@Ergus> <83a7a4ljet.fsf@gnu.org> <20191013164424.4vyxdnm6ievyvjyf@Ergus> <837e58lgql.fsf@gnu.org> <20191013182542.34euwh2gihawyots@Ergus> <831rvglbom.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="20851"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 13 21:39:10 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJjhu-0005HQ-2j for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 21:39:10 +0200 Original-Received: from localhost ([::1]:41880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJjhs-0007Ps-Vl for ged-emacs-devel@m.gmane.org; Sun, 13 Oct 2019 15:39:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35233) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJjhk-0007Pj-Dd for emacs-devel@gnu.org; Sun, 13 Oct 2019 15:39:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJjhi-0006j9-0N for emacs-devel@gnu.org; Sun, 13 Oct 2019 15:38:59 -0400 Original-Received: from sonic303-21.consmr.mail.ir2.yahoo.com ([77.238.178.202]:44633) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJjhg-0006ej-NO for emacs-devel@gnu.org; Sun, 13 Oct 2019 15:38:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1570995534; bh=Yt0Vz4zmNyVldwbIRXIzS7Nd0CQit+rMdZ0E+cQq9E0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=Y4cFnWX+cLKm4IbW/6rO8mo+1em02DRsR0KTasew8/W76ZbaZx8RlgAy0PGvOxpfJOYI75Kjavg/+s9q7HFQ3hqpztJzsqhQI8way3HvVmQC8XgtTlo81pURp6WQEgOztjYmwrxm5dvNWViZjCTMsMmiO6c/6zu+3DfhM4lWCpExJCKR5r7gTeEj1r4fomaPnSsQUlqW1NGq/dfZhLb7jXUzZ0Bi3sB5MWjqTsgNTDsUzocDx98Ijn9Bpr+msSi5duxF9LVk/qZBjrY9xaGHdEIE3IWwAzF1B86xR7QVbPQnL130Nqxd/RvWkW0rTcmkz++UNKckJdZy4cWNaOPg4A== X-YMail-OSG: EPZe7acVM1l3Bye2qZf14Kac16GhwWTJnujcQIRKlkQh7t7VdiYx0GqEwm2mb55 GQVsRDmz7XdNu.AC8bTpUJ.64s26n9mqzJVYcygSUTCC832NxDJ6kd8bJ_BsWoGTFwKeWzfPwMIP Jk_oYVkLqhm8hxtR43EpuRU3Lnrx8tcgj_rZOLWCF1xJ40A0ki2ieHWC2rCyBvpi7EcVOKVjCfya 42BTM4SkdJAw0hKTATYjkd.5WJ5P1kErhRcGWEoaxNk7rwebHcx.sHBF2j3muTI.uUhMD90g.YKf MRbsBEnXOgco0oE9dzhAL05mfpSlxuNM7GGiD3GR6kPEcKRrIyFCuDbhy4HPgTPplaNKI.AmgLh7 AQBtz.8BLgJQuMERJ85Z._24yV5ENvlUjnmccaVo8.v9uIbXqQS.Nkxd3xyGiP8SZWQuBd9UB1H. 8ww6Tv4x5XV9.csY1ZpOSipukOVkJh9OWXbdfJdHcjm.V5DrTs5eesYWyAg8a6iD6iU33T0I6l1D Z3GzzQyA8h0u.KpkiJRqWY4IHoFwJ9zSsiNYThloONJtjr0RUjvotcYit20WpqPTVXsMzjOqSIX. Pc2.bv7nv9w9_OC6ARXOJ50ebPMcdJTmNUSWbevUyurzfPLPx8PfcW00c6BppIWt2vVyLLOQHHGa kbdWAKgiOgaNsTem7MUrbsPbdHgKjpsZntTkmpKWI.Ua_tsnXRt5kOInTgsTewIPbHZRjfCh5Gge a9N3UcURyJBFUjk03rAgcrw1.JibEmRCBmrvdRutj9UzLD94d.EV1wsaalaJjyW92ox5Gag_t6xR vQyn8gcvb288NlHaOtIsHLxW7uW9fJZnONA5jjEw2b Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ir2.yahoo.com with HTTP; Sun, 13 Oct 2019 19:38:54 +0000 Original-Received: by smtp403.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 8667b967222fd48e1bf5cd7214889def; Sun, 13 Oct 2019 19:38:49 +0000 (UTC) Content-Disposition: inline In-Reply-To: <831rvglbom.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 77.238.178.202 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:240978 Archived-At: On Sun, Oct 13, 2019 at 09:53:13PM +0300, Eli Zaretskii wrote: >> Date: Sun, 13 Oct 2019 20:25:42 +0200 >> From: Ergus >> Cc: rudalics@gmx.at, emacs-devel@gnu.org >> >> >Then looking at the position that causes the error will probably tell >> >you what's wrong. (Is OBJECT passed to Fget_text_property a string? >> >if not, position of zero is invalid.) >> > >> >> Actually conditioning the call to face_at_pos to when IT_CHARPOS (*it) >> != 0 seems to fix the issue with magit... but maybe we are just hiding >> something under the carpet here. Can you imagine something more general >> than that just this condition? > >How did it happen that IT_CHARPOS(*it) is zero? If we are iterating >over a buffer, that cannot happen, because we begin from 1 and go >forward. > >Is it->sp zero or higher? If it's higher, then we are not iterating >over a buffer, but something else (a string, an image, or something >similar). What are the values of it->method and it->what? Can you >show the result of > > (gdb) pgrowx it->glyph_row > (gdb) p it->sp $1 = 0 (gdb) p it->method $2 = GET_FROM_C_STRING (gdb) p it->what $3 = IT_CHARACTER (gdb) pgrowx it->glyph_row TEXT: 85 glyphs 0 0: CHAR[-] str=0x4fab1a8f[0] blev=0,btyp=L w=1 a+d=0+0 face=1 1 1: CHAR[U] str=0x4fab18f0[1] blev=0,btyp=L w=1 a+d=0+0 face=1 2 2: CHAR[U] str=0x4fab18f0[1] blev=0,btyp=L w=1 a+d=0+0 face=1 3 3: CHAR[U] str=0x4fab18f0[1] blev=0,btyp=L w=1 a+d=0+0 face=1 4 4: CHAR[:] str=0xf2787f0[0] blev=0,btyp=L w=1 a+d=0+0 face=1 5 5: CHAR[%] str=0x4faaee54[1] blev=0,btyp=L w=1 a+d=0+0 face=1 6 6: CHAR[%] str=0x4faaede4[1] blev=0,btyp=L w=1 a+d=0+0 face=1 7 7: CHAR[-] str=0x4fab1721[1] blev=0,btyp=L w=1 a+d=0+0 face=1 8 8: CHAR[-] str=0x4fa9d9a8[0] blev=0,btyp=L w=1 a+d=0+0 face=1 9 9: CHAR[F] str=0x4fa9d9a8[2] blev=0,btyp=L w=1 a+d=0+0 face=1 10 10: CHAR[1] str=0x4fa9d9a8[2] blev=0,btyp=L w=1 a+d=0+0 face=1 11 11: CHAR[ ] str=0x4fa9d9a8[3] blev=0,btyp=L w=1 a+d=0+0 face=1 12 12: CHAR[ ] str=0x4fa9d9a8[4] blev=0,btyp=L w=1 a+d=0+0 face=1 13 13: CHAR[m] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 14 14: CHAR[a] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 15 15: CHAR[g] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 16 16: CHAR[i] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 17 17: CHAR[t] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 18 18: CHAR[-] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 19 19: CHAR[l] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 20 20: CHAR[o] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 21 21: CHAR[g] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 22 22: CHAR[:] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 23 23: CHAR[ ] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 24 24: CHAR[e] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 25 25: CHAR[m] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 26 26: CHAR[a] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 27 27: CHAR[c] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 28 28: CHAR[s] str=0x4fab16fc[1] blev=0,btyp=L w=1 a+d=0+0 face=20 MB 29 29: CHAR[ ] str=0x4fab16f8[0] blev=0,btyp=L w=1 a+d=0+0 face=1 30 30: CHAR[ ] str=0x4fab16f8[1] blev=0,btyp=L w=1 a+d=0+0 face=1 31 31: CHAR[ ] str=0x4fab16f8[2] blev=0,btyp=L w=1 a+d=0+0 face=1 32 32: CHAR[T] str=0xf278800[1] blev=0,btyp=L w=1 a+d=0+0 face=1 33 33: CHAR[o] str=0xf278800[1] blev=0,btyp=L w=1 a+d=0+0 face=1 34 34: CHAR[p] str=0xf278800[1] blev=0,btyp=L w=1 a+d=0+0 face=1 35 35: CHAR[ ] str=0x4fa602e6[0] blev=0,btyp=L w=1 a+d=0+0 face=1 36 36: CHAR[L] str=0x4fa602e6[1] blev=0,btyp=L w=1 a+d=0+0 face=1 37 37: CHAR[1] str=0x4fa602e6[3] blev=0,btyp=L w=1 a+d=0+0 face=1 38 38: CHAR[ ] pos=-1 blev=0,btyp=B w=1 a+d=0+0 face=1 39 39: CHAR[ ] pos=-1 blev=0,btyp=B w=1 a+d=0+0 face=1 40 40: CHAR[ ] pos=-1 blev=0,btyp=B w=1 a+d=0+0 face=1 41 41: CHAR[ ] str=0x4fab16f5[0] blev=0,btyp=L w=1 a+d=0+0 face=1 42 42: CHAR[ ] str=0x4fab16f5[1] blev=0,btyp=L w=1 a+d=0+0 face=1 43 43: CHAR[(] str=0x4fab16e0[0] blev=0,btyp=L w=1 a+d=0+0 face=1 44 44: CHAR[M] str=0xf95dcc0[0] blev=0,btyp=L w=1 a+d=0+0 face=1 45 45: CHAR[a] str=0xf95dcc0[1] blev=0,btyp=L w=1 a+d=0+0 face=1 46 46: CHAR[g] str=0xf95dcc0[2] blev=0,btyp=L w=1 a+d=0+0 face=1 47 47: CHAR[i] str=0xf95dcc0[3] blev=0,btyp=L w=1 a+d=0+0 face=1 48 48: CHAR[t] str=0xf95dcc0[4] blev=0,btyp=L w=1 a+d=0+0 face=1 49 49: CHAR[ ] str=0xf95dcc0[5] blev=0,btyp=L w=1 a+d=0+0 face=1 50 50: CHAR[L] str=0xf95dcc0[6] blev=0,btyp=L w=1 a+d=0+0 face=1 51 51: CHAR[o] str=0xf95dcc0[7] blev=0,btyp=L w=1 a+d=0+0 face=1 52 52: CHAR[g] str=0xf95dcc0[8] blev=0,btyp=L w=1 a+d=0+0 face=1 53 53: CHAR[)] str=0x4fa729d9[0] blev=0,btyp=L w=1 a+d=0+0 face=1 54 54: CHAR[ ] str=0x4fa729ae[0] blev=0,btyp=L w=1 a+d=0+0 face=1 55 55: CHAR[-] str=0x4fa71e84[0] blev=0,btyp=L w=1 a+d=0+0 face=1 56 56: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 57 57: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 58 58: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 59 59: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 60 60: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 61 61: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 62 62: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 63 63: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 64 64: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 65 65: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 66 66: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 67 67: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 68 68: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 69 69: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 70 70: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 71 71: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 72 72: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 73 73: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 74 74: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 75 75: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 76 76: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 77 77: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 78 78: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 79 79: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 80 80: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 81 81: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 82 82: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 83 83: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1 84 84: CHAR[-] str=0x4fa71e84[2] blev=0,btyp=L w=1 a+d=0+0 face=1