From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.bugs Subject: bug#39137: 26.3; ispell-really-hunspell sometimes fails in init Date: Tue, 14 Jan 2020 16:25:07 -0500 Organization: Modular Genetics Inc. Message-ID: <24094.12723.597917.248404@persepolis.modulargenetics.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="230637"; mail-complaints-to="usenet@blaine.gmane.org" To: 39137@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 14 22:32:59 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.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 1irTo2-000xSy-Hu for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Jan 2020 22:32:58 +0100 Original-Received: from localhost ([::1]:46270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irTo1-00012c-9c for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Jan 2020 16:32:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49893) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irThM-0005kV-Is for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2020 16:26:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irThK-0001eX-Tn for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2020 16:26:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55982) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irThK-0001eG-PG for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2020 16:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1irThK-00076R-Mg for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2020 16:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bob Rogers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Jan 2020 21:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39137 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157903712327248 (code B ref -1); Tue, 14 Jan 2020 21:26:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jan 2020 21:25:23 +0000 Original-Received: from localhost ([127.0.0.1]:33715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irTgd-00075K-Db for submit@debbugs.gnu.org; Tue, 14 Jan 2020 16:25:22 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:53070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irTgZ-000759-2P for submit@debbugs.gnu.org; Tue, 14 Jan 2020 16:25:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49682) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irTgX-0005GD-8g for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2020 16:25:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irTgV-00017z-8g for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2020 16:25:12 -0500 Original-Received: from mail-ua1-x963.google.com ([2607:f8b0:4864:20::963]:44400) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irTgU-00017A-Uh for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2020 16:25:11 -0500 Original-Received: by mail-ua1-x963.google.com with SMTP id c14so5406294uaq.11 for ; Tue, 14 Jan 2020 13:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=modulargenetics-com.20150623.gappssmtp.com; s=20150623; h=from:mime-version:content-transfer-encoding:message-id:date:to :subject:organization; bh=p6e5xUHhx4+/ORuluM0zAJngw8utDwK/oeoY4+yMwyw=; b=i9jXkowf4khAnFT9Jrfgfhhv/VCj6MK5sOTsxzF0PNWwb6s3DqT0LXvlDXJYLyDmU6 mtQGQgeqQ3rC6B1RPlCX1RQRC0gOVW46NMqHJQRJudSAJoVLe36mg5febLusRJjpl4hL 2W9QYrPWdABAtaoUjy//CeTf1vArFjlU75TR4dOGdzpIpkDj/VbOrOCfoExvFDbhCLNe 4QnsDu4Nlvmoe/F4mC/fn02t3tdT8CxeKjyna5V5b+mVL8Xs2TRWbXNl+bb96Y+bZhV3 hfsOZ+MST1IpQvb7hc3ayWt2YuaBeNGve0Wzg0FpkWB0R43ES16iWl9tvX0QO2eUptvZ K7Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:content-transfer-encoding :message-id:date:to:subject:organization; bh=p6e5xUHhx4+/ORuluM0zAJngw8utDwK/oeoY4+yMwyw=; b=Bv84FqzCCMmrgqMwD1MMAPZ0jBgCfqA6FuEUMUrq0yxor/UGwy34VXA4aP+vWit4/r TKCw/3iwLH0KIkCkC+J28ldYSMHab99RIhfQv2gWKkFlbWfTygPZPP65BoyBcQNr4oSD raHXTbFoK5Q0frNamnZQCP9pApj/pLrqAx822bVKKBmHyYjUBgDQ+67lOCcXW0hffAE8 VTfAis0+v8FUr8z4r8OoJiowcDOqwB+lNr0CnjgYjKL7ialEBGrEgGy2Ppo52igLWXJI 9pz3PciN2JYxhSTBBB7rTg3h9sAIoG1wqpEM74GbvTsImgGJ+CAymLWjL4mGpDccPRxw JVbg== X-Gm-Message-State: APjAAAX7L0xWwVLkbfbesnULXqqcln7HdAMJxR7eeGZW33AUFb1mVtFG TpWAqHo/k+n3ybpbMUK17MIcvbCktAW4AINuapVv054ZDA/hOQ== X-Google-Smtp-Source: APXvYqyP5dAw1vQu4aqGjzwrS5xzN/mSg4epMHuQkIa89VNxyaTVa48s0wqzMkWeTcFhqmJqx7p7D1MFucCx X-Received: by 2002:ab0:66d6:: with SMTP id d22mr12307716uaq.92.1579037109516; Tue, 14 Jan 2020 13:25:09 -0800 (PST) Original-Received: from granada.modulargenetics.com (198-0-172-193-static.hfc.comcastbusiness.net. [198.0.172.193]) by smtp-relay.gmail.com with ESMTP id g3sm1923934vkm.13.2020.01.14.13.25.08 for ; Tue, 14 Jan 2020 13:25:09 -0800 (PST) X-Relaying-Domain: modulargenetics.com Original-Received: from persepolis.modulargenetics.com (persepolis.modulargenetics.com [192.168.23.34]) by granada.modulargenetics.com (Postfix) with ESMTP id 2F80340C5C; Tue, 14 Jan 2020 16:25:08 -0500 (EST) Original-Received: by persepolis.modulargenetics.com (Postfix, from userid 503) id BD879C01B3; Tue, 14 Jan 2020 16:25:07 -0500 (EST) X-Mailer: VM 7.19 under Emacs 26.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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-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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174579 Archived-At: Spell checking can die with "(wrong-type-argument stringp nil)" when ispell-really-hunspell is true. To reproduce (if it reproduces at all on your system), just do "emacs -Q" with Hunspell installed and M-$ on any of the words in the startup screen. On some of the systems I use, it fails reliably when initializing; on others, it works reliably. All systems are running the openSUSE Leap 15.1 release of GNU/Linux, fully updated, with the identical locally- built RPM version of Emacs 26.3 (with no local patches) and the distro Hunspell 1.6.2. The key seems to be whether ispell-dictionary-alist is initialized before ispell-start-process is called; just a warning to anyone who fails to reproduce this. But since it fails in "emacs -Q" on systems with apparently identical software, I am at a complete loss to figure this out. When it fails, the backtrace looks like this: Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match("," nil 0) split-string(nil "," t) ispell-parse-hunspell-affix-file(nil) ispell-hunspell-fill-dictionary-entry(nil) ispell-start-process() ispell-init-process() ispell-buffer-local-words() ispell-accept-buffer-local-defs() ispell-word(nil nil nil t) funcall-interactively(ispell-word nil nil nil t) call-interactively(ispell-word nil nil) command-execute(ispell-word) The problem seems to be related to this code in the start of ispell-start-process: ;; Parse hunspell affix file if using hunspell and entry is uninitialized. (if ispell-really-hunspell (or (cadr (assoc ispell-current-dictionary ispell-dictionary-alist)) (ispell-hunspell-fill-dictionary-entry ispell-current-dictionary))) It appears that "nil" is valid for ispell-current-dictionary and means "default", but ispell-hunspell-fill-dictionary-entry expects only a string. On that basis, I would claim that there is a bug that has perhaps been hidden by being on a rare execution path. But if ispell-dictionary-alist is already initialized with a "nil" entry, then ispell-hunspell-fill-dictionary-entry never gets called, leading to the "reproducible irreproducibility" of this bug. And if ispell-dictionary-alist should *always* be initialized and contain the current entry, then this is dead code. I don't know where or how ispell-current-dictionary is getting set up on some systems but not on others, nor how it ought to be set up, so I am unable to take this any further. -- Bob Rogers Modular Genetics Inc. http://www.modulargenetics.com/ ------------------------------------------------------------------------ In GNU Emacs 26.3 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.22.30) of 2019-11-21 built on yuggoth Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Entering debugger... Configured using: 'configure --with-pop --without-dbus --without-gsettings --without-gconf --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --sharedstatedir=/var/lib --libexecdir=/usr/lib --with-x --with-xpm=no --with-jpeg --with-tiff --with-gif=no --with-png --with-x-toolkit=gtk3 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib64 --build x86_64-suse-linux 'CFLAGS=-g -O2 -fno-optimize-sibling-calls' LDFLAGS=-s' Configured features: JPEG TIFF PNG RSVG SOUND GLIB NOTIFY GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Debugger Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu cl-print byte-opt gv bytecomp byte-compile cl-loaddefs cl-lib cconv debug ispell elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads inotify dynamic-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 100243 8442) (symbols 48 20704 1) (miscs 40 88 143) (strings 32 30091 1374) (string-bytes 1 795489) (vectors 16 15184) (vector-slots 8 514416 10616) (floats 8 55 85) (intervals 56 284 0) (buffers 992 12))