jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.89k stars 259 forks source link

RuntimeError freezes the whole Emacs! #1312

Open ghost opened 6 years ago

ghost commented 6 years ago

This happens to me almost every time after i have broken an infinite loop in the Inferior Python with C-c C-c. The whole emacs will get unresponsive, the only way will be killall emacs from terminal! Maybe i can provide more information if it would be helpful.

galaunay commented 6 years ago

Thanks for reporting this.

I couldn't reproduce the bug with my config.

Could you check if it's happening without elpy-mode activated ? It seems more probable to be linked to python-mode or comint-mode...

ghost commented 6 years ago

Ok, obviously it has nothing to do with elpy. Emacs freezes after some times of getting RuntimeError: maximum recursion depth exceeded while getting the str of an object.

galaunay commented 6 years ago

Ok, it is still apparently an error linked to python.

A temporary workaround that may work is to increase the maximum recursion number:

import sys
sys.setrecursionlimit(10000)  # or more...

But it should be a better idea to try to identify the piece of code that is recursing a bit too much.