using 20020426 built with -g: GNU gdb 2002-04-01-cvsOn Sat, Apr 13, 2002 at 02:20:24AM +0200, Dennis Haney wrote:when loading a incomplete file, I never get a picture, often it results in a segfault (when calling m_Mutex.Unlock(); line 1790 in renderer.cpp, however somehow this call ends up somewhere in the SDL code): Other times it simply exists with code 0 right after writing: "<renderer> : Loading subfont blablabla" a classic race condition?
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux"...(no debugging symbols found)...
(gdb) r Star\ Wars.Episode\ 1.The\ Phantom\ Menace.Peoples\ Edition.CD1.ShareReactor.avi
Starting program: /usr/bin/aviplay Star\ Wars.Episode\ 1.The\ Phantom\ Menace.Peoples\ Edition.CD1.ShareReactor.avi
[New Thread 1024 (LWP 13829)]
<Init> : Avifile CVS-020503-06:41-2.95.4
<Init> : Available CPU flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
<Init> : 1009.02 MHz AMD Athlon(tm) Processor processor detected
<LDT_Keeper> : Installed fs segment: 0x40015000
<aviplay> : Debug is on 0
<AVI reader> : Checking: Star Wars.Episode 1.The Phantom Menace.Peoples Edition.CD1.ShareReactor.avi
<AVI reader> : AVIMainHeader: MicroSecPerFrame=40000 MaxBytesPerSec=0
PaddingGranularity=0 Flags=[ HAS_INDEX IS_INTERLEAVED ] TotalFrames=103115
InitialFrames=0 Streams=2 SuggestedBufferSize=0 WxH=640x272
Scale=0 Rate=0 Start=0 Length=0
<AVI reader> : AVIStreamHeader: FccType=vids FccHandler=DIVX Flags=[ ]
InitialFrames=0 Scale=1 Rate=25 Start=0 Length=103115
SuggestedBufferSize=54633 Quality=10000 SampleSize=0 Rect l,r,t,b=0,640,0,272
<AVI reader> : AVIStreamHeader: FccType=auds FccHandler=0x0 Flags=[ ]
InitialFrames=1 Scale=1 Rate=48000 Start=0 Length=197980800
SuggestedBufferSize=7680 Quality=-1 SampleSize=1 Rect l,r,t,b=0,0,0,0
<AVI reader> : Reading index from 729740996
<AVI reader> : WARNING: Invalid index entry 206227 -- id: 1263424842 offset: 0 size: 101058054
<AVI reader> : Reconstructing index...
<AVI reader> : Trying to reconstruct broken avi stream (could take a lot of time)
<AVI reader> : Stream 0 vids : 0x58564944 (DIVX) 206344 chunks (3224.12KB)
<AVI reader> : Cache: Adding stream, 206344 chunks
<AVI reader> : Stream 1 auds : 0x2000 (AC3 DVM) 300291 chunks (4692.05KB)
<AVI reader> : Cache: Adding stream, 300291 chunks
<AVI reader> : Cache: Creating cache for file descriptor: 12
[New Thread 2049 (LWP 13830)]
[New Thread 1026 (LWP 13831)]
<AVI reader> : Initialized video stream 0 (chunk tblsz: 206344, fmtsz: 40)
<AVI reader> : Initialized audio stream 0 (chunk tblsz: 199592635, fmtsz: 18)
<AVI reader> : Successfully opened Star Wars.Episode 1.The Phantom Menace.Peoples Edition.CD1.ShareReactor.avi
<Codec keeper> : /usr/lib/avifile0.7/xvid.so: A/V 0/1
<Codec keeper> : /usr/lib/avifile0.7/win32.so: A/V 13/46
<Codec keeper> : /usr/lib/avifile0.7/vorbis_audio.so: A/V 1/0
<Codec keeper> : /usr/lib/avifile0.7/mpeg_audiodec.so: A/V 1/0
<Codec keeper> : /usr/lib/avifile0.7/mp3lamebin_audioenc.so: A/V 1/0
<Codec keeper> : /usr/lib/avifile0.7/mjpeg.so: A/V 0/1
<Codec keeper> : /usr/lib/avifile0.7/mad_audiodec.so: A/V 1/0
<Codec keeper> : /usr/lib/avifile0.7/ffmpeg.so: A/V 2/7
<Codec keeper> : /usr/lib/avifile0.7/divx4.so: A/V 0/3
<Codec keeper> : /usr/lib/avifile0.7/audiodec.so: A/V 5/0
<Codec keeper> : /usr/lib/avifile0.7/ac3pass.so: A/V 1/0
libavcodec: CPU flags: mmx mmxext 3dnow
<FFMPEG video decoder> : opened
<Codec keeper> : FFMPEG DivX5 video decoder created
<FFMPEG plugin> : GetAttrInt: Unknown attribute 'MaxAuto'
[New Thread 2051 (LWP 13832)]
<aviplay> : Video decoder thread lowered priority to 5
[New Thread 3076 (LWP 13833)]
[New Thread 4101 (LWP 13835)]
<renderer> : SDL Video driver: x11
<renderer> : Detected nVidia GLX driver
<renderer> : If you need to clear two lowes line set shell variable AVIPLAY_NVIDIA_ENABLE
[New Thread 5126 (LWP 13837)]
<renderer> : Created surface: 640 x 272 32 bits
<renderer> : Creating YUV overlay 640x272, fourcc 0x32315659 (YV12)
<renderer> : XV port: 110
<renderer> : XV attribute: XV_DOUBLE_BUFFER GS <0, 1>
<renderer> : XV attribute: XV_COLORKEY GS <0, 16777215>
<renderer> : XV attribute: XV_AUTOPAINT_COLORKEY GS <0, 1>
<renderer> : XV attribute: XV_SET_DEFAULTS S <0, 0>
<renderer> : XV attribute: XV_BRIGHTNESS GS <-512, 511>
<renderer> : XV attribute: XV_CONTRAST GS <0, 8191>
<renderer> : XV attribute: XV_SATURATION GS <0, 8191>
<renderer> : XV attribute: XV_HUE GS <0, 360>
<renderer> : Loading subfont: "-adobe-helvetica-medium-r-normal--*-160-100-100-p-*-iso8859-*"
<aviplay> : Will try audio renderers in this order: SDL,OSS,noaudio
No accelerated IMDCT transform found
<Codec keeper> : FFMPEG AC3 audio decoder created
<audio renderer> : src [wFormatTag=0x2000, nChannels=5, nSamplesPerSec=48000, nAvgBytesPerSec=48000, nBlockAlign=1, wBitsPerSample=0, cbSize=18]
<audio renderer> : dst [wFormatTag=0x01, nChannels=2, nSamplesPerSec=48000, nAvgBytesPerSec=192000, nBlockAlign=4, wBitsPerSample=16, cbSize=0]
[New Thread 6151 (LWP 13838)]
<Player> : Player started
<AVI reader> : w:640 h:-272 bpp:12 0x32315659 - 1:4 (0x80bf9e0)
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 4101 (LWP 13835)]
0x40747e90 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb) where
#0 0x40747e90 in pthread_mutex_lock () from /lib/libpthread.so.0
#1 0x4097babb in free () from /lib/libc.so.6
#2 0x4009e974 in __builtin_vec_delete () from /usr/lib/libaviplay-0.7.so.0
#3 0x4008cc8e in avm::string::operator= (this=0x806f14c, s=0x400a8d73 "AVI reader") at util.cpp:545
#4 0x4008eb99 in avm::AvmOutput::write (this=0x806ec7c, mode=0x400a8d73 "AVI reader", debuglevel=3, format=0x400a8d40 "AviMediaReadStream::Read(%d, %p) chunk:%d pos:%d\n") at avm_output.cpp:126
#5 0x4007818f in avm::AviMediaReadStream::Read (this=0x80ccbc0, lpBuffer=0x0, cbBuffer=0, lSamples=1, plSamples=0xbf1ff9dc, plBytes=0xbf1ff9e0) at AviMediaReadStream.cpp:330
#6 0x400795db in avm::AviReadStreamA::ReadFrames (this=0x41900510, buffer=0x81348e0, bufsize=20000, samples=20000, samples_read=@0xbf1ffa44, bytes_read=@0xbf1ffa48) at AviReadStreamA.cpp:319
#7 0x40066c22 in avm::IAudioRenderer::Extract (this=0x41925fd0) at IAudioRenderer.cpp:119
#8 0x40065b85 in avm::AviPlayer::audioThread (this=0x80cc220) at aviplayth.cpp:697
#9 0x40061936 in avm::AviPlayer::startAudioThread (arg=0x80cc220) at aviplay.cpp:1005
#10 0x407470ba in pthread_start_thread () from /lib/libpthread.so.0
#11 0x40747101 in pthread_start_thread_event () from /lib/libpthread.so.0
(gdb)
(gdb) info thread
* 7 Thread 5126 (LWP 13837) [No stack.]
6 Thread 4101 (LWP 13835) 0x40747e90 in pthread_mutex_lock () from /lib/libpthread.so.0
5 Thread 3076 (LWP 13833) 0x409368ae in sigsuspend () from /lib/libc.so.6
4 Thread 2051 (LWP 13832) 0x409367b1 in kill () from /lib/libc.so.6
3 Thread 1026 (LWP 13831) 0x409368ae in sigsuspend () from /lib/libc.so.6
2 Thread 2049 (LWP 13830) Couldn't get registers: No such process.
-- Dennis use Inline C => qq{void p(char*g){printf("Just Another %s Hacker\n",g);}};p("Perl");