Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#280 closed defect (fixed)

crashes during mp3lib init (on .mp3 file) on alpha EV56 system with FPE

Reported by: mlodutb@… Owned by: alex@…
Priority: normal Component: ad
Version: HEAD Severity: major
Keywords: Cc: kloeri@…
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:


Mplayer works well on video files (and plays audio too), but all mp3 music I
tried result in early crash.

The way I see it, you divide by zero somewhere in the code.

System: Gentoo Linux (all current stable packages)
Kernel: Linux 2.6.10 alpha EV56 GNU/Linux
Libc:, ->
Configured with: /var/tmp/portage/gcc-3.3.2-r7/work/gcc-3.3.2/configure
--prefix=/usr --bindir=/usr/alpha-unknown-linux-gnu/gcc-bin/3.3
--infodir=/usr/share/gcc-data/alpha-unknown-linux-gnu/3.3/info --enable-shared
--host=alpha-unknown-linux-gnu --target=alpha-unknown-linux-gnu
--with-system-zlib --enable-languages=c,c++,f77,objc --enable-threads=posix
--enable-long-long --disable-checking --enable-cstdio=stdio
--enable-clocale=generic --enable-cxa_atexit
--with-local-prefix=/usr/local --enable-shared --disable-nls --disable-multilib
Thread model: posix
gcc version 3.3.2 20040119 (Gentoo Linux 3.3.2-r7, propolice-3.3-7)
LD: GNU ld version 20040114
AS: GNU assembler 20040114

cpu : Alpha
cpu model : EV56
cpu variation : 7
cpu revision : 0
cpu serial number :
system type : Miata
system variation : 0
system revision : 0
system serial number :
cycle frequency [Hz] : 599808760 est.
timer frequency [Hz] : 1024.00
page size [bytes] : 8192
phys. address bits : 40
max. addr. space # : 127
BogoMIPS : 1187.96
kernel unaligned acc : 0 (pc=0,va=0)
user unaligned acc : 0 (pc=0,va=0)
platform string : Digital Personal WorkStation? 600au
cpus detected : 1
L1 Icache : 8K, 1-way, 32b line
L1 Dcache : 8K, 1-way, 32b line
L2 cache : 96K, 3-way, 64b line
L3 cache : n/a

VIDEO: Problem does not involve video (as a matter of fact, low-res lavc movies
play well)
SOUND: es1688 using alsa drivers and OSS emulation (works well with avi files)

gdb mplayer (-v /dev/shm/chiny.mp3):
Using host libthread_db library "/lib/".
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 6500)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale

MPlayer dev-CVS-050418-14:48-3.3.2 (C) 2000-2005 MPlayer Team
CPU: Digital Alpha

CommandLine?: '/dev/shm/chiny.mp3' '-v'
get_path('font/font.desc') -> '/root/.mplayer/font/font.desc'
font: can't open file: /root/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using Unoptimized OnScreenDisplay?
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup
Using nanosleep() timing
get_path('input.conf') -> '/root/.mplayer/input.conf'
Can't open input config file /root/.mplayer/input.conf: No such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or
Falling back on default (hardcoded) input config
get_path('chiny.mp3.conf') -> '/root/.mplayer/chiny.mp3.conf'
Playing /dev/shm/chiny.mp3.
[file] File size is 315180 bytes
STREAM: [file] /dev/shm/chiny.mp3
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for Nullsoft Streaming Video
Checking for NuppelVideo?
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename /dev/shm/chiny.mp3 ext: .mp3
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: seeking from 0x4CF2C to start pos 0x0
demux_audio: audio data 0x0 - 0x4CEAC
Audio file detected.
Clip info:

Title: 1rack04
Artist: New Japan Philharmonic
Album: World Anthems
Year: 1998
Comment: Slawek
Genre: Other

Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using generic C decore!
MP3lib: init layer2&3 finished, tables done

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 16384 (LWP 6500)]
0x00000001201193fc in demux_audio_fill_buffer (ds=0x12068ffc0) at demuxer.h:218
218 inline static int ds_tell_pts(demux_stream_t *ds){
#0 0x00000001201193fc in demux_audio_fill_buffer (ds=0x12068ffc0) at demuxer.h:218
#1 0x00000001200e6e7c in demux_fill_buffer (demux=0x0, ds=0x0) at demuxer.c:383
#2 0x00000001200e725c in ds_fill_buffer (ds=0x12068ffc0) at demuxer.c:464
#3 0x00000001200e7504 in demux_read_data (ds=0x12068ffc0, mem=0x11fffe4d0
"\023-DTû!é?O/\227¤±jo>", len=4) at demuxer.c:483
#4 0x0000000120080a0c in mplayer_audio_read (buf=0x12068ffc0 "", size=1) at
#5 0x000000012042164c in read_frame (fr=0x12065a2d0) at sr1.c:60
#6 0x0000000120421298 in MP3_DecodeFrame (hova=0x0, single=-1) at sr1.c:510
#7 0x0000000120080a90 in init (sh=0x120691df0) at ad_mp3lib.c:49
#8 0x000000012007e110 in init_audio_codec (sh_audio=0x120691df0) at dec_audio.c:88
#9 0x000000012007e554 in init_audio (sh_audio=0x120691df0, codecname=0x0,
afm=0x0, status=1) at dec_audio.c:182
#10 0x000000012007e848 in init_best_audio_codec (sh_audio=0x120691df0,
audio_codec_list=0x11fffe628, audio_fm_list=0x0)

at dec_audio.c:227

#11 0x0000000120017470 in main (argc=542922792, argv=0x12068fff0) at mplayer.c:1966
Dump of assembler code from 0x1201193dc to 0x12011941c:
0x00000001201193dc <demux_audio_fill_buffer+1132>: addl t0,t3,t0
0x00000001201193e0 <demux_audio_fill_buffer+1136>: subl t0,t4,t0
0x00000001201193e4 <demux_audio_fill_buffer+1140>: cvtlq $f11,$f11
0x00000001201193e8 <demux_audio_fill_buffer+1144>: stq t0,112(sp)
0x00000001201193ec <demux_audio_fill_buffer+1148>: ldt $f13,112(sp)
0x00000001201193f0 <demux_audio_fill_buffer+1152>: cvtqs $f11,$f11
0x00000001201193f4 <demux_audio_fill_buffer+1156>: cvtqs $f13,$f10
0x00000001201193f8 <demux_audio_fill_buffer+1160>: divs $f10,$f11,$f10
0x00000001201193fc <demux_audio_fill_buffer+1164>: subs $f12,$f10,$f12
0x0000000120119400 <demux_audio_fill_buffer+1168>: sts $f12,16(fp)
0x0000000120119404 <demux_audio_fill_buffer+1172>: jsr
ra,(t12),0x120116960 <demux_audio_open+2032>
0x0000000120119408 <demux_audio_fill_buffer+1176>: ldah gp,75(ra)
0x000000012011940c <demux_audio_fill_buffer+1180>: nop
0x0000000120119410 <demux_audio_fill_buffer+1184>: lda gp,-15328(gp)
0x0000000120119414 <demux_audio_fill_buffer+1188>: lda v0,1
0x0000000120119418 <demux_audio_fill_buffer+1192>: br 0x120119054
End of assembler dump.
v0 0x1206a33a7 4838798247
t0 0x0 0
t1 0x120691df0 4838727152
t2 0x0 0
t3 0x0 0
t4 0x0 0
t5 0x4 4
t6 0x4 4
t7 0xd1 209
s0 0xb3 179
s1 0x120690140 4838719808
s2 0x0 0
s3 0x1206a33a7 4838798247
s4 0xb7 183
s5 0x120690b00 4838722304
fp 0x12068ffc0 4838719424
a0 0x12068ffc0 4838719424
a1 0x120691f30 4838727472
a2 0x1 1
a3 0x3 3
a4 0x38 56
a5 0x23280 144000
t8 0x1 1
t9 0x1 1
t10 0x0 0
t11 0xac44 44100
ra 0x120119444 4832990276
t12 0x1200e6960 4832782688
at 0x1 1
gp 0x1205c5828 0x1205c5828
sp 0x11fffe390 0x11fffe390
zero 0x0 0
f0 0.062500000000000028 (raw 0x3fb0000000000002)
f1 0 (raw 0x0000000000000000)
f2 0 (raw 0x0000000000000000)
f3 0 (raw 0x0000000000000000)
f4 0 (raw 0x0000000000000000)
f5 0 (raw 0x0000000000000000)
f6 0 (raw 0x0000000000000000)
f7 0 (raw 0x0000000000000000)
f8 0 (raw 0x0000000000000000)
f9 0 (raw 0x0000000000000000)
f10 0 (raw 0x0000000000000000)
f11 0 (raw 0x0000000000000000)
f12 0 (raw 0x0000000000000000)
f13 0 (raw 0x0000000000000000)
f14 1.0000000000000004 (raw 0x3ff0000000000002)
f15 0 (raw 0x0000000000000000)
f16 0.062500000000000028 (raw 0x3fb0000000000002)
f17 1.0013610267550538e-17 (raw 0x3c6716fe00000000)
f18 0.0625 (raw 0x3fb0000000000000)
f19 0.99951630587848861 (raw 0x3feffc099eb22390)
f20 0.78539816339744772 (raw 0x3fe921fb54442d13)
f21 5.8518300049055852e-08 (raw 0x3e6f6ab1a4972f4f)
f22 2.9906099209065515e-31 (raw 0x39984340f8f825ee)
f23 0 (raw 0x0000000000000000)
f24 1 (raw 0x3ff0000000000000)
f25 0 (raw 0x0000000000000000)
f26 1.0000161519999999 (raw 0x3ff00010efc4fcfd)
f27 -0.34657359027997664 (raw 0xbfd62e42fefa3a37)
f28 1.7112443005153077e-08 (raw 0x3e525fd51fc40000)
f29 -1.1587798717844904e-24 (raw 0xbaf66a0000000000)
f30 1.5707963407039642 (raw 0x3ff921fb58000000)
fpcr 0xe910000000000000 -1652821063244972032
pc 0x1201193fc 0x1201193fc <demux_audio_fill_buffer+1164>
unique 0x20000d80420 2199037412384
vo: x11 uninit called but X11 not inited..

Attachments (2)

mp3_bug280.diff (704 bytes) - added by reimar 15 years ago.
Please test if this fixes it
my-hack.patch (425 bytes) - added by mlodutb@… 15 years ago.
Ugly hack, WFM, not a permament fix.

Download all attachments as: .zip

Change History (6)

Changed 15 years ago by reimar

Please test if this fixes it

comment:1 Changed 15 years ago by reimar

Changed 15 years ago by mlodutb@…

Ugly hack, WFM, not a permament fix.

comment:2 Changed 15 years ago by mlodutb@…

Your patch did not improve the situation.

I dig in it a little, and I think sh_audio->i_bps should not be 0, and that's
where it fails.. simple hack, changing sh_audio->i_bps to
((float)sh_audio->i_bps+1) fixes the problem.

The patch attached is in no way a fix, rather a hack, but it works for me.
I don't have enough understanding about libmpdemux to dig it more.

comment:3 Changed 15 years ago by kloeri@…

  • Cc kloeri@… added

comment:4 Changed 15 years ago by reimar

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed in CVS (though you might still have a similar problem with flac

Note: See TracTickets for help on using tickets.