I just went through the whole code another time and noticed that I overlooked that chance of getting a loop because of macros. You should also add log statements before and after all macro calls especially around calls to WANT_LINE_HEIGHT.
Fred Am 17.01.2015 um 11:50 schrieb Fred Kiefer: > Not being able to debug this is bad. Eric's idea was of course the best way > to do this, but now we have to fall back to my last suugestion, that you seem > to have forgotten. What I would do is scatter around NSLog statements in the > whole loop to find out where the iteration is happening. Add one log before > and after the loop and one at the beginning and another at the end and more > every ten lines in the loop. This is really a brute force attempt and if you > are unlucky it will again make the code work without giving you further > information. > > The other way to track down usages of uninitialized data is to use valgrind. > But this is rather hard for you to do if you have no experiance with that > tool. > > Most likely the glyph width of zero is the underlying problem, but we still > need to see how this affects the code. > > Fred > > On the road > > Am 17.01.2015 um 10:52 schrieb Riccardo Mottola <[email protected]>: > >> Hi, >> >> Fred Kiefer wrote: >>> 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. >> that was try as I wrote. Since with debug symbols everything works, this is >> the "end" of the loop when it works: >> >> >> 2015-01-17 10:42:54.735 Ink[2050] Main glyph layout loop. i:15 >> 2015-01-17 10:42:54.737 Ink[2050] glyph size 6.857143 0.000000 >> 2015-01-17 10:42:54.739 Ink[2050] moving to next glyph >> 2015-01-17 10:42:54.740 Ink[2050] Main glyph layout loop. i:16 >> 2015-01-17 10:42:54.742 Ink[2050] glyph size 6.857143 0.000000 >> 2015-01-17 10:42:54.744 Ink[2050] moving to next glyph >> 2015-01-17 10:42:54.746 Ink[2050] Main glyph layout loop. i:17 >> 2015-01-17 10:42:54.748 Ink[2050] glyph size 6.857143 0.000000 >> 2015-01-17 10:42:54.750 Ink[2050] moving to next glyph >> 2015-01-17 10:42:54.752 Ink[2050] Main glyph layout loop. i:18 >> 2015-01-17 10:42:54.753 Ink[2050] glyph size 6.857143 0.000000 >> 2015-01-17 10:42:54.755 Ink[2050] moving to next glyph >> 2015-01-17 10:42:54.757 Ink[2050] Main glyph layout loop. i:19 >> 2015-01-17 10:42:54.759 Ink[2050] glyph size 6.857143 0.000000 >> 2015-01-17 10:42:54.761 Ink[2050] moving to next glyph >> 2015-01-17 10:42:54.763 Ink[2050] Main glyph layout loop. i:20 >> 2015-01-17 10:42:54.765 Ink[2050] GSHorizontalTypeSetter - howMany 0 >> 2015-01-17 10:42:54.768 Ink[2050] layoutNewParagraph: 0 >> >> if I recompile without debug symbols, >> 2015-01-17 10:49:09.767 Ink[3547] Main glyph layout loop. i:3 >> 2015-01-17 10:49:09.769 Ink[3547] glyph size 8.000000 0.000000 >> 2015-01-17 10:49:09.771 Ink[3547] moving to next glyph >> 2015-01-17 10:49:09.773 Ink[3547] Main glyph layout loop. i:4 >> 2015-01-17 10:49:09.775 Ink[3547] GSHorizontalTypeSetter - howMany 0 >> 2015-01-17 10:49:09.776 Ink[3547] layoutNewParagraph: 0 >> 2015-01-17 10:49:09.786 Ink[3547] layoutGlyphsInLayoutManager index 0 >> howMany 0 >> 2015-01-17 10:49:09.788 Ink[3547] layoutNewParagraph: 1 >> 2015-01-17 10:49:09.801 Ink[3547] layoutGlyphsInLayoutManager index 0 >> howMany 0 >> 2015-01-17 10:49:09.803 Ink[3547] layoutNewParagraph: 1 >> 2015-01-17 10:49:09.826 Ink[3547] f_ascender: 10.285714 >> 2015-01-17 10:49:09.828 Ink[3547] Main glyph layout loop. i:0 >> 2015-01-17 10:49:09.830 Ink[3547] f_ascender: 10.285714 >> 2015-01-17 10:49:09.831 Ink[3547] Main glyph layout loop. i:0 >> 2015-01-17 10:49:09.833 Ink[3547] f_ascender: 10.285714 >> <....> >> >> This at least means that it is not stuck at the "end" because they do not >> overlap, sizes are different, ascenders >> >> Can I print out glyphs somehow, so we know what is it trying to print out? >> >> Riccardo _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
