[haiku-bugs] Re: [Haiku] #11497: Media/mixer crash, either buffer "oops" or NULL indirection in float_to_float()

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Fri, 12 Dec 2014 20:38:47 -0000

#11497: Media/mixer crash, either buffer "oops" or NULL indirection in
float_to_float()
-----------------------------------+----------------------------
   Reporter:  ttcoder              |      Owner:  nobody
       Type:  bug                  |     Status:  new
   Priority:  critical             |  Milestone:  R1/beta1
  Component:  Add-Ons/Media/Mixer  |    Version:  R1/Development
 Resolution:                       |   Keywords:
 Blocked By:                       |   Blocking:  11584
Has a Patch:  0                    |   Platform:  All
-----------------------------------+----------------------------

Comment (by bonefish):

 Replying to [comment:12 ttcoder]:
 > IIRC think ports are created with a certain capacity, and start
 *dropping* new incomings if write_port incomings come fast enough to
 override that capacity before read_port removes them

 The behavior of ports is [http://haiku-os.org/legacy-
 docs/bebook/TheKernelKit_Ports_Overview.html well documented in the
 BeBook]. Ports themselves never drop messages. When a port's capacity is
 exhausted subsequent `write_port()` calls will simply block. By using
 `write_port_etc()` the caller can decide not to wait indefinitely, in
 which case the message will not be sent. Which is the caller's decision
 and thus the caller has to deal with the consequences. I'm not familiar
 enough with the media kit code to say whether it uses timeouts and, if so,
 whether it handles those correctly.

 > (my experience on ports is almost only with BLoopers: their port is
 [http://grok.bikemonkey.org/source/xref/haiku/src/kits/app/Looper.cpp#963
 created] with something like
 [http://grok.bikemonkey.org/source/xref/haiku/headers/build/os/app/Looper.h#13
 200]  slots, and the thread tries to run as fast as possible to move them
 safely to a BMessageList where capacity is not limited... yet I know from
 trying unreasonable stuff with them that even that can be overwhelmed, I
 could e.g. send 201+ BMessages before the thread would wake up or be
 available).

 The C++ messaging API allows the same control. When sending messages you
 can decide whether you want to potentially block indefinitely or set a
 timeout.

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

Other related posts: