For me it comes from an Org file that has a heading with no title but just a bullet. Here is a simple recipe: 1. emacs -Q 2. M-x which-function-mode 3. C-x C-f debug.org (file attached, outline with no heading) See the following error which-func-ff-hook error: (wrong-type-argument stringp nil)