I'm sending this to emacs.orgmode and emacs.devel lists.
With the latest emacs:
(1) emacs -q <RET>
(2) M-x org-version <RET>
--> Org mode version 9.5.4 (release_9.5.4-3-g6dc785
(4) C-x C-c --> emacs closes with no messages
(5) Repeat (1)
(6) In scratch buffer load latest org-mode by eval
(add-to-list 'load-path (expand-file-name "/path/to/git/org-mode/lisp"))
(7) M-x org-version <RET>
--> Org mode version 9.5.4 (release_9.5.4-608-g080462
(8) C-x C-c --> emacs closes with error message
--> Wrong type argument: stringp, (wrong-type-argument stringp nil)
Debugging further reveals:
Debugger entered--Lisp error: (wrong-type-argument stringp (wrong-type-argument
stringp nil))
format-message((wrong-type-argument stringp nil))
apply(format-message (wrong-type-argument stringp nil))
error((wrong-type-argument stringp nil))
#f(compiled-function (fun) #<bytecode
-0x1724f6e>)(org-babel-remove-temporary-stable-directory)
run-hook-wrapped(#f(compiled-function (fun) #<bytecode -0x1724f6e>)
org-babel-remove-temporary-stable-directory)
run-hook-query-error-with-timeout(kill-emacs-hook)
kill-emacs(nil nil)
save-buffers-kill-emacs(nil)
save-buffers-kill-terminal(nil)
funcall-interactively(save-buffers-kill-terminal nil)
call-interactively(save-buffers-kill-terminal nil nil)
command-execute(save-buffers-kill-terminal)
Best wishes,