I found it's caused by this piece of code inside my ~/.emacs.d/init.el

(use-package undo-tree
  :straight t
  :config
  ;; autosave the undo-tree history
  (setq undo-tree-history-directory-alist
        `((".*" . ,temporary-file-directory)))
  (setq undo-tree-auto-save-history t)
  (global-undo-tree-mode +1)
  :diminish 'undo-tree-mode)


El mié, 10 mar 2021 a las 16:55, Eli Zaretskii (<eliz@gnu.org>) escribió:
> From: J K sanchez <1994jorgesanchez@gmail.com>
> Date: Wed, 10 Mar 2021 15:54:03 +0000
>
> I found my emacs crashed when opening certain file. It's a python file i
> can't share but other python files open nicely.
> When using emacs -Q it opens without problems.
> I found this in gdb when using bt full which was stuck in a loop and was too long.
> a part of (gdb) bt full gives:
> #30522 0x0000557f5a97f600 in substitute_object_recurse (subst=0x7ffd34af9380,
> subtree=0x557f615b52d3) at lisp.h:730

It's an infinite recursion, but I doubt we could do anything about it
without a way to reproduce the problem.  If you can somehow produce a
file that is a derivative of the one you cannot share, and post it,
that would be good.

Thanks.