From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.bugs Subject: bug#40008: Backtraces can contain very long strings Date: Wed, 11 Mar 2020 13:39:01 +0100 Message-ID: References: <20200310114711.GA10381@tuxteam.de> <875zfbm9er.fsf@gnu.org> Reply-To: mikael@djurfeldt.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000ab82505a09386e7" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="106550"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40008@debbugs.gnu.org To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Mar 11 13:40:51 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jC0fK-000Rcr-JS for guile-bugs@m.gmane-mx.org; Wed, 11 Mar 2020 13:40:50 +0100 Original-Received: from localhost ([::1]:51066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jC0fI-0005wl-FE for guile-bugs@m.gmane-mx.org; Wed, 11 Mar 2020 08:40:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46631) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jC0ed-0004xv-Cl for bug-guile@gnu.org; Wed, 11 Mar 2020 08:40:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jC0eY-0008K3-1R for bug-guile@gnu.org; Wed, 11 Mar 2020 08:40:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47767) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jC0eX-0008Jz-Un for bug-guile@gnu.org; Wed, 11 Mar 2020 08:40:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jC0eX-0003Wa-RI for bug-guile@gnu.org; Wed, 11 Mar 2020 08:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mikael Djurfeldt Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 11 Mar 2020 12:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40008 X-GNU-PR-Package: guile Original-Received: via spool by 40008-submit@debbugs.gnu.org id=B40008.158393036113498 (code B ref 40008); Wed, 11 Mar 2020 12:40:01 +0000 Original-Received: (at 40008) by debbugs.gnu.org; 11 Mar 2020 12:39:21 +0000 Original-Received: from localhost ([127.0.0.1]:53740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jC0ds-0003Ve-Rw for submit@debbugs.gnu.org; Wed, 11 Mar 2020 08:39:21 -0400 Original-Received: from mail-vs1-f42.google.com ([209.85.217.42]:39655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jC0dq-0003VQ-K8 for 40008@debbugs.gnu.org; Wed, 11 Mar 2020 08:39:19 -0400 Original-Received: by mail-vs1-f42.google.com with SMTP id a19so1188549vsp.6 for <40008@debbugs.gnu.org>; Wed, 11 Mar 2020 05:39:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=Vp2e7ajiIwNdKi+DC9uMlAmdm2DzL6iQkdZ4XN5vt7o=; b=sST60f8RrjmnSfZuQZRNjgU5g4qrjHRIpgKOkeYtHCfK8JZcoQg/AS3V3o8YIgZ+xU q4VzEaNSt/LpVyE6Kqc1BgsfzpHeefs+PTyVhgtnSUsnvu7qpfcsBgv/cU/MYakbooug oNz4jJiDx/3nlxPMwopqLjZlqHF/6KDAlsYSoVP1s1LeYO/P/hQnZAVhfwRAYpYcjUKW Hwti+QBtef/DIJx8C9xRZr50okhDJoYVigFgO7HNFsVUmTVXsJNTZiSXZaYgvByFNRum I5GqlfoIMQ0cQBaq1mpXwwGEZndwgLt5wmvlcF8elkMXJAFv3w1hVHlcm16bE6mJhjCc s1Xw== X-Gm-Message-State: ANhLgQ1NHsICZ+CJ0SFSWK3YB7qUr4qjkbDQItklkz3TisYiwZXV1xOs AuW3Cv427pG4YfVAsb3Rx21mQ9DpoXTN73WQxvQ= X-Google-Smtp-Source: ADFU+vs9DdgRWShGBwJfYmVOTGgvd4Pf2eG4Cyjbpv/5XZWPRuqrEtwpL2xvQqFxqKHbdGGSDtrJoBvgM+yZKz1XiA8= X-Received: by 2002:a67:c50d:: with SMTP id e13mr1865145vsk.118.1583930353038; Wed, 11 Mar 2020 05:39:13 -0700 (PDT) In-Reply-To: <875zfbm9er.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9644 Archived-At: --0000000000000ab82505a09386e7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 11, 2020 at 12:14 PM Ludovic Court=C3=A8s wrote: > Hi, > > skribis: > > > On Tue, Mar 10, 2020 at 11:05:24AM +0100, Jan Synacek wrote: > >> I have the following backtrace: > >> > >> Backtrace: > >> In ice-9/boot-9.scm: > >> 1736:10 9 (with-exception-handler _ _ #:unwind? _ # _) > >> In unknown file: > >> 8 (apply-smob/0 #) > >> In ice-9/boot-9.scm: > >> 718:2 7 (call-with-prompt _ _ #) > >> In ice-9/eval.scm: > >> 619:8 6 (_ #(#(#))) > >> In ice-9/boot-9.scm: > >> 2806:4 5 (save-module-excursion _) > >> 4351:12 4 (_) > >> In /home/jsynacek/./git.scm: > >> 72:0 3 (_) > >> 61:16 2 (change-spec _ _ "66.33" _ #) > >> 48:12 1 (change-release "# We ship a .pc file but don't want t=E2= =80=A6" =E2=80=A6) > >> In unknown file: > >> 0 (make-regexp "^Release:(\\s*).*$" "# We ship a .pc fil=E2= =80=A6" =E2=80=A6) > >> > >> ERROR: In procedure make-regexp: > >> Wrong type (expecting exact integer): " > >> > >> " > >> > >> While this is probably not considered an error, I guess it might be > better > >> to ellipsize strings in errors such is mine that are over a certain > length > >> long. The important part of the backtrace was scrolled away and I got > >> confused about the string, as I thought it was part of the output and > >> started wondering why (display ...) keeps the escaped newlines in the > >> string. > > > > Some want it, some want it not. I remember a couple of discussions > > in guile-user and guile-devel about this topic. > > > > Have you tried setting debug options `width' and/or `depth' (cf. > procedure > > `debug-options')? > > > > (my current defaults are 79 columns/20 rows, this is Guile 3.0). > > The backtrace itself is ellipsized, but the value displayed in the > exception (the long string above) is not. > > I would rather not ellipsize anything in the exception itself. > > Thoughts? > It would be nice if this was configurable. As Tomas pointed out this kind of thing can be a matter of taste. Also, if debugging some specific problem involving large strings it might be convenient to switch on for anyone. There could be a debug-option (see (debug-options '?)) `exception-width' (similar to `width' but for errors and exceptions). But how is the debug-options interface regarded nowadays? Is it going to be deprecated? I notice that the `width' option doesn't seem to have an effect anymore. Looking into backtrace.c and (system repl debug) the width nowadays rather seems to be controlled by the terminal width only. Best regards, Mikael --0000000000000ab82505a09386e7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Mar 11, 2020 at 12:14 PM Ludovic = Court=C3=A8s <ludo@gnu.org> wrote= :
Hi,

