From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Question about display engine Date: Sat, 07 Sep 2019 09:41:41 +0300 Message-ID: <83r24s621m.fsf@gnu.org> References: <318675867.1913640.1567711569517.ref@mail.yahoo.com> <318675867.1913640.1567711569517@mail.yahoo.com> <8336h97qiw.fsf@gnu.org> <20190906103023.3r7aa5spkie3cca6@Ergus> <831rwt7dvv.fsf@gnu.org> <20190906163456.7kfylavswxvgrfhv@Ergus> <83y2z15m6h.fsf@gnu.org> <20190907023542.quc4rttfm4yr5m7t@Ergus> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="222455"; mail-complaints-to="usenet@blaine.gmane.org" Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 07 08:42:19 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 1i6UQL-000vlh-Gy for ged-emacs-devel@m.gmane.org; Sat, 07 Sep 2019 08:42:17 +0200 Original-Received: from localhost ([::1]:33536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6UQJ-0005Pn-VI for ged-emacs-devel@m.gmane.org; Sat, 07 Sep 2019 02:42:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39637) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6UPm-0005Ph-TR for emacs-devel@gnu.org; Sat, 07 Sep 2019 02:41:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i6UPm-0004YF-4I; Sat, 07 Sep 2019 02:41:42 -0400 Original-Received: from [176.228.60.248] (port=1500 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i6UPl-0005A0-Cp; Sat, 07 Sep 2019 02:41:41 -0400 In-reply-to: <20190907023542.quc4rttfm4yr5m7t@Ergus> (message from Ergus on Sat, 7 Sep 2019 04:35:44 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:239911 Archived-At: > Date: Sat, 7 Sep 2019 04:35:44 +0200 > From: Ergus > Cc: rudalics@gmx.at, emacs-devel@gnu.org > > In your solution I am facing an issue that I am not sure how to solve: > > I added a function handle_face_prop_general; that I call in > extend_face_to_end_of_line but I get an inf loop because in the call > stack I have: > > extend_face_to_end_of_line > handle_face_prop_general > face_at_buffer_position > Fget_text_property > Ftext_properties_at > validate_interval_range > > That has a condition: > > if (!(BUF_BEGV (b) <= XFIXNUM (*begin) > && XFIXNUM (*begin) <= XFIXNUM (*end) > && XFIXNUM (*end) <= BUF_ZV (b))) > args_out_of_range (*begin, *end); > > And for some reason: > > XFIXNUM (*end) <= BUF_ZV (b) is false; so the function args_out_of_range > emits a signal and never returns. You need to understand how this happens. What are the values of *begin and *end in this case, and what is the position of the iterator you pass to handle_face_prop_general? > It is possible that in the first calls to extend_face_to_end_of_line the > BUF_ZV (b) is not initialized yet? No. But please tell more about "the first call to extend_face_to_end_of_line". Which code calls it, and for what buffer? > Because it is always 1. when I print it. If BUF_ZV is 1, it's an empty buffer. What is it->w->contents in your call? It should be the buffer whose text you are displaying.