milkytracker/MilkyTracker

Playback animations only update on mouse move

rdebeasi opened this issue ยท 8 comments

When I play a song, the scroll position and scopes don't update unless I move the mouse. The audio playback works fine. I'm on Fedora 36 and am using the rpm package of MilkyTracker from fedoraproject.org.

Screencast.from.10-10-2022.06.41.57.PM.webm

If there's anything that I can do to help troubleshoot, just let me know. Thank you!! ๐Ÿ˜„

@rdebeasi I don't have a Linux available, so it's hard to say what's going on. The refresh is triggered by a timer event that is raised from SDL_Main.cpp (line 683). Any chance you can compile from the sources and put a printf statement in order to see if this event is properly triggered periodically?

Thanks for taking a look! I added a printf on that line, and it looks like the event is only triggered when I move the mouse.

case SDLUserEventTimer:
  {
    printf("\nSDLUserEventTimer is happening!!");
    timestamp();

I'm not very good at C++, so I borrowed this timestamp function from Stack Overflow. ๐Ÿ˜…

Screencast.from.10-25-2022.08.57.27.PM.webm

Thanks for taking a look! I added a printf on that line, and it looks like the event is only triggered when I move the mouse.

case SDLUserEventTimer:
  {
    printf("\nSDLUserEventTimer is happening!!");
    timestamp();

I'm not very good at C++, so I borrowed this timestamp function from Stack Overflow. ๐Ÿ˜…

Screencast.from.10-25-2022.08.57.27.PM.webm

This is very weird behaviour. But since we are using the SDL library to generate those continuous events (which in turn refresh the screen when it's playing) could it be a problem inside SDL? But nobody ever complained about this. I looked closer into the code, can you move the timestamp log function here before the if statement:

if (!myTrackerScreen || !myTracker || !ticking)

If this is not continuously outputting a log statement, the timer is basically broken.

I'll take a look and let you know what I find!

I wonder if this is a Wayland compatibility issue. Looks like SDL released stable Wayland support in summer 2021: https://www.gamingonlinux.com/2021/08/sdl-version-2016-is-out-now-with-much-improved-wayland-support/

I added the timestamp before that line, and it does continuously output a log statement.

Side note: I have SDL 2.24.0 installed, so the issue is probably not related to an old version of SDL.

Yeah, so this confirms that the SDL timer is working. Must be more like a bug on our side then. Maybe next week I'll find the time to setup a VM running Fedora 36 to take a closer look.

I updated to Fedora 37, and this problem no longer occurs. Would you like me to close this issue?

I updated to Fedora 37, and this problem no longer occurs. Would you like me to close this issue?

Thanks for reporting back. I'm currently doing Linux related stuff for work, so I was really about to look into this issue, but I'm glad it solved itself.