rjkroege / edwood

Go version of Plan9 Acme Editor
Other
380 stars 34 forks source link

Occasional crash #469

Open paul-lalonde opened 1 year ago

paul-lalonde commented 1 year ago

Stack trace: goroutine 363 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x65 runtime/debug.PrintStack() /usr/local/go/src/runtime/debug/stack.go:16 +0x19 main.(cmdParser).atnl(0xc000190340?) /Users/flux/dev/edwood/edit.go:328 +0x9c main.(cmdParser).collecttext(0xc000190340) /Users/flux/dev/edwood/edit.go:430 +0x166 main.(cmdParser).parse(0xc000190340, 0x0) /Users/flux/dev/edwood/edit.go:535 +0x579 main.(cmdParser).parse(0xc000190340, 0x0) /Users/flux/dev/edwood/edit.go:526 +0x6bf main.editthread(0x6500000070?) /Users/flux/dev/edwood/edit.go:155 +0x2b created by main.editcmd /Users/flux/dev/edwood/edit.go:229 +0x2fa panic: runtime error: slice bounds out of range [9753:0]

Was in win, did a git command that pokes edwood via the E edit command, and poof. The file being opened was only 1628 characters, so that's likely not it. I do, however, have a Watch window going which refreshes furiously, all the time, and is the source of most of my crashes, I think.

rjkroege commented 1 year ago

There are a number of races when filesystem access is updating file.Buffer contents at the same time as edit operations happen. This trace doesn't seem to fit that though.