Opened 5 years ago

Closed 5 years ago

#11670 closed bug (fixed)

Media addon server crashes

Reported by: un_spacyar Owned by: axeld
Priority: normal Milestone: R1/beta1
Component: Kits/Application Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Well, this is really strange: after playing with the Media preferences (remapping input / output channels), I get a KDL (sorry, no pics). I rebooted, and after that, I get a crash message from the Media Addon Server.

I attach the report.

I do the following to try to solve the issue:

Deleted the folder: /boot/home/config/settings/Media

Upgraded Haiku to the last nightly.

None of this solved the issue.

hrev48574 x86_gcc2

Attachments (3)

media_addon_server-444-debug-28-12-2014-21-18-23.report (14.8 KB) - added by un_spacyar 5 years ago.
System Audio Mixer - crash (4.4 KB) - added by un_spacyar 5 years ago.
the file thats cause the Media Addon crash
System Audio Mixer (4.2 KB) - added by un_spacyar 5 years ago.
the new one (Media Addon works fine)

Download all attachments as: .zip

Change History (10)

comment:1 Changed 5 years ago by un_spacyar

I forget to say that, since this, I always get the crash error from the Media Addon Server when I boot Haiku. I mean, I dont have sound since this: Media preferences dont found my soundcard.

Previously to this error, I never had problems with Audio.

comment:2 Changed 5 years ago by anevilyak

By the looks of things, the system mixer is crashing while attempting to load its settings. Please attach a copy of the file /boot/home/config/settings/System Audio Mixer to this ticket, and then try renaming/moving that file out of the way and rebooting.

comment:3 Changed 5 years ago by un_spacyar

Thanks anevilyak ! I deleted the System Audio Mixer file, rebooted and now works perfectly!!

I attach a copy of the bad file, and a copy of the new one.

Thanks again for your help!!

Changed 5 years ago by un_spacyar

Attachment: System Audio Mixer - crash added

the file thats cause the Media Addon crash

Changed 5 years ago by un_spacyar

Attachment: System Audio Mixer added

the new one (Media Addon works fine)

comment:4 Changed 5 years ago by anevilyak

Component: Servers/media_addon_serverKits/Application Kit
Milestone: R1R1/beta1

Looks to be a problem in BMessage. The data in the file probably got corrupted as a result of the KDL, and it appears that BMessage doesn't properly detect and recover from it in this case. Reproducible with that file over here in any case.

comment:5 Changed 5 years ago by anevilyak

Further note for whoever winds up looking into it: There appears to be a discrepancy in the error checking done by the version of BMessage::Unflatten() that takes a buffer pointer vs the one that takes a BDataIO. The latter properly detects that the file is corrupt, as seen if trying to dump the settings file via /bin/message, while the mixer add-on uses the buffer variation, which happily succeeds. By the looks of things, this is due to the BDataIO variation performing some additional sanity checks against the sizes in the message/field headers vs the actual sizes read from those respective sections of the message.

comment:6 Changed 5 years ago by pulkomandy

Shouldn't the buffer-based version wrap the buffer in a BMemoryIO to share code with the BDataIO constructor?

comment:7 Changed 5 years ago by pulkomandy

Resolution: fixed
Status: newclosed

Should be fixed in hrev48607.

Note: See TracTickets for help on using tickets.