Opened 15 years ago

Closed 10 years ago

#6188 closed bug (fixed)

[media_addon_server] crashes in BBuffer::SetHeader ()

Reported by: samui Owned by: axeld
Priority: normal Milestone: R1
Component: Servers/media_addon_server Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #6195, #9516, #10848
Platform: All

Description

Try this

open more videos than your processor can handle. the playback will become jerky and choppy.

then try to adjust system volume from the deskbar widget. it does not respond to clicking. after few clicks deskbar crashes sporadically.

tested under virtualbox, 256mb of mem (that there was plenty free even with all the video going on).

Attachments (5)

procdiehaiku.png (158.4 KB ) - added by samui 15 years ago.
screenshot6.png (140.5 KB ) - added by Barrett 10 years ago.
0002-Clean-SharedBufferList.h.patch (2.8 KB ) - added by Barrett 10 years ago.
0003-Correctly-check-when-the-BBuffer-failed-the-registra.patch (2.0 KB ) - added by Barrett 10 years ago.
0001-BBuffer-Unregister-buffer-when-clone_area-fail-fixes.patch (2.1 KB ) - added by Barrett 10 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 by axeld, 15 years ago

Can you provide a stack trace from the crash?

See ReportingBugs under "Application Bugs" for more details, thanks!

Does it only happen when you play videos, or also if you are running apps like GLTeapot that also produce heavy load.

by samui, 15 years ago

Attachment: procdiehaiku.png added

comment:2 by samui, 15 years ago

attached image.

When processor is pegged to the max, deskbar becomes garbled and is unresponsive. this time i tested, media player died first, let me do the kdl thing and then died again giving the same popup. had about 14 h.264 vids running at the same time.

after the media player items were flushed, the deskbar redrew itself but was unresponsive and got garbled with processcontroller and volume controller drawing on top of each other. even five mins after the crash the deskbar shows 100% processor usage and is behaving slowly and erratically. virtualbox hovewer says haiku is not taxing the processor almost at all so its just processcontroller not redrawing the current state.

comment:3 by samui, 15 years ago

tested on the latest nightly too, same thing happens. intel i5 processor, virtual memory disabled in haiku.

comment:4 by stippi, 14 years ago

Can you please check if your test case runs without problems now?

comment:5 by diver, 14 years ago

Component: - GeneralServers/media_addon_server
Owner: changed from nobody to axeld

comment:6 by diver, 14 years ago

On attached screenshot it is media_addon_server which crashed MediaPlayer. Can you reproduce deskbar crash on recent revision?

comment:7 by diver, 11 years ago

Summary: tracker deskbar volume control dies under heavy load[media_addon_server] crashes in BBuffer:SetHeader ()

comment:8 by diver, 11 years ago

Blocking: 6195 added

comment:9 by diver, 11 years ago

Blocking: 10848 added

comment:10 by diver, 11 years ago

Summary: [media_addon_server] crashes in BBuffer:SetHeader ()[media_addon_server] crashes in BBuffer::SetHeader ()

comment:11 by diver, 10 years ago

Blocking: 9516 added

(In #9516) Thanks for the note.

comment:12 by diver, 10 years ago

Version: R1/alpha2R1/Development

Still here in hrev48956. Easily reproducible when playing movies over sshfs (from haikuporter).

comment:13 by Barrett, 10 years ago

All those BBuffer issues around, might be related to #4954? When enabling debugging, i realized that his happens when there's a fail in registering a BBuffer to the media_server, this seems a good clue to begin investigating on the source of the problems.

by Barrett, 10 years ago

Attachment: screenshot6.png added

comment:14 by Barrett, 10 years ago

patch: 01

comment:15 by Barrett, 10 years ago

Unregistering the buffer when it fails fixes the bug in my system.

comment:16 by korli, 10 years ago

0001:

  • BBuffer::ID() should return a negative value on bad registration (0 isn't a good one).

0003:

  • "return OK;" could be factorized.

Thanks for your efforts! It's appreciated.

comment:17 by korli, 10 years ago

Sorry but memset() writes bytes, you need to set fMediaHeader.buffer to a negative value, possibly fArea.

comment:18 by Barrett, 10 years ago

I think i should avoid to do things at 00:00, sorry. I've not figured out that memset was unneeded.

comment:19 by Barrett, 10 years ago

I think BBuffer::ID should be set to -1 until it's correctly registered to the media server, this also apply for other members. I've also set ID to fArea when cloning fails, as it seems you meant that. EDIT

Ok, i think i misunderstood the message, the patch should be OK now.

Last edited 10 years ago by Barrett (previous) (diff)

comment:20 by stippi, 10 years ago

All three patches look good to me. Thanks for your efforts!

comment:21 by pulkomandy, 10 years ago

Resolution: fixed
Status: newclosed

Patches applied in hrev49035.

Note: See TracTickets for help on using tickets.