Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes while trying to render the Image #15

Open
PeeK1e opened this issue Dec 20, 2024 · 0 comments
Open

Crashes while trying to render the Image #15

PeeK1e opened this issue Dec 20, 2024 · 0 comments
Assignees

Comments

@PeeK1e
Copy link

PeeK1e commented Dec 20, 2024

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:

  1. 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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants