Trying potato guy on a new install of Ubuntu 12.04, ktuberling response is too erratic to be playable. clicking on items to drag there is an erratic delay often a second or more before the word is sounded and item can be dragged Reproducible: Always Steps to Reproduce: 1.click, drag & drop items on to potato guy 2. 3. Actual Results: on clicking item there is a delay before the item name is sounded the item may not be drag-able for a number of seconds. delays are erratic Expected Results: click on item the, the item name should sound as clicked and should be immediately drag-able onto potato guy.
Works here, we have changed nothing in the code so I suspect it's something else changed in the Ubuntu infraestructure (like the graphics driver). Are you using Unity, Unity2d, gnome shell, kde plasma shell, something else? Does running ktuberling --graphicssystem raster from a terminal help?
I am seeing the same behaviour using both Unity and Unity2D. There is an outstanding issue with the nvidia proprietary graphics driver in 12.04 distribution so I am running with Ubuntu drivers (I think it maybe nouveau, do you know how I can check?). I'm monitoring the nvidia bug https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/982485 I tried running the suggested command in terminal, behaviour is still the same, Is the output from the command any help?
Further attempts at the game seem to show that the problem lies in a delay is between clicking an item and the name being sounded. If I hold the click until the sound is played, then the item can be dragged and dropped ok. The delay between the click and the sound is erratic, occasionally near instantaneous but more often is a couple of seconds or more.
Interesting. Which phonon backend are you using? dpkg -l | grep phonon
dpkg -l | grep phonon ii libphonon4 4:4.7.0really4.6.0-0ubuntu1 multimedia framework from KDE - core library ii phonon 4:4.7.0really4.6.0-0ubuntu1 multimedia framework from KDE - metapackage ii phonon-backend-gstreamer 4:4.7.0really4.6.0-0ubuntu1 Phonon GStreamer 0.10.x backend
So everything works fine if you disable sounds?
Haven't tried. How do I disable sounds?
In the Speech menu.
Your hunch seems right, it appears to run fine with no sound option. Are there known issues with the phonon backend ?
Not really, i'm actually using Ubuntu 12.04 too and i have no issues with the phonon backend and actually looking at the code i don't see why waiting for the sound to finish or not should have any effect. I'm afraid without further information (which would basically be me having access to your computer or any other where the problem happens) it's kind of impossible to fix this issue.
Actually i can reproduce it. It is a phonon regression.
Is this also reproducible with the phonon-backend-vlc?
No it is not. Something is fishy with the pgst pipeline, which keeps it busy up until a couple of seconds after playback ended, if one sets a new track in that time frame it locks up the calling thread as the pipeline is still busy doing cleanup or something.
this is random stuff because bugzilla doesn't let me change it back to new
I have installed phonon-backend-vlc package and set as preferred backend before GStreamer. Potato Guy appears to be working fine with this backend.
Thank you all for the fast feedback. Reassigning to the gstreamer backend, then
Turns out for gapless playback a mutex lock was introduced in the aboutToFinish emission to give the frontend time to feed a new track before the old one actually finishes. For short tracks that of course causes an intermediate deadlock (until the waitcondition times out) because the pipeline won't accept a new source while being locked waiting for a new track via setnextsource. That of course is a behavior breakage and major annoyance as it makes simple use cases more complicated, hence for 4.6.1 we'll regress gapless in favor of restoring original behavior for short track playback by removing the mutex. That is of course unless a solution to address both is found in time.
Fixed in 620e8d39793fe4c32e1797f7c4957d04c51e8b23
Verification failed. This only fixes the issue because it breaks the gaplessness entirely (namely skipGapless is always false, thus never actually locking). For 4.6.1 the locking should be removed entirely to prevent corner case hickups, in master we should look into a solution that reintroduces gaplessness and allows lockfree usage. In particular the problem is that a statechange must interrupt the aboutToFinish lock for gapless playback, which is trivial enough to implement. However gstreamer then for some odd reason triggers another callback (supposedly due to the statechange) which then needs to properly time out, those callbacks then apparently pile up and a) let sound get lost b) leave the MO in an undefined state as the function is not particularly reentrant. In ktuberling specifically it calls setSource while we handle abouttofinish, which implicitly calls stop() (libphonon does that) which then triggers the statechange. However, it seems even if the statechange is removed it still at some point tends to pile up callbacks. Not quite sure why. Anyhow, further analysis is needed here as is an immediate fix via 4.6.1.
Should be fixed for 4.6.2 properly now.