Suddenly fatal error: concurrent map read and map write
Kvaz1r opened this issue · 0 comments
Kvaz1r commented
Description
After some time works in editor suddenly get error. I could not notice dependency from amount of successful edits.
Steps to reproduce
Usual work in editor.
Stack trace
fatal error: concurrent map read and map write
goroutine 19 [running]:
runtime.throw(0xb712a7, 0x21)
E:/go/src/runtime/panic.go:605 +0x9c fp=0xc0427dd690 sp=0xc0427dd670 pc=0x42df9c
runtime.mapaccess2_fast64(0xa89620, 0xc042384a20, 0x3, 0x5, 0x1379)
E:/go/src/runtime/hashmap_fast.go:168 +0x1be fp=0xc0427dd6b8 sp=0xc0427dd690 pc=0x40ccfe
github.com/nelsam/vidar/syntax.(*Syntax).add(0xc042320fc0, 0x3, 0x137f, 0x6)
E:/gopath/src/github.com/nelsam/vidar/syntax/layers.go:91 +0x75 fp=0xc0427dd758 sp=0xc0427dd6b8 pc=0x979365
github.com/nelsam/vidar/syntax.(*Syntax).addNode(0xc042320fc0, 0x3, 0xf483e0, 0xc0421a8400)
E:/gopath/src/github.com/nelsam/vidar/syntax/layers.go:115 +0xa9 fp=0xc0427dd798 sp=0xc0427dd758 pc=0x979669
github.com/nelsam/vidar/syntax.(*Syntax).addSelectorExpr(0xc042320fc0, 0xc0421a8420)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:126 +0x79 fp=0xc0427dd7c8 sp=0xc0427dd798 pc=0x9780e9
github.com/nelsam/vidar/syntax.(*Syntax).addIdentTypeExpr(0xc042320fc0, 0xf4b2e0, 0xc0421a8420, 0x5)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:54 +0x903 fp=0xc0427dd828 sp=0xc0427dd7c8 pc=0x977813
github.com/nelsam/vidar/syntax.(*Syntax).addExpr(0xc042320fc0, 0xf4b2e0, 0xc0421a8420)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:19 +0x4f fp=0xc0427dd858 sp=0xc0427dd828 pc=0x976eff
github.com/nelsam/vidar/syntax.(*Syntax).addStarExpr(0xc042320fc0, 0xc0421a8440)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:138 +0x49 fp=0xc0427dd880 sp=0xc0427dd858 pc=0x978289
github.com/nelsam/vidar/syntax.(*Syntax).addIdentTypeExpr(0xc042320fc0, 0xf4b3a0, 0xc0421a8440, 0x4)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:60 +0x9c9 fp=0xc0427dd8e0 sp=0xc0427dd880 pc=0x9778d9
github.com/nelsam/vidar/syntax.(*Syntax).addTypeExpr(0xc042320fc0, 0xf4b3a0, 0xc0421a8440)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:15 +0x4f fp=0xc0427dd910 sp=0xc0427dd8e0 pc=0x976e9f
github.com/nelsam/vidar/syntax.(*Syntax).addArrayType(0xc042320fc0, 0xc042b5f2c0)
E:/gopath/src/github.com/nelsam/vidar/syntax/general.go:58 +0xb0 fp=0xc0427dd958 sp=0xc0427dd910 pc=0x978830
github.com/nelsam/vidar/syntax.(*Syntax).addIdentTypeExpr(0xc042320fc0, 0xf4a960, 0xc042b5f2c0, 0x5)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:28 +0xb7c fp=0xc0427dd9b8 sp=0xc0427dd958 pc=0x977a8c
github.com/nelsam/vidar/syntax.(*Syntax).addExpr(0xc042320fc0, 0xf4a960, 0xc042b5f2c0)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:19 +0x4f fp=0xc0427dd9e8 sp=0xc0427dd9b8 pc=0x976eff
github.com/nelsam/vidar/syntax.(*Syntax).addCallExpr(0xc042320fc0, 0xc0424bb200)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:99 +0xdc fp=0xc0427dda40 sp=0xc0427dd9e8 pc=0x977d6c
github.com/nelsam/vidar/syntax.(*Syntax).addIdentTypeExpr(0xc042320fc0, 0xf4aba0, 0xc0424bb200, 0x5)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:36 +0x832 fp=0xc0427ddaa0 sp=0xc0427dda40 pc=0x977742
github.com/nelsam/vidar/syntax.(*Syntax).addExpr(0xc042320fc0, 0xf4aba0, 0xc0424bb200)
E:/gopath/src/github.com/nelsam/vidar/syntax/expr.go:19 +0x4f fp=0xc0427ddad0 sp=0xc0427ddaa0 pc=0x976eff
github.com/nelsam/vidar/syntax.(*Syntax).addAssignStmt(0xc042320fc0, 0xc0424bb280)
E:/gopath/src/github.com/nelsam/vidar/syntax/stmt.go:76 +0xc1 fp=0xc0427ddb18 sp=0xc0427ddad0 pc=0x97a0f1
github.com/nelsam/vidar/syntax.(*Syntax).addStmt(0xc042320fc0, 0xf4a9a0, 0xc0424bb280)
E:/gopath/src/github.com/nelsam/vidar/syntax/stmt.go:23 +0x4c8 fp=0xc0427ddb60 sp=0xc0427ddb18 pc=0x979dc8
github.com/nelsam/vidar/syntax.(*Syntax).addBlockStmt(0xc042320fc0, 0xc042147020)
E:/gopath/src/github.com/nelsam/vidar/syntax/stmt.go:194 +0xb7 fp=0xc0427ddbb8 sp=0xc0427ddb60 pc=0x97acd7
github.com/nelsam/vidar/syntax.(*Syntax).addFuncDecl(0xc042320fc0, 0xc0421470b0)
E:/gopath/src/github.com/nelsam/vidar/syntax/decl.go:38 +0xa9 fp=0xc0427ddbe8 sp=0xc0427ddbb8 pc=0x976c29
github.com/nelsam/vidar/syntax.(*Syntax).addDecl(0xc042320fc0, 0xf4ae60, 0xc0421470b0)
E:/gopath/src/github.com/nelsam/vidar/syntax/decl.go:19 +0x160 fp=0xc0427ddc30 sp=0xc0427ddbe8 pc=0x976af0
github.com/nelsam/vidar/syntax.(*Syntax).Parse(0xc042320fc0, 0xc04271c500, 0x246b, 0x406521, 0xc042086000)
E:/gopath/src/github.com/nelsam/vidar/syntax/layers.go:63 +0x411 fp=0xc0427ddd60 sp=0xc0427ddc30 pc=0x9790c1
github.com/nelsam/vidar/plugin/gosyntax.(*Highlight).TextChanged(0xc042320ff0, 0xf4c0e0, 0xc0420560a8, 0xf4d460, 0xc042045c00, 0x0, 0x0, 0x0)
E:/gopath/src/github.com/nelsam/vidar/plugin/gosyntax/highlight.go:77 +0x65 fp=0xc0427dde50 sp=0xc0427ddd60 pc=0x97b315
github.com/nelsam/vidar/plugin/gosyntax.(*Highlight).Init(0xc042320ff0, 0xf4d460, 0xc042045c00, 0xc0426b0000, 0x232c, 0x232c)
E:/gopath/src/github.com/nelsam/vidar/plugin/gosyntax/highlight.go:72 +0x79 fp=0xc0427ddea0 sp=0xc0427dde50 pc=0x97b299
github.com/nelsam/vidar/command/input.(*ctxHookReader).init(0xc04249c8c0, 0xf4d460, 0xc042045c00, 0xc0426b0000, 0x232c, 0x232c)
E:/gopath/src/github.com/nelsam/vidar/command/input/context_change_hook.go:50 +0x71 fp=0xc0427ddee0 sp=0xc0427ddea0 pc=0x9104f1
github.com/nelsam/vidar/command/input.(*Handler).Init(0xc042701000, 0xf4d460, 0xc042045c00, 0xc0426b0000, 0x232c, 0x232c)
E:/gopath/src/github.com/nelsam/vidar/command/input/handler.go:104 +0x8e fp=0xc0427ddf38 sp=0xc0427ddee0 pc=0x911c4e
github.com/nelsam/vidar/commander.(*Commander).bindStack.func1()
E:/gopath/src/github.com/nelsam/vidar/commander/commander.go:165 +0xc5 fp=0xc0427ddfb0 sp=0xc0427ddf38 pc=0x8f9155
github.com/nelsam/gxui/drivers/gl.(*driver).applicationLoop(0xc042084730)
E:/gopath/src/github.com/nelsam/gxui/drivers/gl/driver.go:141 +0x2b fp=0xc0427ddfd8 sp=0xc0427ddfb0 pc=0x5d959b
runtime.goexit()
E:/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc0427ddfe0 sp=0xc0427ddfd8 pc=0x4596c1
created by github.com/nelsam/gxui/drivers/gl.StartDriver
E:/gopath/src/github.com/nelsam/gxui/drivers/gl/driver.go:84 +0x3bf
goroutine 1 [syscall, locked to thread]:
github.com/go-gl/glfw/v3.2/glfw._Cfunc_glfwWaitEvents()
github.com/go-gl/glfw/v3.2/glfw/_obj/_cgo_gotypes.go:1954 +0x48
github.com/go-gl/glfw/v3.2/glfw.WaitEvents()
E:/gopath/src/github.com/go-gl/glfw/v3.2/glfw/window.go:795 +0x27
github.com/goxjs/glfw.WaitEvents()
E:/gopath/src/github.com/goxjs/glfw/desktop.go:385 +0x27
github.com/nelsam/gxui/drivers/gl.(*driver).driverLoop(0xc042084730)
E:/gopath/src/github.com/nelsam/gxui/drivers/gl/driver.go:122 +0x54
github.com/nelsam/gxui/drivers/gl.StartDriver(0xb85108, 0xc042073cd8, 0x1, 0x1)
E:/gopath/src/github.com/nelsam/gxui/drivers/gl/driver.go:85 +0x3cd
main.init.0.func1(0xc04219b680, 0xc042043280, 0x1, 0x1)
E:/gopath/src/github.com/nelsam/vidar/main.go:50 +0xac
github.com/spf13/cobra.(*Command).execute(0xc04219b680, 0xc04204e3b0, 0x1, 0x1, 0xc04219b680, 0xc04204e3b0)
E:/gopath/src/github.com/spf13/cobra/command.go:766 +0x2c8
github.com/spf13/cobra.(*Command).ExecuteC(0xc04219b680, 0xc042073f60, 0x98dca8, 0xb3bf40)
E:/gopath/src/github.com/spf13/cobra/command.go:852 +0x33b
github.com/spf13/cobra.(*Command).Execute(0xc04219b680, 0xc042073f70, 0x98f62d)
E:/gopath/src/github.com/spf13/cobra/command.go:800 +0x32
main.main()
E:/gopath/src/github.com/nelsam/vidar/main.go:56 +0x34
...