[Jack-Devel] Fwd: Re: jack_connect with many channels

PrevNext  Index
DateMon, 20 Oct 2014 05:08:11 +0200
From [hidden] at trellis dot ch <[hidden] at trellis dot ch
To[hidden] at lists dot jackaudio dot org
btw this is the backtrace of the client having that issue:
http://pastebin.com/0RdDNcR9
i've tried to strip it down so it does practically the same as the test 
program http://pastebin.com/B34ENL4y which hasn't the issue. also why 
the bogus client can work with jack2 is a riddle for me. I'll look 
further

-------- Original Message --------
Subject: Re: [Jack-Devel] jack_connect with many channels
Date: 2014-10-20 04:47
 From: [hidden]
To: [hidden]

Hello Robin

a small test program one seems to work. Hm. I guess i have to look 
further why practically the same code doesn't work in another client. 
Thanks,

Tom

http://pastebin.com/B34ENL4y

On 2014-10-20 01:20, Robin Gareus wrote:
>> On Oct 19, 2014, at 8:17 PM, [hidden] wrote:
>> 
>> 
>> Hi
>> 
>> i use the following code snippet to connect all available 
>> hardware/system
>> capture ports to a client:
>> 
>> --
>> 
>>  if(autoconnect==1)
>>  {
>>    int j=0;
>>    int i=0;
>>    for(i=0;i<input_port_count;i++)
>>    {
>>      if (ports[i]!=NULL)
>>      {
>>        if(!jack_connect (client, 
>> ports[i],jack_port_name(ioPortArray[j])))
> 
> // what is ioPortArray[],  ports[] and how do you query 
> input_port_count?
> // more context is needed
> 
>>        {
>>          fprintf (stderr, "autoconnect: %s -> %s\n",
>>            ports[i],jack_port_name(ioPortArray[j])
>>          );
>>          j++;
>>        }
>>        else
>>        {
> 
> // if you get here ports[i] == NULL
> 
>>          fprintf (stderr, "autoconnect: failed: %s -> %s\n",
>>            ports[i],jack_port_name(ioPortArray[j])
>>          );
> 
> // ..and hence you pass a null pointer to printf. not nice.
> // (some printf implementation can handle it but don’t count on it).
> // This would certainly explain the segfault that you’ve pasted below.
> 
>>        }
>>      }
>>    }
>>    fprintf (stderr, "\n");
>>  }
>> 
>>  free (ports);
>> —
>> 
> 
> [..]
> 
>> Maybe the client code is buggy. When the client in question is run in 
>> gdb,
>> this is the output:
>> 
>> [New Thread 0x7ffff7fa0700 (LWP 6321)]
>> autoconnect: system:capture_1 -> send:input_1
>> autoconnect: system:capture_2 -> send:input_2
>> 
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00007ffff73278f3 in _IO_vfprintf_internal (s=s@entry=0x7fffffffc840,
>>    format=<optimized out>, format@entry=0x7ffff7bccdbc "%s",
>>    ap=ap@entry=0x7fffffffc9a8) at vfprintf.c:1661
>> 1661	vfprintf.c: No such file or directory.
> 
> get a backtrace here.
> 
> best,
> robin
> 
> Jack-Devel mailing list
> [hidden]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
PrevNext  Index

1413774511.5922_0.ltw:2, <ac880d41702246f1bf0e7cfb03f21e7b at trellis dot ch>