discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep app fails on Ubuntu 16 - found workaround


From: Fred Kiefer
Subject: Re: GNUstep app fails on Ubuntu 16 - found workaround
Date: Mon, 11 May 2020 17:46:25 +0200


> Am 11.05.2020 um 13:16 schrieb Andreas Höschler via Discussion list for the 
> GNUstep programming environment <discuss-gnustep@gnu.org>:
> 
>> Thank you Andreas for this huge amount of data. It seems to show that my 
>> guess was wrong. The problem is not happening in the GSHorizontalTypesetter 
>> and all the extra rects that are shown look correct. But when ever a wrong 
>> height shows up it looks like these lines:
>> 
>>> 2020-05-09 20:19:40.720 SOObjectBrowser[4163:4163] cache_lookup hit 1
>>> 2020-05-09 20:19:40.720 SOObjectBrowser[4163:4163] In attributed string and 
>>> got result from  c->usedRect {x = 0; y = 0; width = 1; height = 1e+07}
>> 
>> First a cache hit in the string drawing code and then the wrong height, but 
>> that height never seems to get produced by the NSLayoutManager. This must 
>> point to an error in the cache itself. I found that we do not clean the 
>> „used“ flag for the cache when setting it up. Could it be that you are just 
>> picking up a random cache entry? I am not sure about that but hacked 
>> together a fix hat initialises the cache entries as unused explicitly. Could 
>> you please pull the current code from the GNUstep repository and try again 
>> with that? This will also include my other attempts in fixing this issue. 
>> They should at least not do any harm.
> 
> I have repulled libs-gui from git and the problem is gone. My 
> 
>       2020-05-09 20:19:40.765 SOObjectBrowser[4163:4163] Got height 
> 10000004.000000. We correct this ...
> 
> workaround is no longer triggered. 
> 
> Thanks a lot for your effort!!

Thank you Andreas for confirming that finally I found the correct spot to fix 
the issue.

> 
>> On 10 May 2020, at 23:57, Riccardo Mottola <riccardo.mottola@libero.it> 
>> wrote:
>> 
>> I remember this, I have a déjà-vu here! Don't remember the App, but chasing 
>> down exactly this issue, I remember that it should be at least "one line" 
>> height and that there were issue.
> 
> According to my google search result forwarded a couple of days ago this 
> issue indeed popped up for others as well. One app that apparently triggered 
> it was ProjectCenter. I have never looked into the ProjectCenter code. But 
> the problem must have occurred in all apps that do auto resizing of the 
> interface using [NSControl sizeToFit] and have image only buttons (obviously 
> a rather seldom combination). :-)

I think Riccardo was referring to the issues that your work around (returning 
zero size for an empty string) would be causing. We worked on that one together 
a few years ago that is why we both remembered the issues with that solution. 
Luckily it is no longer needed.

Cheers,
Fred 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]