olekukonko / tablewriter

ASCII table in golang
MIT License
4.31k stars 368 forks source link

fatal error: concurrent map writes #201

Open huyuan1999 opened 2 years ago

huyuan1999 commented 2 years ago

fatal error: concurrent map writes

goroutine 2208 [running]: runtime.throw({0x12adfb9, 0xc00001a8d0}) /usr/local/go/src/runtime/panic.go:1198 +0x71 fp=0xc0002cdac8 sp=0xc0002cda98 pc=0x1033cf1 runtime.mapassign_fast64(0x126a340, 0xc00007cf30, 0x22c) /usr/local/go/src/runtime/map_fast64.go:101 +0x2c5 fp=0xc0002cdb00 sp=0xc0002cdac8 pc=0x1012545 github.com/olekukonko/tablewriter.(Table).parseDimension(0xc000168000, {0x12a9cd9, 0x0}, 0x44, 0x0) /Users/huyuan/go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:963 +0x29b fp=0xc0002cdbe8 sp=0xc0002cdb00 pc=0x10da25b github.com/olekukonko/tablewriter.(Table).Append(0xc000168000, {0xc0002cdd60, 0x3, 0x0}) /Users/huyuan/go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:319 +0x17e fp=0xc0002cdc80 sp=0xc0002cdbe8 pc=0x10d673e loadrunner/exocr.(*ExOCR).General.func1(0xc000272000) /Users/huyuan/Desktop/代码/golang/loadrunner/exocr/exocr.go:47 +0x67c fp=0xc0002cdfc8 sp=0xc0002cdc80 pc=0x124207c loadrunner/utils.Runner·dwrap·1() /Users/huyuan/Desktop/代码/golang/loadrunner/utils/concurrent.go:18 +0x2d fp=0xc0002cdfe0 sp=0xc0002cdfc8 pc=0x12411cd runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0002cdfe8 sp=0xc0002cdfe0 pc=0x1063261 created by loadrunner/utils.Runner /Users/huyuan/Desktop/代码/golang/loadrunner/utils/concurrent.go:18 +0x85

WeChatfd26a129e4d68e6502b0cc52860791fb

Code

WeChatf232889be7be10debbb35b7971634efd

:

WeChat05776c727cae2ae83cdd93945892ab0c
jortiz98 commented 2 years ago

https://pkg.go.dev/sync#Mutex