onlaj / Piano-LED-Visualizer

Piano LED Visualizer: Connect an LED strip to your Raspberry Pi and create an immersive visual experience for your piano playing
MIT License
513 stars 111 forks source link

Troubleshooting visualizer thread freezing issues #377

Open sreich opened 2 years ago

sreich commented 2 years ago

I'm experiencing after a bit of playing, there is some lock ups that happen on the visualizer

My concerns here, there don't seem to be any mechanisms for logging or to basically see what was going through its head beforehand. I don't know if the midi events are still being passed (logging facility for this would be helpful), we should probably get logging added here.

I'm passing through rtpmidid so that adds another layer that makes it trickier

visualizer.py was still running but I noticed the LEDs were locked up. Then I checked the web page on it and it was unable to respond. Restarting the visualizer service resolves all of it...this seems to happen rather frequently. I've already had it happen 3 times b/w today and last night

I haven't dived deep into it, so I don't know if you've got some kind of queueing or threading that could end up getting deadlocked especially between the backend and the frontend.

journalctl logs don't indicate anything bad. Can you explain the architecture or thoughts on debugging this? I'm not sure if you've got utilities. I've never attempted remote debugging with python, dunno how feasible it is