Good evening, again,

I'm going to spam the mailing list because this is way above my
knowledge of the WindowMaker codebase and especially Pango and,
consequently, I can't tell if I'm missing something or if GDB is fscking
with me.

I don't have pango compiled with debug symbols but I looked over its
source. Going down the stack trace, I end up at two while loops in
pango_layout_get_extents_internal , both of which iterate over a list of
lines in layout->line. I don't think there's any other place where we
could end up stuck down that stack trace.

layout, in our case, is the layout member of the W_Font structure, but:

#9  0x00007ffff7babe12 in fitText (text=text@entry=0x7b6a50 "Manual:
 Click on the window to set keyboard input focus",
 font=font@entry=0x68cc80, width=width@entry=192, wrap=wrap@entry=1) at
 wmisc.c:108
108             w = WMWidthOfString(font, text, beforecrlf);
gdb> p *font
$18 = {screen = 0x679430, font = 0x6b75d0, height = 13, y = 10, refCount
 = 2, name = 0x68cb00 "Sans:pixelsize=11"}

Now let's get down one stack level:

gdb> down
#8  0x00007ffff7ba62f8 in WMWidthOfString (font=font@entry=0x68cc80,
 text=text@entry=0x7b6a50 "Manual:  Click on the window to set keyboard
 input focus", length=length@entry=56) at wfont.c:300
300            pango_layout_get_pixel_size(font->layout, &width, NULL);
gdb> p *font
$19 = {screen = 0x679430, font = 0x6b75d0, height = 13, y = 10, refCount
 = 2, name = 0x68cb00 "Sans:pixelsize=11", layout = 0x698030}

Where did the layout member come from?

And the weirdness continues:

gdb> p font->layout
$21 = (PangoLayout *) 0x698030

But if I go back up a stack level:

gdb> #9  0x00007ffff7babe12 in fitText (text=text@entry=0x7b6a50 "Manual:
Click on the window to set keyboard input focus",
font=font@entry=0x68cc80, width=width@entry=192, wrap=wrap@entry=1) at
wmisc.c:108
108             w = WMWidthOfString(font, text, beforecrlf);
gdb> p font->layout
There is no member named layout.

There's a difference in the size reported for font, too! p sizeof(*font)
shows 32 in fitText, but it's 40 in WMWidthOfString.

