protux-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Protux-devel] <RT> segfaults...


From: Martin Herren
Subject: [Protux-devel] <RT> segfaults...
Date: Sat, 28 Dec 2002 18:34:41 +0100

Hej,

a bug report about 2 segfaults when setting/unsetting a track recordable (<RT>).

1) This crash is reproductible on my system and happens as follow: i start 
protux with the --d1 option, i press <RT>, after a few seconds i press again 
<RT> (without having recorded anything in between). Then again after a few 
seconds i press <RT> again, then protux hangs a few seconds before leaving with 
a 'WARNING: Buffer Underrun' and a segfault.
Here is the debug output with comments when i did what (i stripped the parts i 
tought that weren't relevant).

ENTERING MustuxApplication (CONSTRUCTOR)
LEAVING  MustuxApplication (CONSTRUCTOR)
ENTERING Protux (CONSTRUCTOR)
    ENTERING GlobalProperties.cc::init

<... snip ...>

    LEAVING  GlobalProperties.cc::init
    ENTERING MustuxAudioDeviceMapper.cc::init
        [ Found Alsa Device #0  device=plughw:0,0 ]
        [ Checking BUS 0 ... ]
        ENTERING MustuxAudioDeviceMapper.cc::open_device
            [ ALSA DEV #0 Sucessfully open : device=plughw:0,0 MODE=PLAY RATE= 
44100  CHANNELS=2 BITDEPTH=16 FPS=20 fragmentSizeInBlocks=2205  
fragmentSize=8820 ]
        LEAVING  MustuxAudioDeviceMapper.cc::open_device
        ENTERING MustuxAudioDeviceMapper.cc::close_device
            [ Sucessfully closed ALSA DEV=plughw:0,0 ]
        LEAVING  MustuxAudioDeviceMapper.cc::close_device
        ENTERING Protux.cc::check_dirs
        LEAVING  Protux.cc::check_dirs
        ENTERING MustuxInterface (CONSTRUCTOR)
            ENTERING MustuxJogMouseBoard (CONSTRUCTOR)
            LEAVING  MustuxJogMouseBoard (CONSTRUCTOR)
        LEAVING  MustuxInterface (CONSTRUCTOR)
        ENTERING Interface (CONSTRUCTOR)

<... snip ...>

        LEAVING  Interface (CONSTRUCTOR)
    LEAVING  Protux (CONSTRUCTOR)

<--- here I press <RT> --->

    [ Processing Action 34 ( SET TRACK RECORDABLE ) ]
DEBUG : Track.cc::toggle_record : captureDir = 
/home/martin/protuxprojects/Untitled/song_2/capture
    ENTERING Recorder.cc::arm
        ENTERING MustuxAudioDeviceMapper.cc::open_device
            [ ALSA DEV #0 Sucessfully open : device=plughw:0,0 MODE=REC RATE= 
44100  CHANNELS=2 BITDEPTH=16 FPS=20 fragmentSizeInBlocks=4096  
fragmentSize=16384 ]
        LEAVING  MustuxAudioDeviceMapper.cc::open_device
DEBUG : Recorder.cc::arm : Detected fragment size for REC : recBufferSize=16384
        ENTERING Audio.cc::create
DEBUG : Audio.cc::create : Creating audio : 2 channels,
DEBUG : Audio.cc::create : 44100 Hz, 16 bits
DEBUG : Audio.cc::create : Project : Untitled
DEBUG : Audio.cc::create : Group : UndefGroup
DEBUG : Audio.cc::create : Hardware : UndefSoundCard
DEBUG : Audio.cc::create : Desc : Real Time Take
            ENTERING PrafFile (CONSTRUCTOR)
            LEAVING  PrafFile (CONSTRUCTOR)
            ENTERING PrafFile.cc::create
            LEAVING  PrafFile.cc::create
            ENTERING PrafFile.cc::write_header
            LEAVING  PrafFile.cc::write_header
        LEAVING  Audio.cc::create
    LEAVING  Recorder.cc::arm
--> Reached mark -------------- STARTING  THREAD : ThRecLoop --------------
    [ Reading 4096 blocks ( 16384 bytes) ]
    [ Reading 4096 blocks ( 16384 bytes) ]

<... snip ...>

    [ Reading 4096 blocks ( 16384 bytes) ]

<--- here i presse <RT> for the second time --->

    [ Processing Action 34 ( SET TRACK RECORDABLE ) ]
    ENTERING Recorder.cc::stop
        ENTERING MustuxAudioDeviceMapper.cc::close_device
            [ Sucessfully closed ALSA DEV=plughw:0,0 ]
        LEAVING  MustuxAudioDeviceMapper.cc::close_device
DEBUG : Recorder.cc::stop : Aborting recording ...
    LEAVING  Recorder.cc::stop

<--- here i press <RT> for the third time --->

    [ Processing Action 34 ( SET TRACK RECORDABLE ) ]
DEBUG : Track.cc::toggle_record : captureDir = 
/home/martin/protuxprojects/Untitled/song_2/capture
    ENTERING Recorder.cc::arm
        ENTERING MustuxAudioDeviceMapper.cc::open_device
WARNING: Buffer Underrun !

<--- there it segfaults --->








2) Second reproductible (but it has happend that it didn't crash here) 
situation: i press <RT>, then <R>, after a few seconds again <R> and then <RT>, 
and then i got also a segfault (but without a buffer underrun warning).
Here again the most relevant parts of the --d1 output:

<--- i press <RT> here --->

    [ Processing Action 34 ( SET TRACK RECORDABLE ) ]
DEBUG : Track.cc::toggle_record : captureDir = 
/home/martin/protuxprojects/Untitled/song_2/capture
    ENTERING Recorder.cc::arm
        ENTERING MustuxAudioDeviceMapper.cc::open_device
            [ ALSA DEV #0 Sucessfully open : device=plughw:0,0 MODE=REC RATE= 
44100  CHANNELS=2 BITDEPTH=16 FPS=20 fragmentSizeInBlocks=4096  
fragmentSize=16384 ]
        LEAVING  MustuxAudioDeviceMapper.cc::open_device
DEBUG : Recorder.cc::arm : Detected fragment size for REC : recBufferSize=16384
        ENTERING Audio.cc::create
DEBUG : Audio.cc::create : Creating audio : 2 channels,
DEBUG : Audio.cc::create : 44100 Hz, 16 bits
DEBUG : Audio.cc::create : Project : Untitled
DEBUG : Audio.cc::create : Group : UndefGroup
DEBUG : Audio.cc::create : Hardware : UndefSoundCard
DEBUG : Audio.cc::create : Desc : Real Time Take
            ENTERING PrafFile (CONSTRUCTOR)
            LEAVING  PrafFile (CONSTRUCTOR)
            ENTERING PrafFile.cc::create
            LEAVING  PrafFile.cc::create
            ENTERING PrafFile.cc::write_header
            LEAVING  PrafFile.cc::write_header
        LEAVING  Audio.cc::create
    LEAVING  Recorder.cc::arm
--> Reached mark -------------- STARTING  THREAD : ThRecLoop --------------
    [ Reading 4096 blocks ( 16384 bytes) ]

<... snip ...>

    [ Reading 4096 blocks ( 16384 bytes) ]

<--- here i press <R> --->

    [ Processing Action 33 ( RECORD ) ]
    ENTERING Recorder.cc::rec
    LEAVING  Recorder.cc::rec
    [ Reading 4096 blocks ( 16384 bytes) ]

<... snip ...>

    [ Reading 4096 blocks ( 16384 bytes) ]

<--- here i press <R> again --->

    [ Processing Action 33 ( RECORD ) ]
    ENTERING Recorder.cc::force_stop
--> Reached mark -------------- FINISHING THREAD : ThRecLoop --------------
        ENTERING Recorder.cc::stop
            ENTERING MustuxAudioDeviceMapper.cc::close_device
                [ Sucessfully closed ALSA DEV=plughw:0,0 ]
            LEAVING  MustuxAudioDeviceMapper.cc::close_device
            ENTERING Audio.cc::fix_size
                [ Fixing Praf Size ]
                ENTERING PrafFile.cc::fix_audio_size
                    [ Fixing audio size to 524288 ]
                LEAVING  PrafFile.cc::fix_audio_size
            LEAVING  Audio.cc::fix_size
            ENTERING Audio.cc::rebuild_peaks
                ENTERING Peak (CONSTRUCTOR)
                LEAVING  Peak (CONSTRUCTOR)
                ENTERING Peak.cc::build
                    [ Created RAM buffer for HZOOM = 9 of 8194 shorts  ]
                    [ Created RAM buffer for HZOOM = 10 of 5462 shorts ]

<... snip ...>

                    [ Created RAM buffer for HZOOM = 30 of 10 shorts  ]
                    [ Created RAM buffer for HZOOM = 31 of 6 shorts  ]
                    ENTERING Peak.cc::load
                        [ Looking for peak image file 
/home/martin/protuxprojects/Untitled/song_2/capture/take-20021228-181758.praf.peak
 ]
                    LEAVING  Peak.cc::load
                    [ No previously saved peak image found. Rescanning file... ]
                    [ Rescanning Peaks : Completed. ]
                    ENTERING Peak.cc::save
                        [ Saving Peak to 
/home/martin/protuxprojects/Untitled/song_2/capture/take-20021228-181758.praf.peak
 ]
                        [ RAM Buffers saved. Total size of file is 62848 ]
                    LEAVING  Peak.cc::save
                LEAVING  Peak.cc::build
            LEAVING  Audio.cc::rebuild_peaks
            ENTERING Song.cc::create_clip
                ENTERING Track.cc::add_clip
                    [ Creating clip starting in 0 ]
                    ENTERING Track.cc::add_clip
                        ENTERING AudioClip (CONSTRUCTOR)
                        LEAVING  AudioClip (CONSTRUCTOR)
                        [ Adding first clip :  [ TFB = 0 , TLB = 131072 , SFB = 
0 , SLB = 131072 , LEN = 131072 ] ]
                        [ Entire clip list now is  ]
                        [ Clip #0 : SFB=0 , SLB=131072 , TRB=0 ]
                    LEAVING  Track.cc::add_clip
                LEAVING  Track.cc::add_clip
            LEAVING  Song.cc::create_clip
        LEAVING  Recorder.cc::stop
    LEAVING  Recorder.cc::force_stop

<--- here i press <RT> again --->

    [ Processing Action 34 ( SET TRACK RECORDABLE ) ]
    ENTERING Recorder.cc::stop
        ENTERING MustuxAudioDeviceMapper.cc::close_device

<--- there it segfaults --->

I can play back the track before unsetting in recordable, so i know the 
recording went well, but it still crashes when i try to unset the track 
recordable afterwards...


It seems as there is a problem with 
MustuxAudioDeviceMapper.cc::open/close_device... if the problem is not in alsa 
itself...

hope this debug output will be of some help...

Martin


-- 
Open your Windows - Free your Mind - Enjoy
http://gnuwin.epfl.ch

Martin Herren                             +41 (0)79 746 57 83
OpenPGP Public key @ http://www.on-the-web.ch/sputnik/gpg.asc

Attachment: pgpXHwUwUffz2.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]