Segfault in AP_UnixFont::getGdkFont()

michael@surfnetcity.com.au
Wed, 3 Feb 1999 01:37:25 +1100


Ok, I'm getting a segfault in this function:

src/wp/unix/gr_UnixGraphics.cpp, UNIXGraphics::getFontAscent()

DEBUG: Found font [0x812ca08] in table.

**** (1) Assert ****
**** (1) gdkfont at xap_UnixFont.cpp:282 ****
**** (1) Continue ? (y/n) [y] :

Gdk-CRITICAL **: file gdkgc.c: line 475 (gdk_gc_set_font): assertion `font != NULL' failed.

**** (2) Assert ****
**** (2) gdkfont at xap_UnixFont.cpp:282 ****
**** (2) Continue ? (y/n) [y] :

Program received signal SIGSEGV, Segmentation fault.
0x8082d22 in UNIXGraphics::getFontAscent (this=0x8164130) at gr_UnixGraphics.cpp:329
(gdb)

Local Variables:

this = (UnixGraphics *) 0x8164130
prFont = (GdkFontPrivate *) 0x0
pXFont = (XFontStruct *) 0x8164e80

Oh, and here's the line where it segged (and the comment above it):

// TODO the following assignment looks suspicious...
XFontStruct* pXFont = (XFontStruct *)prFont->xfont;

Whoever wrote that TODO, well done, but it would have been nice to fix it ;-)

-- 
-- Michael Samuel <michael@surfnetcity.com.au>


This archive was generated by hypermail 1.03b2.