wail icon indicating copy to clipboard operation
wail copied to clipboard

Memento count updates prevent a second running of WAIL on Linux

Open machawk1 opened this issue 5 years ago • 4 comments

Following the Docker instructions in the README then, while logged in to the container and CTRL-C'ing the WAIL process, invoke it a second time. The result starts WAIL but then halts with:

Pango:ERROR:../pango/pango-layout.c:3871:pango_layout_check_lines: assertion failed: (!layout->log_attrs)

This page leads me to believe that this has to do with the UI being updated after querying MemGator in a separate thread, which is discouraged.

I can only replicate this on Linux.

machawk1 avatar Mar 21 '19 18:03 machawk1

If I wait about 60 seconds before re-invoking ./WAIL in the container, this error does not occur. I am assuming here that the thread calling MemGator times out, expires, etc. allowing WAIL to be run like normal again.

machawk1 avatar Mar 26 '19 20:03 machawk1

Something in setMementoCount() is the culprit here, likely:

self.mementoStatus.SetLabel(memCountMsg)
self.mementoStatusPublicArchives.SetLabel("Public archives: ")
self.Layout()

...which updates the UI. When this function is called from a secondary thread and persists after killing WAIL, it may be the source of the subsequent crash attributed to Pango.

Immediately returning from setMementoCount() prevents the crash from occurring, hence the attribution of the problem.

machawk1 avatar Mar 27 '19 14:03 machawk1

thread.start_new_thread(self.fetchMementos, ()) in WAILGUIFrame_Basic.__init__() is the thread invocation that is problematic.

machawk1 avatar Mar 27 '19 15:03 machawk1

Conventionally exiting the application (e.g., through the menu) instead of CTRL-C should not exhibit this problem. The TabController.quit() function handles stopping the indexing thread but not any running MemGator threads. We do not catch the CTRL-C (SIGINT) signal but could with signal.signal(signal.SIGINT, self.gracefullyExit) then stopping all threads (like in TabController.quit()).

machawk1 avatar Mar 27 '19 16:03 machawk1