Closed splace closed 6 years ago
Suggest you avoid using goroutines - Termloop makes no guarantees about being thread-safe.
On 29 Apr 2017, 01:43 +0100, simon place notifications@github.com, wrote:
i have a program that changes to some text's position, from a go routine, and occasionally i get this crash;
panic: runtime error: index out of range
goroutine 1 [running]: github.com/JoelOtter/termloop.(Text).Draw(0xc420014500, 0xc420092000) /home/simon/gocode/src/github.com/JoelOtter/termloop/text.go:39 +0xdd github.com/JoelOtter/termloop.(Screen).Draw(0xc420092000) /home/simon/gocode/src/github.com/JoelOtter/termloop/screen.go:54 +0xb9 github.com/JoelOtter/termloop.(*Game).Start(0xc420012510) /home/simon/gocode/src/github.com/JoelOtter/termloop/game.go:115 +0x3f9 main.main() /home/simon/Dropbox/github/working/moving/text.go:31 +0xfa
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/JoelOtter/termloop/issues/38), or mute the thread (https://github.com/notifications/unsubscribe-auth/ACoyLGf__4sXoQ4rx-x2i1_CJtlZRTRHks5r0ofBgaJpZM4NMGMC).
i have a program that changes some text's position, from a go routine, and occasionally i get this crash;
panic: runtime error: index out of range
goroutine 1 [running]: github.com/JoelOtter/termloop.(Text).Draw(0xc420014500, 0xc420092000) /home/simon/gocode/src/github.com/JoelOtter/termloop/text.go:39 +0xdd github.com/JoelOtter/termloop.(Screen).Draw(0xc420092000) /home/simon/gocode/src/github.com/JoelOtter/termloop/screen.go:54 +0xb9 github.com/JoelOtter/termloop.(*Game).Start(0xc420012510) /home/simon/gocode/src/github.com/JoelOtter/termloop/game.go:115 +0x3f9 main.main() /home/simon/Dropbox/github/working/moving/text.go:31 +0xfa
code.....