discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Hang in font panel with certain fonts


From: Eric Wasylishen
Subject: Re: Hang in font panel with certain fonts
Date: Mon, 12 Jan 2015 13:25:37 -0700

Hi,
Apologies if this is too basic, but here's my general strategy for
fixing infinite loops:
Just break into gdb any time when the program is stuck in the infinite
loop, and use a combination of:

n (next line without stepping into function calls)
s (step into function calls)
finish (finish execution of the current function and break at the next
line in the caller).

Note which line you start on, and keep using the 'n' command (or 's'
or 'finish', if needed) until execution loops back to where you
started.

Watch out for conditions that would normally cause the loop to
terminate, and try to see why that condition isn't being fulfilled.
(or maybe the code within the loop is correct, but the loop is missing
an exit condition that it should have.)

In my experience it's tedious, but faster and less error-prone than
adding printf's, recompiling, and then trying to interpret what the
printf's tell you about the execution.

Cheers,
Eric


On Sun, Jan 11, 2015 at 2:42 AM, Riccardo Mottola
<riccardo.mottola@libero.it> wrote:
> Hi Fred,
>
> Fred Kiefer wrote:
>>
>> The interesting bit is the end of your output. We stick in the main loop
>> but never get to any of your new log statements. This should mean that we
>> reach one of the continue statements further up in the code. Could you
>> please add a log output just before each of the continue lines? For me they
>> are on the lines 862 and 868.
>> All of this is based on the asumption that the "Main glyph layout loop.
>> i:" output comes from inside the main loop, that is from below line 732.
>
> Yes, the main loop is that one, it is commeted at that. The NSLog() is at
> line 735 for me.
>
> For line 862 I added a log for "Continue for prev. had non nominal width",
> for line 868 I just but a NSLo equal to the DebugLog which perhaps is not
> active ("ignoring unknown control character...")
>
> Output is getting slow and crowded, here it is an excerpt of the last part:
> 2015-01-11 10:24:30.954 Ink[2083] glyph size 7.000000 0.000000
> 2015-01-11 10:24:30.956 Ink[2083] moving to next glyph
> 2015-01-11 10:24:30.959 Ink[2083] Main glyph layout loop. i:4
> 2015-01-11 10:24:30.961 Ink[2083] glyph size 8.000000 0.000000
> 2015-01-11 10:24:30.964 Ink[2083] moving to next glyph
> 2015-01-11 10:24:30.966 Ink[2083] Main glyph layout loop. i:5
> 2015-01-11 10:24:30.968 Ink[2083] GSHorizontalTypeSetter - howMany 0
> 2015-01-11 10:24:30.971 Ink[2083] layoutNewParagraph: 0
> 2015-01-11 10:24:30.997 Ink[2083] layoutGlyphsInLayoutManager index 0
> howMany 0
> 2015-01-11 10:24:31.000 Ink[2083] layoutNewParagraph: 1
> 2015-01-11 10:24:31.024 Ink[2083] Main glyph layout loop. i:0
> 2015-01-11 10:24:31.026 Ink[2083] Main glyph layout loop. i:0
> 2015-01-11 10:24:31.029 Ink[2083] Main glyph layout loop. i:0
> 2015-01-11 10:24:31.031 Ink[2083] Main glyph layout loop. i:0
> 2015-01-11 10:24:31.034 Ink[2083] Main glyph layout loop. i:0
> 2015-01-11 10:24:31.036 Ink[2083] Main glyph layout loop. i:0
> 2015-01-11 10:24:31.039 Ink[2083] Main glyph layout loop. i:0
> 2015-01-11 10:24:31.041 Ink[2083] Main glyph layout loop. i:0
>
> we are not seeing the continue statements.
>
> I put a NSLog in my line 942 above the continue where !cell and last glyph
> is set to NSNullGlyph, but I don't see it either.
>
>
> Riccardo
>
> PS: when loading the FontPanel I get this:
> 2015-01-11 10:38:47.187 Ink[3619] Selected non-scalable font.
> 2015-01-11 10:38:47.505 Ink[3619] Selected non-scalable font.
> 2015-01-11 10:38:48.124 Ink[3619] Selected non-scalable font.
>
> But I suppose this is harmless and just means I have a mix of scalable and
> fixed bitmapped fonts (like Terminal), right?
>
>
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep



reply via email to

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