Describe the Bug
The application crashes with a runtime error: "index out of range [4] with length 4." This happens during map rendering.
Steps to reproduce the behavior:
- no clue. it stopped working after a run from the robot which updated its map
Expected Behavior
The map rendering process should complete successfully without crashing.
Error Log
2024/12/20 02:03:43 [MQTT producer] Connected
2024/12/20 02:03:43 [MQTT consumer] Connected
2024/12/20 02:03:43 [MQTT consumer] Subscribed to map data topic
panic: runtime error: index out of range [4] with length 4
goroutine 1 [running]:
github.com/erkexzcx/valetudopng/pkg/renderer.(*valetudoImage).findFourColors(0x400041a090, {0x400000eb50, 0x4, 0xa?})
/app/pkg/renderer/fourcolortheorem.go:90 +0x1c4
github.com/erkexzcx/valetudopng/pkg/renderer.newValetudoImage(0x40004aa360, 0x40000262e0)
/app/pkg/renderer/drawer.go:78 +0x45c
github.com/erkexzcx/valetudopng/pkg/renderer.(*Renderer).Render(0xc1d15201364a8ac1?, {0x4000538000?, 0x7757c0?, 0x12a05f200?}, 0xfffffffee19e7e69?)
/app/pkg/renderer/renderer.go:66 +0x3c
github.com/erkexzcx/valetudopng/pkg/server.Start(0x400000c0f0)
/app/pkg/server/server.go:68 +0x5fc
main.main()
/app/cmd/valetudopng/main.go:32 +0xd4
JSON
I'll provide it in a private message somewhere, if you tell me how to reach you :)
Describe the Bug
The application crashes with a runtime error: "index out of range [4] with length 4." This happens during map rendering.
Steps to reproduce the behavior:
Expected Behavior
The map rendering process should complete successfully without crashing.
Error Log
JSON
I'll provide it in a private message somewhere, if you tell me how to reach you :)