You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is caused by the idle add command here. Likely because when the idle add actually calls the function, the buffer has moved so the iterators are no longer valid.
I tried creating a function that would get the text buffer values after it is called, but somehow this didn't fix the issue.
index ce6bf9d..7e92a7a 100644
--- a/python/src/procman_ros/sheriff_gtk/command_console.py+++ b/python/src/procman_ros/sheriff_gtk/command_console.py@@ -201,10 +201,15 @@ class SheriffCommandConsole(Gtk.ScrolledWindow, SheriffListener):
# toss out old text if the buffer is getting too big
num_lines = tb.get_line_count()
if num_lines > self.stdout_maxlines:
- start_iter = tb.get_start_iter()- chop_iter = tb.get_iter_at_line(num_lines - self.stdout_maxlines)
# Must use idle_add here otherwise the output console will not be updated correctly
+ GLib.idle_add(functools.partial(self.idle_del_tb, tb))++ def idle_del_tb(self, tb):+ num_lines = tb.get_line_count()+ start_iter = tb.get_start_iter()+ chop_iter = tb.get_iter_at_line(num_lines - self.stdout_maxlines)+ self.del_tb(start_iter, chop_iter)
def del_tb(self, start, chop):
self.sheriff_tb.delete(start, chop)
The text was updated successfully, but these errors were encountered:
After a short time running, procman will start to spam
I think this is caused by the idle add command here. Likely because when the idle add actually calls the function, the buffer has moved so the iterators are no longer valid.
procman_ros/python/src/procman_ros/sheriff_gtk/command_console.py
Lines 203 to 207 in 5d12e12
I tried creating a function that would get the text buffer values after it is called, but somehow this didn't fix the issue.
The text was updated successfully, but these errors were encountered: