Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-03 Thread Fred Kiefer
Hi Riccardo, thank you for pointing out this issue. As I don’t have a Bigendian 64 bit system you will have to do the testing to pin this down. First I would propose that you add a few NSLog statements in NSButtonCell.m after line 1773. Most likely the data is not aligned in the unsigned int in

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-04 Thread Riccardo Mottola
Hi Fred, Fred Kiefer wrote: thank you for pointing out this issue. As I don’t have a Bigendian 64 bit system you will have to do the testing to pin this down. First I would propose that you add a few NSLog statements in NSButtonCell.m after line 1773. Most likely the data is not aligned in th

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-04 Thread Riccardo Mottola
Hi, Fred Kiefer wrote: thank you for pointing out this issue. As I don’t have a Bigendian 64 bit system you will have to do the testing to pin this down. First I would propose that you add a few NSLog statements in NSButtonCell.m after line 1773. Most likely the data is not aligned in the uns

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-05 Thread Fred Kiefer
> Am 05.01.2021 um 01:28 schrieb Riccardo Mottola : > > > Fred Kiefer wrote: >> thank you for pointing out this issue. As I don’t have a Bigendian 64 bit >> system you will have to do the testing to pin this down. First I would >> propose that you add a few NSLog statements in NSButtonCell.m

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-05 Thread Riccardo Mottola
Hi Fred, On 2021-01-05 08:07:59 + Fred Kiefer wrote: line 1094, after the mask is calculated, do you expect it to be always 0, both for on and off state? It is always 0 for me. As you can see a few lines above the value of mask depends on _cell.is_highlighted and _cell.state. You shoul

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Fred Kiefer
> Am 06.01.2021 um 01:06 schrieb Riccardo Mottola : > > On 2021-01-05 08:07:59 + Fred Kiefer wrote: > >>> line 1094, after the mask is calculated, do you expect it to be always 0, >>> both for on and off state? It is always 0 for me. >> As you can see a few lines above the value of mask

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Riccardo Mottola
Hi Fred, Fred Kiefer wrote: This on PPC64 2021-01-06 00:12:47.720 Ink[48256:48256] is highlghted 0 - state 0 - altStateMask 0 - highlightByMask 0 2021-01-06 00:12:47.722 Ink[48256:48256] is highlghted 0 - state 0 - altStateMask 0 - highlightByMask 0 2021-01-06 00:12:47.724 Ink[48256:48256] is

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Fred Kiefer
> Am 06.01.2021 um 15:32 schrieb Riccardo Mottola : > > Fred Kiefer wrote: >> >> You should concentrate on the _highlightByMask which gets decoded in line >> 1905 (_showAltStateMask is handled just below). > > I put a log statement "after" and I always get back zero, like this: > > 2021-01-

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Wolfgang Lux
> Am 06.01.2021 um 15:41 schrieb Fred Kiefer : > >  > The next step would be to compare these values with the ones you get on > amd64. But before that, could you please run the base tests on ppc64? Maybe > you get already a failing test there and this would just explain the > behaviour. We

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Wolfgang Lux
> Am 06.01.2021 um 17:15 schrieb Wolfgang Lux : > >  > >> Am 06.01.2021 um 15:41 schrieb Fred Kiefer : >> >>  >> The next step would be to compare these values with the ones you get on >> amd64. But before that, could you please run the base tests on ppc64? Maybe >> you get already a fail

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Fred Kiefer
> Am 06.01.2021 um 17:20 schrieb Wolfgang Lux : > > > >> Am 06.01.2021 um 17:15 schrieb Wolfgang Lux : >> >>  >> >>> Am 06.01.2021 um 15:41 schrieb Fred Kiefer : >>> >>>  >>> The next step would be to compare these values with the ones you get on >>> amd64. But before that, could you pl

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Riccardo Mottola
Hi Wolfgang! Wolfgang Lux wrote: I don’t think you need any further testing. The _highlightsByMask member is declared as NSInteger in NSButtonCell.h (which means 64 bits on x86-64 and ppc64) but unarchived as unsigned int in NSButtonCell.m (which means 32 bits) and big endian architectures as

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Riccardo Mottola
Hallo, Fred Kiefer wrote: The next step would be to compare these values with the ones you get on amd64. But before that, could you please run the base tests on ppc64? Maybe you get already a failing test there and this would just explain the behaviour. We always should start looking for an i

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Wolfgang Lux
Hi Riccardo, > good catch. We have two differences here 32bit vs 64bit, but also signed vs > unsigned! the difference between signed and unsigned is irrelevant for encoding and decoding, as you pass a pointer to the memory being encoded or decoded. However, the size of the value you want to en

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-06 Thread Fred Kiefer
> Am 06.01.2021 um 22:57 schrieb Wolfgang Lux : > >> good catch. We have two differences here 32bit vs 64bit, but also signed vs >> unsigned! > > the difference between signed and unsigned is irrelevant for encoding and > decoding, as you pass a pointer to the memory being encoded or decoded

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-07 Thread Riccardo Mottola
Hi all, Wolfgang Lux wrote: Yes. Changing the type you pass to the {en,de}codeValueOfObjCType methods is a, errm, not so bright idea. The types are included in the binary archives. So, trying to decode a value with a different type will give you an error (for your own safety and sanity). Try

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-07 Thread Fred Kiefer
> Am 07.01.2021 um 14:33 schrieb Riccardo Mottola : > > Wolfgang Lux wrote: >> Yes. Changing the type you pass to the {en,de}codeValueOfObjCType methods is >> a, errm, not so bright idea. The types are included in the binary archives. >> So, trying to decode a value with a different type will

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-07 Thread Wolfgang Lux
Am 06.01.2021 um 23:11 schrieb Fred Kiefer : > > > >> Am 06.01.2021 um 22:57 schrieb Wolfgang Lux : >> >>> good catch. We have two differences here 32bit vs 64bit, but also signed vs >>> unsigned! >> >> the difference between signed and unsigned is irrelevant for encoding and >> decoding, as

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-07 Thread Wolfgang Lux
Am 07.01.2021 um 14:33 schrieb Riccardo Mottola : > > Hi all, > > > Wolfgang Lux wrote: >> Yes. Changing the type you pass to the {en,de}codeValueOfObjCType methods is >> a, errm, not so bright idea. The types are included in the binary archives. >> So, trying to decode a value with a differen

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-07 Thread Richard Frith-Macdonald
Changing the type of the masks from NSInteger to uint32_t would also fix the encoding/decoding of course. Maybe that has other issues though.

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-07 Thread Richard Frith-Macdonald
> On 7 Jan 2021, at 17:12, Wolfgang Lux wrote: > > Am 07.01.2021 um 14:33 schrieb Riccardo Mottola : >> >> Hi all, >> >> >> Wolfgang Lux wrote: >>> Yes. Changing the type you pass to the {en,de}codeValueOfObjCType methods >>> is a, errm, not so bright idea. The types are included in the bi

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-07 Thread Riccardo Mottola
Hi Wolfgang, Wolfgang Lux wrote: So perhaps the mistake here (apart from not type in the decodeValueOfObjCType call) was that _highlightsByMask and _altStateMask attributes were changed from unsigned int to NSInteger rather than NSUInteger? Although, admittedly, the real mistake was that thos

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-07 Thread Riccardo Mottola
Hi Richard, Richard Frith-Macdonald wrote: Changing the type of the masks from NSInteger to uint32_t would also fix the encoding/decoding of course. Maybe that has other issues though. perhaps we should try a mixed approach: encode/decode in the format with uint32_t and int32_t, but then al

Re: NSControls failing to set status/label on BigEndian/64bit

2021-01-08 Thread Fred Kiefer
> Am 08.01.2021 um 01:23 schrieb Riccardo Mottola : > > Richard Frith-Macdonald wrote: >> Changing the type of the masks from NSInteger to uint32_t would also fix the >> encoding/decoding of course. Maybe that has other issues though. > > perhaps we should try a mixed approach: encode/decode