session crashes randomly after entering statements or magics
The texts session
might randomly crash after entering some statement or magic command. The following error message is printed, after which the session crashes.
Exception ignored in: <function Image.__del__ at 0x1466207c2790>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 4017, in __del__
self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14661b998e50>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14661b998e50>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14661b998e50>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14661b998e50>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Tcl_AsyncDelete: async handler deleted by the wrong thread
Aborted (core dumped)
Obviously the statements are not added to the intended model. The session can be restarted, wih the same model, without any issues afterwards. Entering the same statement/magic that was used right before the crash will, very likely, not lead to another crash.
As for the statements/magic that have led to this behaviour, it seems rather random. For example:
- magic commands:
%hist
,%bye
,%rerun
,%uuid
- while using the
vary
method (adding one or more new parameters to the vary series) - while using the update method
This has been happening when the session is started via:
$> texts session -w -r -a -u my_model_UUID
%bye
Example 1: Input > %bye
Exiting
Exception ignored in: <function Image.__del__ at 0x1466207c2790>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 4017, in __del__
self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14661b998e50>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14661b998e50>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14661b998e50>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14661b998e50>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Tcl_AsyncDelete: async handler deleted by the wrong thread
Aborted (core dumped)
vary
Example 2: Input > vary ((mtl: Structure from file '/home/hk-project-p0022384/an9294/structures/bulk/Ir27.traj'))
Exception ignored in: <function Image.__del__ at 0x14b116c13040>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 4017, in __del__
self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14b1164c5700>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14b1164c5700>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14b1164c5700>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Exception ignored in: <function Variable.__del__ at 0x14b1164c5700>
Traceback (most recent call last):
File "/usr/lib64/python3.9/tkinter/__init__.py", line 363, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
Tcl_AsyncDelete: async handler deleted by the wrong thread
Aborted (core dumped)
Edited by Ivan Kondov