Re: [Jack-Devel] [LAU] jack2 turned verbose

PrevNext  Index
DateFri, 01 Jun 2012 14:52:03 +0200
From Robin Gareus <[hidden] at gareus dot org>
Tolinux-audio-user <[hidden] at lists dot linuxaudio dot org>, JACK Mailing List <[hidden] at lists dot jackaudio dot org>
Follow-UpDavid Adler Re: [Jack-Devel] [LAU] jack2 turned verbose
On 05/31/2012 01:58 AM, David Adler wrote:
> On Thu, May 31, 2012 at 1:00 AM, mark hadman wrote:
> 
>> I have the same verbose behaviour problem with jack2 on Arch Linux 64 bit.
> 
> Thanks Mark, good to know I'm not the only one.
> I have it on both, 64 and 32 bit.
> 
> best,
> d

It might have to do with Arch's compiler[-flags] and how jack2 uses
unions .. or scoping: JackGlobals vs Engine-Parameters.. although I
don't have an explanation.. all seems good.

A hunch: it could be caused by using 'server_ptr->verbose.b' (a union)
as boolean. The sever only checks "if (server_ptr->verbose.b)". The
union itself comprises other uninitialized values that could make it
evaluate to true (though it shouldn't, but maybe some compiler
optimization casts it to (int) instead of (bool) )


I know this is the '-users' list (I'm ccing jack-devel), but could
someone who experiences the problem try to track it down?

Basically just add a few printf()'s. Start at: common/JackControlAPI.cpp
- line 926 - before the call to  "new JackServer(..)" add

  printf("DEBUG verbose: %s\n",(server_ptr->verbose.b)?"on":"off");

recompile, launch jackd. If it prints "verbose: on", sth is wrong with
parameter initialization in main() or with using unions. If it's "off"
the problem sits deeper:

add a line just after common/JackServer.cpp line 66
  printf("DEBUG verbose2: %s\n",(JackGlobals::fVerbose)?"on":"off");
...

A crude test for the union() hunch would be to change
common/JackControlAPI.h line 53:
 replace
  "union jackctl_parameter_value"
with
  "struct jackctl_parameter_value"

and compile with '-fpermissive' like this:

  CXXFLAGS="-fpermissive" ./waf  configure
  ./waf

..not sure if that'll work though..

HTH,
robin
PrevNext  Index

1338555135.29847_0.ltw:2,a <4FC8BAF3.2080407 at gareus dot org>