Random crashes when printing out to TextView #4
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: tslocum/cview#4
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
I quite often get panics when printing many lines to TextView. It might have something to do with concurrency but I'm not sure about that.
Here's an example panic. The only thing that changes between crashes is the index
Here's demo of this issue
https://asciinema.org/a/6TZMAMJUSkHsydOm86tyXCXB5
And a proof of concept's code
https://paste.ring0.cc/uxajezuhig
PS
Thanks Trevor for taking over the initiative for tview. I really like the speed improvements together with progress and scrollbars :)
Thanks for reporting this and for the shout-out. I will look into this further when I have time but perhaps this is caused by TexView.Write being goroutine-safe, while TextView.SetText isn't (because it calls TextView.Clear without locking). Wrapping the SetText call with Application.QueueUpdate might resolve this.
I see. I'll try that one too. For now I used such workaround
Will you also try reverting to your original code and switching from civew@master to cview@thread with:
go get gitlab.com/tslocum/cview@thread
And try running the program, and let me know if the crash is resolved? You can then revert back with:
go get gitlab.com/tslocum/cview@master
I've merged the multithreading changes, please let me know if updating to the latest master resolves your issue.
closed