From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#30320: 26.0.91; Crash when using lsp-ui-doc-mode Date: Mon, 05 Feb 2018 19:03:01 +0200 Message-ID: <834lmv8j3u.fsf@gnu.org> References: <83po5oeil8.fsf@gnu.org> <83a7wrer8i.fsf@gnu.org> <5A757B30.9070402@gmx.at> <83y3ka9gmg.fsf@gnu.org> <83mv0pal74.fsf@gnu.org> <83y3k88ux5.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1517853025 28165 195.159.176.226 (5 Feb 2018 17:50:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Feb 2018 17:50:25 +0000 (UTC) Cc: 30320@debbugs.gnu.org To: Jake Goulding , martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 05 18:50:21 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eiku6-00063z-N7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Feb 2018 18:50:06 +0100 Original-Received: from localhost ([::1]:43542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eikw8-0004sV-0A for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Feb 2018 12:52:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eikBa-0007Ca-5C for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 12:04:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eikBW-0004DX-9p for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 12:04:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eikBW-0004Ck-5v for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 12:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eikBV-0006Ju-RS for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 12:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Feb 2018 17:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30320 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30320-submit@debbugs.gnu.org id=B30320.151785020224250 (code B ref 30320); Mon, 05 Feb 2018 17:04:01 +0000 Original-Received: (at 30320) by debbugs.gnu.org; 5 Feb 2018 17:03:22 +0000 Original-Received: from localhost ([127.0.0.1]:58965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eikAs-0006J2-Dq for submit@debbugs.gnu.org; Mon, 05 Feb 2018 12:03:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eikAq-0006Iq-QP for 30320@debbugs.gnu.org; Mon, 05 Feb 2018 12:03:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eikAf-0001Gd-S5 for 30320@debbugs.gnu.org; Mon, 05 Feb 2018 12:03:15 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eikAf-0001GC-PM; Mon, 05 Feb 2018 12:03:09 -0500 Original-Received: from [176.228.60.248] (port=4136 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eikAf-0000gq-9R; Mon, 05 Feb 2018 12:03:09 -0500 In-reply-to: (message from Jake Goulding on Sun, 4 Feb 2018 16:38:20 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142942 Archived-At: > From: Jake Goulding > Date: Sun, 4 Feb 2018 16:38:20 -0500 > > Ah, using `XSTRING(XSYMBOL(args[0])->u.s.name)->u.s.data` seems to do the trick: > > > lsp--parser-on-message > > lsp-ui-doc--callback > lsp-ui-doc--display > lsp-ui-doc--move-frame > set-frame-size Thanks, great job. It is now clear what happens. As I guessed, lsp-ui assumes it is run in a GUI frame, so it calls functions that make no sense on TTY frames. I suggest to communicate this to the developers of that package. Can you avoid the crash if you remove the call to set-frame-size in lsp-ui-doc--move-frame, or condition it on display-graphic-p returning non-nil? As for preventing such crashes even though some Lisp does nonsensical things: I think a TTY frame cannot be less than 3 or 4 lines plus the number of lines used for the menu bar. Martin, WDYT about adding these limitations to adjust_frame_size? > not a symbol 1: > > p *XVECTOR(args[0]) > (Lisp_Vector) $14 = { > header = (size = 4611686018729377797, gcaligned = '\x05') > contents = {} > } > (lldb) p PSEUDOVECTOR_TYPE(XVECTOR(args[0])) > (pvec_type) $18 = PVEC_COMPILED > > not a symbol 2: > > p *XVECTOR(args[0]) > (Lisp_Vector) $16 = { > header = (size = 4611686018729377797, gcaligned = '\x05') > contents = {} > } > (lldb) p PSEUDOVECTOR_TYPE(XVECTOR(args[0])) > (pvec_type) $17 = PVEC_COMPILED Yes, these are byte-compiled functions.