Closed 13xforever closed 2 years ago
@13xforever I noticed it too just now, will fix.
@13xforever sorry for this. I thought my COVID dumbness was over but it seems I'm still in a bit of a woozy state. This is a very stupid issue I introduced because I thought I was smart while in reality I was pretty stupid.
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Code of Conduct
What happened?
Today I have updated to 7.8.0 and now I have random exceptions.
fatal error: concurrent map writes
``` System.Management.Automation.RemoteException goroutine 20 [running]: runtime.throw({0x7f71b6, 0xc0002cc090}) /opt/hostedtoolcache/go/1.17.6/x64/src/runtime/panic.go:1198 +0x76 fp=0xc0002bfcb0 sp=0xc0002bfc80 pc=0x236df6 runtime.mapassign_faststr(0xc00028c110, 0x1e, {0xc0002cc090, 0xf}) /opt/hostedtoolcache/go/1.17.6/x64/src/runtime/map_faststr.go:211 +0x39c fp=0xc0002bfd18 sp=0xc0002bfcb0 pc=0x2132fc oh-my-posh/environment.(*ShellEnvironment).TemplateCache(0xc00005cd20) /home/runner/work/oh-my-posh/oh-my-posh/src/environment/shell.go:618 +0x2ee fp=0xc0002bfe18 sp=0xc0002bfd18 pc=0x4f86ce oh-my-posh/template.(*Context).init(...) /home/runner/work/oh-my-posh/oh-my-posh/src/template/text.go:36 oh-my-posh/template.(*Text).Render(0xc0002bfef8) /home/runner/work/oh-my-posh/oh-my-posh/src/template/text.go:49 +0x1b6 fp=0xc0002bfec8 sp=0xc0002bfe18 pc=0x55e456 oh-my-posh/engine.(*Segment).string(0xc0000e0600) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:285 +0x106 fp=0xc0002bff38 sp=0xc0002bfec8 pc=0x7009e6 oh-my-posh/engine.(*Segment).renderText(0xc0000e0600, {0x8d2080, 0xc00005cd20}) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:309 +0xb0 fp=0xc0002bff80 sp=0xc0002bff38 pc=0x700ad0 oh-my-posh/engine.(*Block).renderSegmentsText.func1(0x0) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:90 +0x65 fp=0xc0002bffc8 sp=0xc0002bff80 pc=0x6f3be5 oh-my-posh/engine.(*Block).renderSegmentsText·dwrap·2() /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:91 +0x2d fp=0xc0002bffe0 sp=0xc0002bffc8 pc=0x6f3b4d runtime.goexit() /opt/hostedtoolcache/go/1.17.6/x64/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0002bffe8 sp=0xc0002bffe0 pc=0x264681 created by oh-my-posh/engine.(*Block).renderSegmentsText /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:88 +0x9d System.Management.Automation.RemoteException goroutine 1 [semacquire]: sync.runtime_Semacquire(0x241720) /opt/hostedtoolcache/go/1.17.6/x64/src/runtime/sema.go:56 +0x25 sync.(*WaitGroup).Wait(0x6f39dd) /opt/hostedtoolcache/go/1.17.6/x64/src/sync/waitgroup.go:130 +0x71 oh-my-posh/engine.(*Block).renderSegmentsText(0xc0000960b0) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:93 +0x199 oh-my-posh/engine.(*Engine).renderBlock(0xc000115de0, 0xc0000960b0) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/engine.go:86 +0x126 oh-my-posh/engine.(*Engine).Render(0xc000115de0) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/engine.go:60 +0x47 main.main() /home/runner/work/oh-my-posh/oh-my-posh/src/main.go:220 +0xe8a System.Management.Automation.RemoteException goroutine 18 [runnable]: oh-my-posh/environment.(*ShellEnvironment).TemplateCache(0xc00005cd20) /home/runner/work/oh-my-posh/oh-my-posh/src/environment/shell.go:618 +0x2ee oh-my-posh/template.(*Context).init(...) /home/runner/work/oh-my-posh/oh-my-posh/src/template/text.go:36 oh-my-posh/template.(*Text).Render(0xc00006fef8) /home/runner/work/oh-my-posh/oh-my-posh/src/template/text.go:49 +0x1b6 oh-my-posh/engine.(*Segment).string(0xc0000e0200) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:285 +0x106 oh-my-posh/engine.(*Segment).renderText(0xc0000e0200, {0x8d2080, 0xc00005cd20}) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:309 +0xb0 oh-my-posh/engine.(*Block).renderSegmentsText.func1(0x0) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:90 +0x65 created by oh-my-posh/engine.(*Block).renderSegmentsText /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:88 +0x9d System.Management.Automation.RemoteException goroutine 21 [runnable, locked to thread]: syscall.Syscall9(0x7ff86ca82ed0, 0x7, 0xc000506000, 0x0, 0x0, 0x0, 0x3, 0x2000000, 0x0, 0x0, ...) /opt/hostedtoolcache/go/1.17.6/x64/src/runtime/syscall_windows.go:510 +0xdb syscall.CreateFile(0xc000506000, 0x0, 0x0, 0x0, 0x3, 0x2000000, 0x0) /opt/hostedtoolcache/go/1.17.6/x64/src/syscall/zsyscall_windows.go:507 +0xd9 os.stat({0x7eb34e, 0x4}, {0xc000502000, 0x58}, 0xbc5a0) /opt/hostedtoolcache/go/1.17.6/x64/src/os/stat_windows.go:94 +0x49d os.statNolog(...) /opt/hostedtoolcache/go/1.17.6/x64/src/os/stat_windows.go:106 os.Stat({0xc000502000, 0x58}) /opt/hostedtoolcache/go/1.17.6/x64/src/os/stat.go:13 +0x45 os/exec.chkStat({0xc000502000, 0xc0000bc5a0}) /opt/hostedtoolcache/go/1.17.6/x64/src/os/exec/lp_windows.go:19 +0x1e os/exec.findExecutable({0xc0000bc5a0, 0x54}, {0xc0000e1700, 0xc, 0x0}) /opt/hostedtoolcache/go/1.17.6/x64/src/os/exec/lp_windows.go:47 +0xd4 os/exec.LookPath({0x7ed334, 0x7ed334}) /opt/hostedtoolcache/go/1.17.6/x64/src/os/exec/lp_windows.go:89 +0x41e oh-my-posh/environment.(*ShellEnvironment).HasCommand(0xc00005cd20, {0x7ed334, 0x7}) /home/runner/work/oh-my-posh/oh-my-posh/src/environment/shell.go:415 +0x125 oh-my-posh/segments.(*Git).shouldDisplay(0xc0000ea5a0) /home/runner/work/oh-my-posh/oh-my-posh/src/segments/git.go:145 +0x72 oh-my-posh/segments.(*Git).Enabled(0xc0000ea5a0) /home/runner/work/oh-my-posh/oh-my-posh/src/segments/git.go:115 +0x25 oh-my-posh/engine.(*Segment).renderText(0xc0000e0800, {0x8d2080, 0xc00005cd20}) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/segment.go:308 +0xa2 oh-my-posh/engine.(*Block).renderSegmentsText.func1(0x0) /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:90 +0x65 created by oh-my-posh/engine.(*Block).renderSegmentsText /home/runner/work/oh-my-posh/oh-my-posh/src/engine/block.go:88 +0x9d ```Theme
I use my own theme
```json { "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { "alignment": "left", "segments": [ { "background": "#0077c2", "foreground": "#ffffff", "leading_diamond": "╭─", "properties": {}, "style": "diamond", "trailing_diamond": "", "type": "shell" }, { "background": "#ef5350", "foreground": "#FFFB38", "leading_diamond": "", "properties": { "prefix": "The only suspicious seciton I could think of is the exit code formatting
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output