Simply-Love-SM5 icon indicating copy to clipboard operation
Simply-Love-SM5 copied to clipboard

SSM song search broken on latest outfox 0.4.14

Open fireandice1989 opened this issue 2 years ago • 3 comments

I noticed that when searching for a song that the game becomes unresponsive and needs to be force closed

I'm using the beta branch on lubuntu linux

fireandice1989 avatar Apr 01 '22 18:04 fireandice1989

I was having this issue too. This is present in 0.4.14.1 as well. It appears to be a race condition with the engine switching I/O handling (Jose Varela on OF discord).

In: ~/BGAnimations/ScreenSelectMusic overlay/SongSearch/default.lua

line 21: you can increase the sleep command slightly to compensate for the above. I think this is an issue with larger music libraries where loading the search results takes longer than the sleep value.

Horsey- avatar Apr 12 '22 16:04 Horsey-

Do I understand correctly that this is an engine issue? Is there an event message that can be used instead of using a random sleep?

cc @JoseVarelaP

natano avatar Apr 13 '22 19:04 natano

I'm still doubting its the engine (We haven't touched this section of Input at all). May I ask why does the search function have to wait a specific amount of time before giving input to the user to scroll through the results? I feel this may be the reason why.

https://github.com/Simply-Love/Simply-Love-SM5/blob/5bfda3c0edfd900e23476a4750bb9804b8a75683/BGAnimations/ScreenSelectMusic%20overlay/SongSearch/default.lua#L17-L22

I was even able to get the wheel to continuously move during this window of time as I just wanted to scroll through the results. There shouldn't be a sleep, it should already give input to the player when the results have already been processed. From what I can tell, the Broadcaster being sent to give input is also sending over the results, so candidatesScroller comes to build the wheel, however with both of them being on the same message command (and both of them not being queuecommands), which one will end faster?

https://user-images.githubusercontent.com/23246027/163273768-4f38f399-d063-4174-a3e4-7d45e043b3c6.mp4

As for why the InputHandler is not responding, I have no clue yet. However it is being loaded, but it could be because of this wait time, the candidatesScroller it has obtained when the lua file was created was still empty or hasn't initialized.

JoseVarelaP avatar Apr 13 '22 21:04 JoseVarelaP