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 get this error every time I try to quit (by pressing 'q'). It also leaves the terminal window in an unusable state. Where do i start debugging this? The stack trace doesnt even list any of my code.
I think the problem here is an invalid order of termination. The implemented quitter calls term.Close() thus closing the terminal object that was given to Termdash for use. This breaks the lifetime guarantee - objects given to called functions must outlive those function calls.
What happens is that the term object shuts down and becomes invalid. But there is some concurrency that still attempts to use it via termdash, probably in one of those goroutines.
The solution is to make sure that termdash and all goroutines are correctly terminated before the term object gets closed. Termination should be done in the exact opposite order of construction.
You can look at the demos for an example of a correct termination sequence, e.g. the termdashdemo:
I get this error every time I try to quit (by pressing 'q'). It also leaves the terminal window in an unusable state. Where do i start debugging this? The stack trace doesnt even list any of my code.
Full code is here: https://github.com/kmulvey/text2speech/blob/main/dashboard.go
The text was updated successfully, but these errors were encountered: