[haiku-bugs] Re: [Haiku] #12305: MediaPlayer does not quit

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Mon, 21 Sep 2015 19:56:18 -0000

#12305: MediaPlayer does not quit
----------------------------------------+----------------------------
Reporter: vidrep | Owner: Barrett
Type: bug | Status: assigned
Priority: normal | Milestone: R1
Component: Applications/MediaPlayer | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
----------------------------------------+----------------------------

Comment (by ttcoder):

I think I've (accidentally) found an easy way to reproduce this in a
deterministic way. This is likely similar to what you've found out, Dario,
but here it is just in case: if one forgets to `delete` a BSoundPlayer
before quitting the app, thus leaving it to resource tracking/deleting to
take care of it, the system waits until sound playback completion.

In other words, write a simple app that does `new BSoundPlayer(..)` and
`new BMediaFile(..)` on an mp3 song, do all the connecting between them
and Start(), then send yourself B_QUIT_REQUESTED without cleanly stopping
the mp3 and boom. The app disappears from the deskbar, but not from the
team listing (and the song continues playing in the background). Not a
show stopper though; to the contrary it reminds me to write clean code ;-)

--
Ticket URL: <https://dev.haiku-os.org/ticket/12305#comment:20>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: