IDE: Workaround exception caused by dead C/C++ swig-wrapped object when debug still try to update view after close.
--- a/ProjectController.py Mon May 23 16:27:56 2022 +0200
+++ b/ProjectController.py Mon May 23 18:10:13 2022 +0200
@@ -1722,10 +1722,16 @@
for weakcallable, buffer_list in WeakCallableDict.iteritems():
function = getattr(weakcallable, function_name, None)
if function is not None:
- if buffer_list:
- function(*cargs)
- else:
- function(*tuple([lst[-1] for lst in cargs]))
+ # FIXME: apparently, despite of weak ref objects,
+ # some dead C/C++ wx object are still reachable from here
+ # leading to RuntimeError exception
+ try:
+ if buffer_list:
+ function(*cargs)
+ else:
+ function(*tuple([lst[-1] for lst in cargs]))
+ except RuntimeError:
+ pass
def GetTicktime(self):
return self._Ticktime