Is this some strange linking issue? Or perhaps the layout member is
being corrupted someplace because its presence is ignored
(i.e. something that modifies font needs to do something special
 #ifdef USE_PANGO?)

Like I said, though, I'm not familiar enough with the WINGs codebase and
all I know about Pango is, literally, that it's some library that has to
do with fonts. I'm posting this in the hope that it rings a bell for
someone.

-alex

On Tue, Nov 25, 2014 at 10:49:34PM +0200, Alexandru Lazar wrote:
> In case anyone else is trying to reproduce this and fails the first
> time, it only happens with --enable-pango (which I couldn't make out,
> either, until I saw the fuller backtrace).
> 
> Best regards,
> Alex
> 
> On Tue, Nov 25, 2014 at 02:52:38PM -0500, Charles Philip Chan wrote:
> > Hello:
> > 
> > Here is a fuller bracktrace with debug on in Window Maker:
> > 
> > ,----[ Backtrace ]
> > | (gdb) bt                                                                  
> >                                                                             
> >                                                                             
> >                                                                             
> >                        |
> > | #0  0x00007ffff71023f6 in check_context_changed 
> > (layout=layout@entry=0x6e2030 [PangoLayout])                                
> >                                                                             
> >                                                                             
> >                                                    |
> > | at pango-layout.c:1320                                                    
> >                                                                             
> >                                                                             
> >                                                                             
> >                        |
> > | #1  0x00007ffff7102e5e in pango_layout_check_lines (layout=0x6e2030 
> > [PangoLayout])                                                              
> >                                                                             
> >                                                                             
> >                                 |
> > | at pango-layout.c:3911                                                    
> >                                                                             
> >                                                                             
> >                                                                             
> >                        |
> > | #2  0x00007ffff7104ed8 in pango_layout_get_extents_internal 
> > (layout=0x6e2030 [PangoLayout], ink_rect=0x0, logical_rect=0x7fffffffcd80, 
> > line_extents=0x0) at pango-layout.c:2587                                    
> >                                                                             
> >                                              |
> > | #3  0x00007ffff7105306 in pango_layout_get_pixel_extents (layout=0x6e2030 
> > [PangoLayout], ink_rect=ink_rect@entry=0x0, 
> > logical_rect=logical_rect@entry=0x7fffffffcd80) at pango-layout.c:2808      
> >                                                                             
> >                                                                |
> > | #4  0x00007ffff7105336 in pango_layout_get_pixel_size (layout=<optimized 
> > out>, width=width@entry=0x7fffffffcdbc, height=height@entry=0x0) at 
> > pango-layout.c:2857                                                         
> >                                                                             
> >                                     |
> > | #5  0x00007ffff7ba8588 in WMWidthOfString (font=font@entry=0x654c60, 
> > text=text@entry=0x76aae0 "Manual:  Click on the window to set keyboard 
> > input focus", length=length@entry=56) at wfont.c:300                        
> >                                                                             
> >                                  |
> > | #6  0x00007ffff7bae0a2 in fitText (text=text@entry=0x76aae0 "Manual:  
> > Click on the window to set keyboard input focus", font=font@entry=0x654c60, 
> > width=width@entry=192, wrap=wrap@entry=1)                                   
> >                                                                             
> >                            |
> > | at wmisc.c:108                                                            
> >                                                                             
> >                                                                             
> >                                                                             
> >                        |
> > | #7  0x00007ffff7bae72c in W_GetTextHeight (font=font@entry=0x654c60, 
> > text=text@entry=0x76aae0 "Manual:  Click on the window to set keyboard 
> > input focus", width=width@entry=192, wrap=wrap@entry=1)                     
> >                                                                             
> >                                   |
> > | at wmisc.c:153                                                            
> >                                                                             
> >                                                                             
> >                                                                             
> >                        |
> > | #8  0x00007ffff7baeabb in W_PaintTextAndImage (view=0x76a9a0, 
> > wrap=wrap@entry=1, textColor=0x64fb00, font=0x654c60, relief=WRFlat, 
> > text=0x76aae0 "Manual:  Click on the window to set keyboard input focus", 
> > alignment=alignment@entry=WALeft, image=0x6e52d0, position=WIPLeft, 
> > backColor=backColor@entry=0x0, ofs=0) at wmisc.c:304 |
> > | #9  0x00007ffff7b9c2d3 in paintButton (bPtr=<optimized out>) at 
> > wbutton.c:594                                                               
> >                                                                             
> >                                                                             
> >                                  |
> > | #10 0x00007ffff7b9cf95 in WMSetButtonSelected (bPtr=0x76a910, 
> > isSelected=isSelected@entry=1)                                              
> >                                                                             
> >                                                                             
> >                                    |
> > | at wbutton.c:378                                                          
> >                                                                             
> >                                                                             
> >                                                                             
> >                        |
> > | #11 0x000000000041204f in createPanel (panel=0x70ab20) at Focus.c:76      
> >                                                                             
> >                                                                             
> >                                                                             
> >                        |
> > | #12 0x000000000041204f in createPanel (p=0x70ab20) at Focus.c:343         
> >                                                                             
> >                                                                             
> >                                                                             
> >                        |
> > | #13 0x0000000000409896 in changeSection (panel=0x70ab20) at WPrefs.c:313  
> >                                                                             
> >                                                                             
> >                                                                             
> >                        |
> > | #14 0x0000000000409896 in changeSection (self=<optimized out>, 
> > data=0x70ab20) at WPrefs.c:365                                              
> >                                                                             
> >                                                                             
> >                                   |
> > | #15 0x00007ffff7ba5b29 in WMHandleEvent 
> > (event=event@entry=0x7fffffffd140) at wevent.c:273                          
> >                                                                             
> >                                                                             
> >                                                          |
> > | #16 0x000000000040957a in main (argc=1, argv=<optimized out>) at 
> > main.c:198                                                                  
> >                                                                             
> >                                                                             
> >                                 |
> > `----
> > 
> > Charles
> > 
> > -- 
> > We come to bury DOS, not to praise it.
> > (Paul Vojta, [email protected], paraphrasing a quote of Shakespeare)
> 
> 
> 
> -- 
> To unsubscribe, send mail to [email protected].


-- 
To unsubscribe, send mail to [email protected].

Reply via email to