masghar / yet-another-music-application

Automatically exported from code.google.com/p/yet-another-music-application
0 stars 0 forks source link

Overloading Stoffi with keyboard commands causes it to hang and must be force quit #329

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open Stoffi and press Fn + Right.
2. Hold down those two keys.
3.

What should have happened?
Don't attempt to process every user command when it comes to placing load on 
Stoffi, such as loading a new song. 

I know that this type of stress testing can be handled gracefully, as fb2k can 
handle it. If I stress fb2k in the same way, it seems to only accept a single 
new input when the UI is completely ready to take action on that keystroke. I 
might be sending 100s of requests for next song, but as soon as I let go of the 
keys, fb2k stops and plays the last song which it registers as next. It is as 
if there is some logic that says, I am busy right now, so I am ignoring this 
request. I will not keep this request for later. When I am ready, I will 
process the next request.

I hope that you can find a way for Stoffi to handle this punishment too. 

What happened instead?
Stoffi hangs and does not recover.

Can you give us any additional information that could be useful in fixing
this bug?

What release of Stoffi are you using (Xia or Shang)?
Zhou

If you are using alpha or beta, please state which:
Beta Three

Original issue reported on code.google.com by wic...@gmail.com on 22 Apr 2012 at 7:00

GoogleCodeExporter commented 9 years ago
After this stress test, Stoffi would not open at all.

I have attached the user.config from that moment.

Once user.config was moved and a new one created Stoffi opened up again as 
normal.

Original comment by wic...@gmail.com on 22 Apr 2012 at 7:09

Attachments:

GoogleCodeExporter commented 9 years ago
I could not get it to not startup using your config file.

But if I understand you correctly Fn+Right is the same as "media next"?

As it is now it will try to play each song, which is pretty intense if it's 
done several times a second.

I will try to solve it this way:
Holding down keys which correspond to next or previous will only jump to the 
next track. Only when those keys are released will playback start.

Original comment by christof...@stoffiplayer.com on 23 Apr 2012 at 10:18

GoogleCodeExporter commented 9 years ago
Fn+Right = Media Next, Yes.

Thank you, but please remember that you should consider this as a partial 
solution.

Holding down keys is just one example. A user could click next/previous by 
muscle twitch clicking (super fast mouse clicking) Next in the main UI. This 
will also kill Stoffi, it will just take longer.

Some people just do this for the fun of it, to see if they can break a program 
by overloading it.

Original comment by wic...@gmail.com on 24 Apr 2012 at 6:32

GoogleCodeExporter commented 9 years ago
Unfortunately I cannot just say: I'm busy and won't accept input. Howerver, I 
can say: I'm changing track and won't change track. Maybe that'll do?

Original comment by christof...@stoffiplayer.com on 24 Apr 2012 at 7:25

GoogleCodeExporter commented 9 years ago
Please do your best, I know you will.

I will try and break it again after you have made this change :)

Original comment by wic...@gmail.com on 24 Apr 2012 at 7:56

GoogleCodeExporter commented 9 years ago
The best I could do right now was to delay the tray balloon and adding the 
track to history and the jumplist recent category. Now it will wait a short 
delay before doing those two operations, so if you hold down the next key (or 
press very fast) it will not try to add every single track to history and show 
a balloon every single time. Only when you stop pressing and wait 1-2 seconds 
will that happen.

This may ease the burden a little bit (since this is UI intensive tasks) but it 
still only performs around 2 tracks per second for me with this new setup.

I could try to delay the playback in Qin by around 200-500 ms (so it won't be 
noticed when you just click normally).

Btw, it never hangs for me. It just goes through the list pretty slowly (like 
1-2 tracks per second). I've been holding down the key for about 1 minute 
without any noticable slowdown of neither Stoffi nor the computer itself. Just 
a note.

Original comment by christof...@stoffiplayer.com on 24 Apr 2012 at 12:20

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1057.

Added delay+batching in MainWindow event handlers for TrackSwitched and 
LoadedTrack from MediaManager

Original comment by christof...@stoffiplayer.com on 24 Apr 2012 at 12:22

GoogleCodeExporter commented 9 years ago
Does it still exist?

I think I've done everything I can with my current level of knowledge. I will 
either close this or put it into "future" pile.

Original comment by christof...@stoffiplayer.com on 21 Jun 2012 at 12:18

GoogleCodeExporter commented 9 years ago

Original comment by ephracis on 18 Sep 2012 at 12:49