From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Alejandro_P=C3=A9rez_Carballo?= Newsgroups: gmane.emacs.help Subject: Help debugging `file-notify-handle-event` Date: Tue, 8 Nov 2022 20:50:37 -0500 Message-ID: <1C18C574-8BF6-44D8-B88E-85E43AD0579B@umass.edu> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5067"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 09 13:11:59 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1osjvy-00013L-6h for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Nov 2022 13:11:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osjvf-0003yf-Lg; Wed, 09 Nov 2022 07:11:39 -0500 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 1osaEm-000128-Pg for help-gnu-emacs@gnu.org; Tue, 08 Nov 2022 20:50:45 -0500 Original-Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osaEk-0005WZ-UC for help-gnu-emacs@gnu.org; Tue, 08 Nov 2022 20:50:44 -0500 Original-Received: by mail-qt1-x841.google.com with SMTP id w4so9745113qts.0 for ; Tue, 08 Nov 2022 17:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umass.edu; s=google; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=MKvCNUjXrzjRokr2jnFSuiW6DPCkoe8PAtFfHQCCEe4=; b=f02qz8QEHAjCc5o/N2wxZrZTXTLHSOFn4W/Zw4lkfmmAqE4hnutw4X5+/sD/IruM+I 0pvMUqc9GvkecmVW+wm0ewSDrw8n1FemmrxGtq6NkpeMYtWtZiAEn1x9T+gcKIiZUk1c qvd+xQ1ykzK++MRThhOybkImURmdQcvvcNiWM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MKvCNUjXrzjRokr2jnFSuiW6DPCkoe8PAtFfHQCCEe4=; b=ZyXYZa25m8EG4Kg7syT+TAsD0Jt0/NFSCdaufIutZ6hYnTwBUMAtWQzgh+FjdBrmj0 HfkMpPD8OJOTuhVTJvvDPGi12KHyp6OoMMx74t//fta/kdrlfD3vAis8jbVrr7pSEix9 MZJdTy4zSGxTGnFa0q9Xjh9u5TXjCTN2C+bTLlN3YR4TbmAxzzxLU8+vDdX9XBNpwM6i 1f8G+qCvWdNvRqwoFjfazY2e1YlMjt8Z92Miv1rHmuGSP4xwRjSFIafuNZOziYUuxCep 4X67xIHtt/mz/lcWw6SWyzNemUT00e0NnzBGY0ZxpkeazCq1V9NicnUgX5tnisIWhtjE ghkg== X-Gm-Message-State: ANoB5pkHw7V5z7mHkrsFi4J+6RNIr3LMr4nln0BD610Vgagcd5Nw0uYn K2G8kd9KmBpzXBYiAJzUH7h8+oyi0agSDG/F X-Google-Smtp-Source: AA0mqf5b11ZGPg69o27jqx1G2bm2yEzG80MK0JZh02n20U/K70Hyy/suaf/7/Vn348lI3NI/h58yBw== X-Received: by 2002:ac8:5a88:0:b0:3a5:960f:d2d7 with SMTP id c8-20020ac85a88000000b003a5960fd2d7mr7952085qtc.513.1667958640542; Tue, 08 Nov 2022 17:50:40 -0800 (PST) Original-Received: from smtpclient.apple (c-71-234-176-197.hsd1.ma.comcast.net. [71.234.176.197]) by smtp.gmail.com with ESMTPSA id k7-20020a05620a414700b006fa4cac54a5sm10672287qko.72.2022.11.08.17.50.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Nov 2022 17:50:40 -0800 (PST) X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::841; envelope-from=apc@umass.edu; helo=mail-qt1-x841.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 09 Nov 2022 07:11:38 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140862 Archived-At: Hello,=20 I've been trying to figure out the source of this recurring error = message for weeks. I thought I had found a bug, but discussion with = Michael Albinus after my bug report made me think I was confused. https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-11/msg00123.html The error message I've gotten for months now, often multiple times = overnight, is just this:=20 file-notify--call-handler: Symbol=E2=80=99s function definition is = void: nil I don't really know what's triggering it, but having once caught a = backtrace (which I failed to save somewhere), I ended up suspecting that = the issue was related to the fact that, just loading this in vanilla = Emacs: ``` (require 'filenotify) (require 'autorevert) (require 'subr-x) (global-auto-revert-mode) (save-window-excursion (find-file "~/tmp/test.el")) ``` and then running this: (file-notify--handle-event (car (hash-table-keys = file-notify-descriptors)) '(renamed deleted) "/Users/apc/tmp/test.el" = nil) led to the same error:=20 file-notify--call-handler: Symbol=E2=80=99s function definition is = void: nil But in his follow up to my bug report, Michael suggested that this call file-notify--handle-event(20 (renamed deleted) = "/Users/apc/org/agenda/work.org" nil) was invalid (assuming 20 is the descriptor corresponding to the relevant = file).=20 I now have a backtrace to point to, and it does seem that something is = causing that invalid call to be made. My question is: what can I do to = figure out what's triggering it?=20 --- Debugger entered--Lisp error: (void-function nil) nil((20 deleted "/Users/apc/org/agenda/work.org")) file-notify--call-handler(#s(file-notify--watch :directory = "/Users/apc/org/agenda" :filename "work.org" :callback nil) 20 deleted = "/Users/apc/org/agenda/work.org" nil) file-notify--handle-event(20 (renamed deleted) = "/Users/apc/org/agenda/work.org" nil) file-notify--callback-kqueue((20 (rename delete) = "/Users/apc/org/agenda/work.org")) file-notify-handle-event((file-notify (20 (rename delete) = "/Users/apc/org/agenda/work.org") file-notify--callback-kqueue)) funcall-interactively(file-notify-handle-event (file-notify (20 = (rename delete) "/Users/apc/org/agenda/work.org") = file-notify--callback-kqueue)) call-interactively(file-notify-handle-event nil [(file-notify (20 = (rename delete) "/Users/apc/org/agenda/work.org") = file-notify--callback-kqueue)]) command-execute(file-notify-handle-event nil [(file-notify (20 (rename = delete) "/Users/apc/org/agenda/work.org") file-notify--callback-kqueue)] = t) --- Thanks in advance,=20 A.=