Opened 15 years ago

Closed 14 years ago

#5276 closed bug (fixed)

MediaPlayer crash at start when trying to restore playlist but file is gone

Reported by: miqlas Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/MediaPlayer Version: R1/Development
Keywords: media player crash Cc:
Blocked By: Blocking:
Platform: All

Description

I was played some music from my NTFS partition yesterday. Today i sarted the Haiku, opened the MediaPlayer, and tha-tha, it crashed, i think it try to open the file from my NTFS partition, but it isn't mounted yet... After I mounted this partition, it start up normally.

In Terminal

~> /boot/home/config/be/Applications/MediaPlayer      
open playlist item:

...crash...

In gdb:

[tcsetpgrp failed in terminal_inferior: Invalid Argument]
[Switching to team /boot/home/config/be/Applications/MediaPlayer (332) thread playback manager (337)]
0xffff012c in ?? ()
(gdb) bt
#0  0xffff012c in ?? ()
#1  0x00000000 in ?? ()
#2  0x00013404 in ?? ()
#3  0x0047d00f in BBufferIO::ReadAt () from /boot/system/lib/libbe.so
#4  0x0047c3fe in BPositionIO::Read () from /boot/system/lib/libbe.so
#5  0x00a1a809 in TPositionBridgeIO::Read ()
   from /boot/system/add-ons/media/plugins/ape_reader
#6  0x00a29ffe in CAPEHeader::FindDescriptor ()
   from /boot/system/add-ons/media/plugins/ape_reader
#7  0x00a2a13e in CAPEHeader::Analyze ()
   from /boot/system/add-ons/media/plugins/ape_reader
#8  0x00a1f775 in CAPEInfo::GetFileInformation ()
   from /boot/system/add-ons/media/plugins/ape_reader
#9  0x00a1ef30 in CAPEInfo::CAPEInfo ()
   from /boot/system/add-ons/media/plugins/ape_reader
#10 0x00a1af7f in CreateIAPEDecompressEx ()
   from /boot/system/add-ons/media/plugins/ape_reader
#11 0x00a19fbe in TAPEReader::Sniff ()
   from /boot/system/add-ons/media/plugins/ape_reader
#12 0x005ba953 in BPrivate::media::PluginManager::CreateReader ()
   from /boot/system/lib/libmedia.so
#13 0x005b8d98 in BPrivate::media::MediaExtractor::MediaExtractor ()
   from /boot/system/lib/libmedia.so
#14 0x0058795a in BMediaFile::_InitReader () from /boot/system/lib/libmedia.so
---Type <return> to continue, or q <return> to quit---
#15 0x00586a62 in BMediaFile::BMediaFile () from /boot/system/lib/libmedia.so
#16 0x0024e8c2 in FilePlaylistItem::CreateMediaFile ()
#17 0x00265f51 in Controller::SetTo ()
#18 0x002659fe in Controller::MessageReceived ()
#19 0x0035f6fb in BLooper::DispatchMessage () from /boot/system/lib/libbe.so
#20 0x00361069 in BLooper::task_looper () from /boot/system/lib/libbe.so
#21 0x00360c57 in BLooper::_task0_ () from /boot/system/lib/libbe.so
#22 0x00938e1e in thread_entry () from /boot/system/lib/libroot.so
#23 0x70080fec in ?? ()
(gdb) 

Change History (11)

comment:1 by stippi, 15 years ago

I've seen this, too, with the same backtrace. Don't think it has anything to do with the partition not being mounted. In my case, I also just launched MediaPlayer and it tried to open the previous playlist. At the time, I thought it had something to do with me having placed an incompatible libmedia.so in my home/config/lib folder, since I was testing some stuff.

comment:2 by jackburton, 15 years ago

From the backtrace, looks like the crash involves the BBufferIO class. I wrote this class long ago, but I don't think I've extensively tested it, except for some basic stuff.

comment:3 by humdinger, 15 years ago

I have the same thing when launching MediaPlayer. I think I last played back something on a USB stick, that's not connected ATM. This is hrev35438. I don't know if it helps, but this is additional info from the syslog:

KERN: vm_soft_fault: va 0x180d0000 not covered by area in address space
KERN: vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x180d0000, ip 0xffff012c, write 0, user 1, thread 0x386
KERN: vm_page_fault: thread "playback manager" (902) in team "MediaPlayer" (897) tried to read address 0x180d0000, ip 0xffff012c ("???" +0xffff012c)
KERN: debug_server: Thread 902 entered the debugger: Segment violation
KERN: stack trace, current PC 0xffff012c  :

comment:4 by marcusoverhagen, 15 years ago

Owner: changed from marcusoverhagen to nobody
Status: newassigned

comment:5 by axeld, 15 years ago

Owner: changed from nobody to stippi
Version: R1/alpha1R1/Development

comment:6 by stippi, 14 years ago

I've tried to reproduce the error, but I just get an error message from MediaPlayer. The error doesn't fit so much, since it should just say they file does not exist, instead that there is no decoder available for it, but I get no crash. Can anybody still reproduce this?

comment:7 by stippi, 14 years ago

Summary: MediaPlayer crash at startMediaPlayer crash at start when trying to restore playlist but file is gone

comment:8 by Disreali, 14 years ago

I used to experience this a lot when playing CD's or media on a non-boot partition, closing MediaPlayer, un-mounting the drive, and relaunching MediaPlayer at a later time. My testing is that MP attempts to start playing the last file played at the the point MP was closed. I have to open the playlist, which has a single blank entry, signified by a green pointer, and delete the blank entry. MP then work fine after deleting blank playlist, closing and re-launching.

I have not tested MP's behaviour since the massive refactor caused gcc2 builds to not be able to play anything.

in reply to:  8 comment:9 by anevilyak, 14 years ago

Replying to Disreali:

I have not tested MP's behaviour since the massive refactor caused gcc2 builds to not be able to play anything.

That's been fixed, so you should be able to retest.

comment:10 by stippi, 14 years ago

Basically I couldn't ever reproduce this. The misfitting error message is also fixed now.

comment:11 by stippi, 14 years ago

Resolution: fixed
Status: assignedclosed

A wait, this isn't a MediaPlayer bug at all, looking at the stack crawl again. What happened is that BMediaFile creates a BFile, but never checks InitCheck() on the object. If the file is invalid, some buggy decoder, like probably the APE reader in this case, may not check return values from the reading methods and crash. In any case, the issue is definitely fixed, since I implemented checking BFile::InitCheck() and propagating the error in hrev38760.

Note: See TracTickets for help on using tickets.