Ticket #8289 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

Bounce performs terribly, and no audio

Reported by: pgf Owned by: dsd
Priority: normal Milestone: 8.2.0 (was Update.2)
Component: bounce-activity Version: not specified
Keywords: joyride-2390:+ Cc: dsd, wadeb, joe
Action Needed: test in release Verified: no
Deployments affected: Blocked By:
Blocking:

Description (last modified by cscott) (diff)

in recent joyrides (e.g. 2363), Bounce performs very poorly. the screen flickers/chops badly. in addition, there is no audio from the game.

Bounce works correctly in joyride 2212.

Attachments

bounce.patch (1.5 kB) - added by cscott 6 years ago.
Don't busy-wait in Bounce
stat.os13 (1.9 kB) - added by mikus 4 years ago.
bounce-7 running on os13
stat.os118 (2.0 kB) - added by mikus 4 years ago.
bounce-7 running on os118

Change History

follow-up: ↓ 2   Changed 6 years ago by cscott

  • description modified (diff)

Bounce *looks* (no X bug) fine in joyride-2346, but no audio. (C1, Q2E15)

(Audio was supposed to be fixed in joyride-2263 by the re-addition of SDL_mixer)

in reply to: ↑ 1   Changed 6 years ago by pgf

Replying to cscott:

Bounce *looks* (no X bug) fine in joyride-2346, but no audio. (C1, Q2E15) (Audio was supposed to be fixed in joyride-2263 by the re-addition of SDL_mixer)

but having just installed 2263 (as a start to bisecting), i get no audio.

  Changed 6 years ago by cscott

X performance is bad in joyride-2369, which puts dsd on the hook, since his X packages landed between 2346 and 2369.

Sound doesn't work in 2369; I'm going to have to work harder to find where that regressed. As pgf noted, it was working in 2212.

  Changed 6 years ago by dsd

  • cc dsd added

Bounce performance regresses in xorg-x11-server-Xorg-1.4.99.906-2.olpc3.2 which is when the eToys rendering fix was added. But apparently Bounce has some questionable busy-wait semantics. I'll do a quick test with the rendering fix that went upstream, just in case...

  Changed 6 years ago by dsd

  • owner set to dsd
  • next_action changed from never set to test in build
  • milestone changed from Not Triaged to 8.2.0 (was Update.2)

Yay, that worked. fixed in xorg-x11-server-1.4.99.906-2.olpc3.4

  Changed 6 years ago by cscott

Sound doesn't work for me in 2212 either; something weird is going on.

Attached is a patch which fixes the busy wait problem; it also fixes the bad X performance.

Changed 6 years ago by cscott

Don't busy-wait in Bounce

  Changed 6 years ago by pgf

  • cc wadeb added

adding wadeb to cc:

  Changed 6 years ago by cscott

Hmm, we still need to figure out why sound isn't working, too.

  Changed 6 years ago by wadeb

Bounce uses pygame.mixer for sound. Are other PyGame based games getting sound?

There *is* a workaround for sporadic frame rate hitching present in Bounce. The workaround is that Bounce takes over the event loop and dispatches events itself, doing its rendering and per-frame processing in the event loop. Without it, the game pauses briefly every 5 seconds or so.

I am currently without a development XO and have been trying to get my virtual machine set up the past few days but no luck - I'm getting an obscure error when launching an image in VMware 6.5 and I haven't had much time to dedicate to it.

  Changed 6 years ago by tvoverbeek

The fix in xorg-x11-server-1.4.99.906-2.olpc3.4 seems to do the trick. Bounce is playable again in joyride-2387, but still no sound. Something with the reintroduced pygame.mixer and SDL_mixer? Also dsd's Bridge (which uses pygame.mixer) has no sound in recent joyrides. Bridge works fine with sound in Update.1-708

Seems there are more sound problems in 2387. TamTamMini sound has also disappeared. Worked in previous joyrides.

  Changed 6 years ago by tvoverbeek

Correction on the sound in 2387. After a idle suspend/resume cycle sounds works again in TamTamMini. Also in TuxPaint (which uses SDL_mixer) sound is working again after the idle suspend/resume.

  Changed 6 years ago by cscott

wadeb: do you have a problem with my applying the above patch to Bounce and putting an updated version on the activities page? Bounce works much better (and batteries last longer) if you don't busy-wait between frames.

  Changed 6 years ago by dsd

  • keywords joyride-2390:+ added
  • next_action changed from test in build to approve for release

Please include xorg-x11-server-1.4.99.906-2.olpc3.4 in stable build

|TestCase|

Run bounce, check that it's not ridiculously laggy

Changelog: * Fix bounce slow rendering problem

  Changed 6 years ago by mstone

  • next_action changed from approve for release to add to release

  Changed 6 years ago by cscott

  • next_action changed from add to release to test in release

xorg-x11-server-1.4.99.906-2.olpc3.4 committed to stable repo: http://mock.laptop.org/gitweb/gitweb.cgi?p=repos;a=commitdiff;h=ccc53cbeece4bc280a7f0ccf6c9f3523938a0d65

Should be in 759 and later. Please test.

Created #8307 to cover the sound portion of this issue, so this ticket can be closed once the X performance issue is verified fixed.

  Changed 6 years ago by cscott

I also released Bounce-6, which removed the busy-waiting -- killing this bird with *two* stones.

  Changed 6 years ago by joe

  • cc joe added

Tested in 8.2-759 - performance is OK, but no sound.

  Changed 6 years ago by gnu

marcopg reports in IRC that Bounce works with sound, if Rainbow is turned off, or if the preload hack is turned off.

  Changed 6 years ago by garycmartin

Tested in 8.2-765 - performance is fine, and I finally hear sound for the first time - makes the game much more playable!

  Changed 5 years ago by cjl

  • component changed from not assigned to bounce-activity

  Changed 4 years ago by mikus

Tested with F11 - cscott's patch is included in Activity; sound is fine.

  Changed 4 years ago by cjl

Given the reports by garymartin and mikus, is it possible to close this ticket as fixed?

  Changed 4 years ago by mikus

At this instant, could not get Bounce to launch on 802B5 - so couldn't see it running on F9 to compare against.

On F11 (both on os13 and on os118), Bounce-7 runs with respectable speed and with audio. On both systems, the representation of the cursor still flickers horribly. [Note: on the XO-1.5, the audio "beep" is accompanied by a "rough buzz" (presumably unwanted).]

[I typically have my systems set up to dim, then blank - but not suspend. It was interesting that the CPU load of Bounce was not enough to prevent the screens from dimming - as I write this, Bounce is still "demoing" - but on completely black screens.]

Given that #8289 was written against Joyride, and that very few people nowadays run Joyride, I think this ticket can be safely closed.

  Changed 4 years ago by pgf

  • status changed from new to closed
  • resolution set to fixed

if you run "vmstat 1 10" in Terminal or on a VT while bounce is running, could you let me know what the values in the second-to-last ("id", stands for 'idle') column are? just roughly is good enough. exclude the first row of data -- that's almost always uninteresting.

closing ticket in any case, on mikus' recommendation.

Changed 4 years ago by mikus

bounce-7 running on os13

Changed 4 years ago by mikus

bounce-7 running on os118

Note: See TracTickets for help on using tickets.