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

  • From: "Barrett" <trac@xxxxxxxxxxxx>
  • Date: Tue, 22 Sep 2015 11:15:12 -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 Barrett):

I guess it's a kind of a different problem which I am considering those
days, BeOS required to have a BApplication object to use the BMediaRoster,
in Haiku there's not apparently this limitation.

It would have been a good addition but here the problem, there are
situations where the BApplication exit but the BMediaRoster doesn't
receive the Quit() command because the linker do it only when the static
vars of libmedia.so are unloaded, this will not happen if we have already
some node running. Other than this, there may be more serious problems, if
the node is using an app_server's BBitmap and the be_app is destroyed
before the BMediaNode the result will be a crash due to a debugger call
arguing that we don't have a valid app_server link happening when the node
delete the objects.

So actually i am going to consider how to solve this problem definitely,
we can't do this in the B_QUIT_REQUESTED mechanism because we should have
a BApplication but it's not required to Run(), so probably the best place
is the BApplication destructor. The best way is supposedly to notify the
BMediaRoster with a B_QUIT_REQUESTED itself, but I am already in research
phase.

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

Other related posts: