Open
Description
Checklist
- I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
- This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
Rarely, using RichText I see this crash at startup while using develop. Some locks were removed for 2.6, but this seems to have resulted in a race condition on this map.
fatal error: concurrent map writes
goroutine 1 [running, locked to thread]:
internal/runtime/maps.fatal({0x143c971?, 0x16121a0?})
/usr/lib/go/src/runtime/panic.go:1058 +0x18
fyne.io/fyne/v2/widget.(*RichText).cachedSegmentVisual(0xc0047ab080, {0x1610980, 0xc0002f3c00}, 0x0)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/widget/richtext.go:218 +0x197
fyne.io/fyne/v2/widget.(*textRenderer).Refresh(0xc004689720)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/widget/richtext.go:693 +0x711
fyne.io/fyne/v2/widget.(*RichText).CreateRenderer(0xc0047ab080)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/widget/richtext.go:83 +0x29d
fyne.io/fyne/v2/internal/cache.Renderer({0x1614a30, 0xc0047ab080})
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/internal/cache/widget.go:20 +0x46
fyne.io/fyne/v2/widget.(*BaseWidget).Refresh(0xc0047ab080?)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/widget/widget.go:123 +0x49
fyne.io/fyne/v2/widget.(*RichText).Refresh(0xc0047ab080)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/widget/richtext.go:111 +0x7d
github.com/hkparker/bounce/ui.(*typingIndicatorRenderer).Refresh(0xc000092778)
/home/hayden/Development/Go/src/github.com/hkparker/bounce/ui/typing_indicator.go:269 +0x45b
fyne.io/fyne/v2/widget.(*BaseWidget).Refresh(0xc0047aafd0?)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/widget/widget.go:123 +0x52
github.com/hkparker/bounce/ui.(*threadButtonRenderer).Refresh(0xc000092758)
/home/hayden/Development/Go/src/github.com/hkparker/bounce/ui/thread_button.go:525 +0x3dc
fyne.io/fyne/v2/widget.(*BaseWidget).Refresh(0xc0047aaf20?)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/widget/widget.go:123 +0x52
github.com/hkparker/bounce/ui.newThreadButton.func1()
/home/hayden/Development/Go/src/github.com/hkparker/bounce/ui/thread_button.go:196 +0x1dd
fyne.io/fyne/v2/data/binding.(*listener).DataChanged(0xc0001fe310?)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/data/binding/binding.go:58 +0x12
fyne.io/fyne/v2/data/binding.(*item[...]).AddListener.(*base).AddListener.func1()
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/data/binding/binding.go:71 +0xbe
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).runGL(0xc00039c200?)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/internal/driver/glfw/loop.go:133 +0x185
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run(0xc000542370)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/internal/driver/glfw/driver.go:162 +0x72
fyne.io/fyne/v2/app.(*fyneApp).Run(0xc000542420)
/home/hayden/Development/Go/pkg/mod/fyne.io/fyne/v2@v2.6.0-beta1.0.20250330210720-ecaa745b72dc/app/app.go:77 +0x102
github.com/hkparker/bounce/ui.(*Fyne).Run(0xc00039ce90?)
/home/hayden/Development/Go/src/github.com/hkparker/bounce/ui/fyne.go:279 +0x1b
github.com/hkparker/bounce/chat.Start({0x1611418, 0xc000193320}, {0x161f928, 0xc000005808})
/home/hayden/Development/Go/src/github.com/hkparker/bounce/chat/chat.go:152 +0x1322
main.main()
/home/hayden/Development/Go/src/github.com/hkparker/bounce/main.go:10 +0x46
How to reproduce
I don't yet have a way to do it reliably
Screenshots
No response
Example code
TBD
Fyne version
develop
Go compiler version
go1.24.1 linux/amd64
Operating system and version
Arch Linux
Additional Information
No response