<tomas@tuxteam.de<= /a>> skribis:

> On Tue, Mar 10, 2020 at 11:05:24AM +0100, Jan Synacek wrote:
>> I have the following backtrace:
>>
>> Backtrace:
>> In ice-9/boot-9.scm:
>>=C2=A0 =C2=A01736:10=C2=A0 9 (with-exception-handler _ _ #:unwind? = _ # _)
>> In unknown file:
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 8 (apply-smob/0 #<thun= k 651b40>)
>> In ice-9/boot-9.scm:
>>=C2=A0 =C2=A0 =C2=A0718:2=C2=A0 7 (call-with-prompt _ _ #<proced= ure default-prompt-handle=E2=80=A6>)
>> In ice-9/eval.scm:
>>=C2=A0 =C2=A0 =C2=A0619:8=C2=A0 6 (_ #(#(#<directory (guile-user= ) 74cf00>)))
>> In ice-9/boot-9.scm:
>>=C2=A0 =C2=A0 2806:4=C2=A0 5 (save-module-excursion _)
>>=C2=A0 =C2=A04351:12=C2=A0 4 (_)
>> In /home/jsynacek/./git.scm:
>>=C2=A0 =C2=A0 =C2=A0 72:0=C2=A0 3 (_)
>>=C2=A0 =C2=A0 =C2=A061:16=C2=A0 2 (change-spec _ _ "66.33"= ; _ #<output: file 1>)
>>=C2=A0 =C2=A0 =C2=A048:12=C2=A0 1 (change-release "# We ship a= .pc file but don't want t=E2=80=A6" =E2=80=A6)
>> In unknown file:
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 (make-regexp "^Rel= ease:(\\s*).*$" "# We ship a .pc fil=E2=80=A6" =E2=80=A6) >>
>> ERROR: In procedure make-regexp:
>> Wrong type (expecting exact integer): "
>> <HERE COMES A LOOOONG STRING WHICH IS ABOUT 193000 CHARACTERS W= IDE>
>> "
>>
>> While this is probably not considered an error, I guess it might b= e better
>> to ellipsize strings in errors such is mine that are over a certai= n length
>> long. The important part of the backtrace was scrolled away and I = got
>> confused about the string, as I thought it was part of the output = and
>> started wondering why (display ...) keeps the escaped newlines in = the
>> string.
>
> Some want it, some want it not. I remember a couple of discussions
> in guile-user and guile-devel about this topic.
>
> Have you tried setting debug options `width' and/or `depth' (c= f. procedure
> `debug-options')?
>
> (my current defaults are 79 columns/20 rows, this is Guile 3.0).

The backtrace itself is ellipsized, but the value displayed in the
exception (the long string above) is not.

I would rather not ellipsize anything in the exception itself.

Thoughts?



=
But how is the debug-options interface regarded nowadays? Is it going = to be deprecated? I notice that the `width' option doesn't seem to = have an effect anymore. Looking into backtrace.c and (system repl debug) th= e width nowadays rather seems to be controlled by the terminal width only.<= /div>

Best regards,
Mikael
--0000000000000ab82505a09386e7--