[wx 2.6.3, X11,
g++4.0.3] wxHtml crashes in unicode build because of NULL pangoContext
Ryan Jaeger
rjaeger at quizam.com
Thu Sep 7 13:49:28 PDT 2006
Hi,
I'm trying to run the htmlview sample in the wxX11 widgets build. Here are
the config options I used to build widgets:
wxUSE_MONOLITHIC=no
wxUSE_LIBPNG=yes
wxUSE_LIBJPEG=yes
wxUSE_LIBSDL=yes
wxUSE_SHARED=no
wxUSE_DEBUG=yes
wxUSE_UNICODE=yes
wxUSE_HTML=yes
wxUSE_MEDIACTRL=yes
wxUSE_X11=yes
The sample compiles without error, but will crash on runtime displaying
these errors:
(process:11956): Pango-CRITICAL **: pango_layout_new: assertion `context !=
NULL' failed
(process:11956): Pango-CRITICAL **: pango_layout_set_font_description:
assertion `layout ! = NULL' failed
(process:11956): Pango-CRITICAL **: pango_layout_set_text: assertion `layout
!= NULL' failed
(process:11956): Pango-CRITICAL **: pango_layout_get_extents: assertion
`layout != NULL' failed
I've been able to track the issue to some code in src/x11/dcclient.cpp
wxWindowDC::wxWindowDC()
{
.
.
#if wxUSE_UNICODE
m_context = (pangoContext *)NULL;
m_fontdesc = (pangoFontDescription *)NULL;
#endif
}
If the m_context is initialized to wxTheApp->GetpangoContext() (as found in
the wxWindowDC(wxWindow *) ctor), then the
sample app won't crash and it will load (except for the correct fonts.). It
appears that this ctor is being called when the wxWindow(wxWindow*) ctor
should be used instead.
I'm having difficulty tracking down why this issue exists in wxHtml and
where the fix should go. Can anyone point me in the right direction?
Cheers,
ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20060907/851e26a6/attachment.htm
More information about the wx-users
mailing list