An issue in the Wayland environment?
I'm using vispy 0.14.3, python 3.12.5, sway 1.9-1, fedora 6.10.6-200.fc40.x86_64.
The issue occurs when I use scene.Markers().
I use two scene.Markers() objects: one to display real-time data for the current minute and the other to show previous data.
The problem arises when I turn off my laptop screen (output * dpms off) and turn it back on after several hours—the Python script crashes.
I believe the following factors may be related to the issue:
1.At the time of the crash today, there were almost 2 million markers on the canvas. The script doesn't crash when fewer markers are displayed. 2.When I turn the screen back on and the script doesn't crash, all markers are displayed at once (regardless of their number). For example, if I turn off the screen at noon and turn it on three hours later, the canvas first shows the old data (from noon), then updates to the current data after a few seconds. 3.If I don't turn off the screen, the issue never occurs, and real-time data is displayed without problems.
I'm not sure whether this issue is related to the Wayland environment (Sway) or if it can be addressed within Vispy.
Has anyone experienced this problem?
Can you provide a small reproducible example? Can you make a script that simply adds a lot of markers quicker and triggers the issue?
I vispy in wayland regularly, and never had this kind of issue, but I also don't typically leave it running in the background with the screen off.
This doesn't sound like a wayland-specific issue to me. Which vispy backend are you using?
My first guess is to try adding a periodic canvas.context.flush or canvas.context.finish() to clear out the command queue? I think it otherwise only gets cleared when there is a native paint event that actually draws.