From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: The poor quality of Emacs's backtraces Date: Fri, 14 Jul 2023 13:56:36 +0300 Message-ID: <835y6m4v8b.fsf@gnu.org> References: <3D901B62-4826-4783-B684-968E6890E75A@gmail.com> <87wmz2j52m.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28533"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattias.engdegard@gmail.com, acm@muc.de, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 14 12:57:16 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qKGU8-0007E8-3U for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jul 2023 12:57:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKGTS-0005Sh-SM; Fri, 14 Jul 2023 06:56:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKGTR-0005SP-1K for emacs-devel@gnu.org; Fri, 14 Jul 2023 06:56:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKGTP-0000fx-86; Fri, 14 Jul 2023 06:56:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=D9DcFRr+x1FCxApHyxkNaW4GOJTe9WLFTndUfrlKE9E=; b=YFu03E196u/V4XhHzg9C MSNtrn+9Kv1DXoXlxwCvK0XPMNok7952uh2zyuYMGpC8BRlPpOAeXUQIvLiGTd1o9Gdh35tN11Ke3 PI1iu441cUY/KpfEhpiCBHd59EefJtcpnT006BBAAp0DqtzLmmMb/uTa6KTaB4vku9FA24UqiRMBh wsqFiw5cKrZ2nbJwTjujtv1s+1asuCMDn0xWCBR1Oxj9nvO2YOLRRjXrJYlt/3jiYz0TeDgPZ3MzH AlT4KBA+3B1q9BNwQr2JkVwupn1QKTOI2Hl2zJO7w2Y9t6bw5ijPdCOoK+vyeL/BjHvwRcrP0rmlU YMC1OSfDZLEcXQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKGTC-00051q-8D; Fri, 14 Jul 2023 06:56:29 -0400 In-Reply-To: <87wmz2j52m.fsf@localhost> (message from Ihor Radchenko on Fri, 14 Jul 2023 08:00:17 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307864 Archived-At: > From: Ihor Radchenko > Cc: Alan Mackenzie , emacs-devel@gnu.org > Date: Fri, 14 Jul 2023 08:00:17 +0000 > > Mattias EngdegÄrd writes: > > >> test suite truncating every line at ~70 characters. (Why is this done?) > > > > I agree, that's annoying. We have to truncate at some point or we'll be treated to dumps of impractical size before we know it, but 70 chars is pretty useless. > > It would be nice if the backtraces used `pp' instead of dumb truncation. That would be a definite improvement, but please don't forget that the backtrace must be available in many situations where Emacs is unstable. In particular, it is completely unacceptable for a backtrace to cause Emacs to abort, e.g., because it attempts to display some invalid Lisp object. (Yes, we had such problems recently, due to the fact that the backtrace nowadays uses cl-print.) So whatever you do to enhance the backtrace, please take care of catching any exceptions and falling back to the good-old simple backtrace.