Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] MIDI control problem

Date2005-03-28 16:59
FromIstvan Varga
SubjectRe: [Cs-dev] MIDI control problem
Dave Phillips wrote:

>  I like to drive Csound with an external sequencer, but recent CVS 
> builds have returned a problem that had been solved. The behavior is 
> easily repeated: When I stop the sequencer Csound segfaults and closes. 
> Bummer, it severely breaks workflow. Maybe an errant MIDI message is 
> closing things ?
> 
>  I'm happy to help debug this but I need some Csound debugging pointers. 
> Cs5 developers, do you have any suggestions ?

Try compiling Csound with memory debugging (e.g. scons customLIBS=-lefence),
then run Csound with 'gdb --args ./csound [options...]'. When the crash
has occured, type 'backtrace', and send a log of the messages printed by gdb.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-03-28 17:09
FromDave Phillips
Subject[Cs-dev] MIDI control problem
Greetings:

  I like to drive Csound with an external sequencer, but recent CVS 
builds have returned a problem that had been solved. The behavior is 
easily repeated: When I stop the sequencer Csound segfaults and closes. 
Bummer, it severely breaks workflow. Maybe an errant MIDI message is 
closing things ?

  I'm happy to help debug this but I need some Csound debugging 
pointers. Cs5 developers, do you have any suggestions ?

Best,

dp




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-03-28 22:41
FromDave Phillips
SubjectRe: [Cs-dev] MIDI control problem
Hi Istvan:

  I don't have efence on my machine, but I did a debug in gdb anyway. 
Here's the results and the backtrace:

        gdb --args ./csound -M1 
/home/dlphilp/cs5-test/RT-MIDI/in/midi-in.csd

rtmidi: PortMIDI module enabled
rtaudio: ALSA module enabled
orch compiler:
12 lines read
        instr   1
sorting score ...
        ... done
Csound version 5.00 beta (float samples) Mar 28 2005
midi channel 1 using instr 1
[skip]
midi channel 16 using instr 1
displays suppressed
0dBFS level = 32767.0
PortMIDI: selected input device 1: 'VirMIDI 1-0' (ALSA)
orch now loaded
audio buffered in 256 sample-frame blocks
writing 512-byte blks of shorts to dac2 (WAV)
SECTION 1:
Allocating 33060 bytes
ftable 1:
Allocating 33060 bytes
ftable 2:
Allocating 33060 bytes
ftable 3:
new alloc for instr 1:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 758)]
AllNotesOff (chn=0x0) at InOut/midirecv.c:441
441           ip = chn->kinsptr[nn];

(gdb) backtrace
#0  AllNotesOff (chn=0x0) at InOut/midirecv.c:441
#1  0x08084c84 in midNotesOff () at InOut/midirecv.c:453
#2  0x08084d9e in sensMidi (csound=0x8109b60) at InOut/midirecv.c:559
#3  0x0807b053 in sensevents (csound=0x8109b60) at Engine/musmon.c:801
#4  0x08066d27 in csoundPerformKsmps (csound=0x8109b60) at Top/csound.c:236
#5  0x0804f63d in main (argc=3, argv=0xbffff724) at 
frontends/csound/csound_main.c:154
#6  0x40348a67 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)


Here's the CSD:








    instr 1
iamp    ampmidi    5000
kfreq    cpsmidib
a1    oscili    iamp,kfreq,1
a2    oscili    iamp,kfreq*1.003,2
a3    oscili    iamp,kfreq*.997,3
asig    =    a1+a2+a3   
kenv    linenr    1,.07,.11,.01
    out    asig*kenv
    endin




f1 0 8192 10 .1 0 .2 0 0 .4 0 0 0 0 .8
f2 0 8192 10 1 0 .9 0 0 .7 0 0 0 .4
f3 0 8192 10 .5 0 .6 0 0 .3 0 0 0 .9
f0 10000
e





HTH,

dp


Istvan Varga wrote:

> Dave Phillips wrote:
>
>>  I like to drive Csound with an external sequencer, but recent CVS 
>> builds have returned a problem that had been solved. The behavior is 
>> easily repeated: When I stop the sequencer Csound segfaults and 
>> closes. Bummer, it severely breaks workflow. Maybe an errant MIDI 
>> message is closing things ?
>>
>>  I'm happy to help debug this but I need some Csound debugging 
>> pointers. Cs5 developers, do you have any suggestions ?
>
>
> Try compiling Csound with memory debugging (e.g. scons 
> customLIBS=-lefence),
> then run Csound with 'gdb --args ./csound [options...]'. When the crash
> has occured, type 'backtrace', and send a log of the messages printed 
> by gdb.
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-03-28 22:54
FromIstvan Varga
SubjectRe: [Cs-dev] MIDI control problem
Dave Phillips wrote:

>  I don't have efence on my machine, but I did a debug in gdb anyway. 
> Here's the results and the backtrace:
> [...]
> (gdb) backtrace
> #0  AllNotesOff (chn=0x0) at InOut/midirecv.c:441
> #1  0x08084c84 in midNotesOff () at InOut/midirecv.c:453
> #2  0x08084d9e in sensMidi (csound=0x8109b60) at InOut/midirecv.c:559
> #3  0x0807b053 in sensevents (csound=0x8109b60) at Engine/musmon.c:801
> #4  0x08066d27 in csoundPerformKsmps (csound=0x8109b60) at Top/csound.c:236
> #5  0x0804f63d in main (argc=3, argv=0xbffff724) at 
> frontends/csound/csound_main.c:154
> #6  0x40348a67 in __libc_start_main () from /lib/i686/libc.so.6
> (gdb)

Thanks, with this information I was able to find out what caused the crash.
In H/csoundCore.h, replace this line:
   #define MAXCHAN       96
with:
   #define MAXCHAN       16


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-03-29 03:03
FromDave Phillips
SubjectRe: [Cs-dev] MIDI control problem
Thanks again, Istvan, the fix works perfectly. :)

Best,

dp


Istvan Varga wrote:

> Dave Phillips wrote:
>
>>  I don't have efence on my machine, but I did a debug in gdb anyway. 
>> Here's the results and the backtrace:
>> [...]
>> (gdb) backtrace
>> #0  AllNotesOff (chn=0x0) at InOut/midirecv.c:441
>> #1  0x08084c84 in midNotesOff () at InOut/midirecv.c:453
>> #2  0x08084d9e in sensMidi (csound=0x8109b60) at InOut/midirecv.c:559
>> #3  0x0807b053 in sensevents (csound=0x8109b60) at Engine/musmon.c:801
>> #4  0x08066d27 in csoundPerformKsmps (csound=0x8109b60) at 
>> Top/csound.c:236
>> #5  0x0804f63d in main (argc=3, argv=0xbffff724) at 
>> frontends/csound/csound_main.c:154
>> #6  0x40348a67 in __libc_start_main () from /lib/i686/libc.so.6
>> (gdb)
>
>
> Thanks, with this information I was able to find out what caused the 
> crash.
> In H/csoundCore.h, replace this line:
>   #define MAXCHAN       96
> with:
>   #define MAXCHAN       16
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net