elisp-bug-hunter icon indicating copy to clipboard operation
elisp-bug-hunter copied to clipboard

Bug-hunter finds error but it shouldn't (false positive)

Open bertulli opened this issue 2 years ago • 3 comments

Hi! I've tried to search for help on the Emacs SE but with no fortune. Here's the problem:

When I launch Bug-hunter (M-x bug-hunter-init-file), I am asked which type of debug I want, and I choose interactive (i), then I am presented with the initial menu. Upon pressing 6 to start, A new Emacs frame opens up, but here's the catch! It gives an error in the echo area (let: Cannot open load file: No such file or directory, windsize). The Emacs session I got is basic (as if I launched it with -q). When I close it, I answer n (since the error is not present), and I got this:

Test failed.
The assertion returned nil after loading the entire file.
Remember, the assertion must be an expression that returns
non-nil in your current (problematic) Emacs state, AND that
returns nil on a clean Emacs instance.
If you're unsure how to write an assertion, you can try the interactive
hunt instead, or see some examples in the Readme:
    https://github.com/Malabarba/elisp-bug-hunter
interactive
^L

What am I doing wrong?

Note that, if I try to automatically debug my init-file, I got an error on

  The following error was signaled here:
    (file-missing "Cannot open load file" "No such file or directory" "windsize")
  Caused by the following expression:
    (require 'windsize)

like if windsize causes an error. However, in my init file all works good (checking with --debug-init), and btw if I try to remove that line it seems that, one after the other, all require are errors. Is this normal?

bertulli avatar Jun 29 '22 17:06 bertulli

Hi there. No, this is not normal. Might just be an incompatibility with one of the latest versions. Which emacs version are you on?

Malabarba avatar Jul 28 '22 11:07 Malabarba

GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-04-28, on Linux 5.18.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000 x86_64 GNU/Linux

bertulli avatar Jul 29 '22 12:07 bertulli

Ok, I'll try to debug this when I get some free time. No promises though. :-/ Free time has been a luxury of late...

Any help is appreciated though. :-)

Malabarba avatar Jul 30 '22 01:07 Malabarba

Ok I may have found the problem. It was completely on my side: while progressively tweaking my init file, some code ended up before the call to (package-initialize). I'm no expert of Emacs' startup process, but I suppose that was the reason it couldn't find the packages. Considering this, I'm wondering how it could start normally before. Anyway, thanks, and sorry if I wasted your time!

bertulli avatar Jan 22 '23 14:01 bertulli