Re: [Jack-Devel] Netjack crashes, alignment broken recently

PrevNext  Index
DateFri, 11 Mar 2016 12:05:51 +0100
From Filipe Coelho <[hidden] at gmail dot com>
ToJACK <[hidden] at lists dot jackaudio dot org>
In-Reply-ToXavier Mendez [Jack-Devel] Netjack crashes, alignment broken recently
Follow-UpStéphane Letz Re: [Jack-Devel] Netjack crashes, alignment broken recently
Follow-UpXavier Mendez Re: [Jack-Devel] Netjack crashes, alignment broken recently
On 10.03.2016 18:41, Xavier Mendez wrote:
> Just compiled the latest jackd2, and when using Netjack both manager 
> and driver crash after sending parameters. I traced back to this 
> change from 02f74a659, which modifies the network parameter struct:
>
> --- a/common/JackNetTool.h
> +++ b/common/JackNetTool.h
> @@ -94,9 +94,9 @@ namespace Jack
> -        char fName[JACK_CLIENT_NAME_SIZE];
> -        char fMasterNetName[JACK_SERVER_NAME_SIZE];
> -        char fSlaveNetName[JACK_SERVER_NAME_SIZE];
> +        char fName[JACK_CLIENT_NAME_SIZE+1];
> +        char fMasterNetName[JACK_SERVER_NAME_SIZE+1];
> +        char fSlaveNetName[JACK_SERVER_NAME_SIZE+1];
>
> That extra byte for the NUL terminator breaks the alignment, and 
> somehow causes some ints to be sent as little-endian:
>
>     Sample rate : 12288000 frames per second
>     Period size : 131072 frames per period
>
> Reverting the three lines seems to resolve the problem. I don't really 
> see the use for having the NUL terminator go through the network...
>
> What do you think?

I can confirm this is an issue for me.
The "-d net" option stopped working some time ago and I've been 
wondering why, that change seems to be the reason.

Reverting it in both client&server makes netmanager work again.


Please do a pull request against jack2's github repo.
That would be the fastest way to get this fixed upstream.
PrevNext  Index

1457694363.16240_0.ltw:2,a <56E2A68F.9040507 at gmail dot com>