Opened 5 years ago

Last modified 4 years ago

#15293 new bug

MediaPlayer crashes in StreamBase::FrameRate

Reported by: Pete Owned by: stippi
Priority: normal Milestone: Unscheduled
Component: Applications/MediaPlayer Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I have a script to generate a wav file from a midifile (using Csound) which specifically gives the wav the same basename as the midi. E.g. "song.mid" generates "song.wav" in the same directory. However, every time I click on the result to play it, MediaPlayer crashes! It was driving me crazy until I realized that if I changed either name at all, it would then play! This only happens with beta1 (hrev52295-129). Earlier versions of MediaPlayer (hrev50180) don't have the same problem.

I should also mention that I have a 20-year-old mp3 that crashes the same MediaPlayer (and also has no trouble in earlier revs, or with any other player in any OS). 2½ MB, so I'll only upload it if anyone wants to look. If I create a clean copy with sox, it plays.

Attachments (1)

MediaPlayer-897-debug-21-08-2019-23-59-28.report (21.5 KB ) - added by Pete 5 years ago.
crash report as requested

Download all attachments as: .zip

Change History (10)

comment:1 by Pete, 5 years ago

I should clarify that the mp3 failure is not the same as the name conflict. The latter causes an actual crash. MediaPlayer reports "General System Error" on the mp3. I guess this should be a separate ticket.

comment:2 by diver, 5 years ago

Please upload debug report.

by Pete, 5 years ago

crash report as requested

in reply to:  2 comment:4 by Pete, 5 years ago

Replying to diver:

Please upload debug report.

Sorry -- should have thought of that. Done.

in reply to:  3 comment:5 by Pete, 5 years ago

Replying to vidrep:

Dupe??? https://dev.haiku-os.org/ticket/11500

Huh... No, I don't think so, as I see your report is 5 years old, and I don't find any problems with a 3 year old system. Does look a bit similar, though.

I just tried some more games -- adding a bit more strangeness. If I create an mp3 or ogg file from the wav (with the same basename) either will start to play, but MediaPlayer will usually crash at some random point in the playback. The wav file never ever gets started.

comment:6 by diver, 5 years ago

Summary: MediaPlayer crashes when file has a basename conflictMediaPlayer crashes in StreamBase::FrameRate

comment:7 by ttcoder, 5 years ago

Replying to [Pete]:

This only happens with beta1 (hrev52295-129). Earlier versions of MediaPlayer (hrev50180) don't have the same problem.

Maybe it was true even in 50180 that "both files are opened by MediaPlayer", but you didn't notice it because it didn't crash back then, whereas it crashes now ?

Was there some changes in the MIDI playback code, or in data (I seem to recall a commit changing the "MIDI sound fonts" or something) in between ?

What happens when a MIDI file is opened in MediaPlayer, does it crash ?

If the problem occurs with the same basename and disappears if the file is moved to another directory or is renamed, this is clearly linked to #11500 (with the added twist of a crash on top of it).

-EDIT:- if double-clicked, the midi file might get filtered out by MIME type, concealing a possible crash; maybe open from the CLI tool "media_client" instead, which should give a direct route to BMediaFile/BSoundPlayer?

-EDIT 2:- assuming the crashed thread does not prevent the BWindow from working, can you access the "Audio > Track" submenu, and see what is listed in there? maybe it will show that two audio tracks are loaded instead of one (unless the problem occurs at probing time, i.e. /before/ the menu is populated)

Last edited 5 years ago by ttcoder (previous) (diff)

comment:8 by Pete, 5 years ago

OK, it does look like some variant of the problem goes back a long way! Leaving aside the beta1 problems for thr moment, I experimented with the versions where I had never seen any errors.

I create two files, "oops.mid" and "oops.wav". If I open the wav in MediaPlayer, it plays as I expect; if I start MediaPlayer and "Open File" on oops.mid, it plays the wav! If I remove (or rename) the wav, the midi file gives "General System Error". I never get an actual crash. The same behaviour appears in my earliest partition -- pre-PM, Nov 2012.

In the beta1 system, with the same two files, trying the wav causes the crash. Opening the midi in MediaPlayer tries to play it as raw audio! (I hear nothing, but the progress bar proceeds, and there's no crash. I get the 'raw audio' format from the 'file info')

in reply to:  8 comment:9 by ttcoder, 4 years ago

Replying to Pete:

I create two files, "oops.mid" and "oops.wav". If I open the wav in MediaPlayer, it plays as I expect; if I start MediaPlayer and "Open File" on oops.mid, it plays the wav!

That's ticket:11500#comment:19

Bottom line, I've learned to never run tests on similar-named files in the same folder, saves me lots of frustration and "principle of most astonishment" ;-)

Note: See TracTickets for help on using tickets.