[wx 2.6.3, X11, g++4.0.3] wxHtml crashes in unicode build because of NULL pangoContext

Ryan Jaeger rjaeger at quizam.com
Mon Sep 11 08:28:18 PDT 2006


Hi Vadim,
I have 2 stack traces for you, the one you asked for and one that shows were
the PangoContext gets initialized(err.. doesn't get initialized) in the
widgets code. The latter is here first:
 
1  function="wxStackWalker::Walk(unsigned int)"
file="../src/unix/stackwalk.cpp:222"
2  function="wxDebugReport::AddContext(wxDebugReport::Context)"
file="../src/common/debugrpt.cpp:484"
3  function="wxDebugReport::AddCurrentContext()"
file="../include/wx/debugrpt.h:line="68"
4  function="wxWindowDC" file="../src/x11/dcclient.cpp:190"
5  function="wxMemoryDC" file="../src/x11/dcmemory.cpp:24"
6  function="wxWin32Renderer" file="../src/univ/themes/win32.cpp:1554"
7  function="wxWin32Theme::GetRenderer()"
file="../src/univ/themes/win32.cpp:1269"
8  function="wxWindow::Init()" file="../src/univ/winuniv.cpp:111"
9  function="wxWindow" file="../include/wx/univ/window.h:58"
10 function="wxTopLevelWindowBase" file="../src/common/toplvcmn.cpp:55"
11 function="wxTopLevelWindowX11" file="../include/wx/x11/toplevel.h:27"
12 function="wxTopLevelWindow" file="../include/wx/univ/toplevel.h:100"
13 function="wxFrameBase" file="../src/common/framecmn.cpp:67"
14 function="wxFrame" file="../include/wx/univ/frame.h:26"
15 function="wxHtmlHelpFrame" file="../include/wx/html/helpfrm.h:83"
16 function="wxHtmlHelpController::CreateHelpFrame(wxHtmlHelpData*)"
file="../src/html/helpctrl.cpp:126"
17 function="wxHtmlHelpController::CreateHelpWindow()"
file="../src/html/helpctrl.cpp:145"
18 function="wxHtmlHelpController::DisplayContents()"
file="../src/html/helpctrl.cpp:325"
19 function="MyApp::OnInit()"
file="../../../../samples/html/helpview/helpview.cpp:89"
20 function="wxAppConsole::CallOnInit()"
file="../../../../include/wx/app.h:87"
21 function="wxEntry(int&, wchar_t**)" file="../src/common/init.cpp:423"
22 function="wxEntry(int&, char**)" file="../src/common/init.cpp:452"
23 function="main" file="../../../../samples/html/helpview/helpview.cpp:56"
24 function="__libc_start_main"


========================
And 2nd is the g_log stack trace:

#0  0xb7e7d017 in g_log () from /usr/lib/libglib-2.0.so.0
#1  0xb7e7d10a in g_return_if_fail_warning () from /usr/lib/libglib-2.0.so.0
#2  0xb7f24e54 in pango_layout_new (context=0x0) at pango-layout.c:216
#3  0x080b197f in wxWindowDC::DoDrawText (this=0xbfc8e944, text=@0x8444098,
    x=10, y=10) at ../src/x11/dcclient.cpp:1564
#4  0x0809624d in wxDCBase::DrawText (this=0xbfc8e944, text=@0x8444098,
x=10,
    y=10) at dc.h:263
#5  0x08092daa in wxHtmlWordCell::Draw (this=0x8444068, dc=@0xbfc8e944,
x=10,
    y=10, info=@0xbfc8ebb0) at ../src/html/htmlcell.cpp:466
#6  0x080948c8 in wxHtmlContainerCell::Draw (this=0x86b6088, dc=@0xbfc8e944,
    x=0, y=0, view_y1=0, view_y2=432, info=@0xbfc8ebb0)
    at ../src/html/htmlcell.cpp:961
#7  0x080948c8 in wxHtmlContainerCell::Draw (this=0x86b5e18, dc=@0xbfc8e944,
    x=0, y=0, view_y1=0, view_y2=432, info=@0xbfc8ebb0)
    at ../src/html/htmlcell.cpp:961
#8  0x08075dd9 in wxHtmlWindow::OnPaint (this=0x88ceb60)
    at ../src/html/htmlwin.cpp:940
#9  0x081f4d1f in wxAppConsole::HandleEvent (this=0x83f53c8,
    handler=0x88ceb60, func=
      {__pfn = 0x80759fe <wxHtmlWindow::OnPaint(wxPaintEvent&)>, __delta =
0},
    event=@0xbfc8eda0) at ../src/common/appbase.cpp:324
#10 0x08272cf2 in wxEvtHandler::ProcessEventIfMatches (entry=@0x83ac3d0,
    handler=0x88ceb60, event=@0xbfc8eda0) at ../src/common/event.cpp:1193
#11 0x082730a1 in wxEventHashTable::HandleEvent (this=0x83ac478,
    event=@0xbfc8eda0, self=0x88ceb60) at ../src/common/event.cpp:875
#12 0x08273eef in wxEvtHandler::ProcessEvent (this=0x88ceb60,
    event=@0xbfc8eda0) at ../src/common/event.cpp:1255
#13 0x08273f30 in wxEvtHandler::ProcessEvent (this=0x8484d50,
    event=@0xbfc8eda0) at ../src/common/event.cpp:1262
#14 0x081882d7 in wxScrollHelperEvtHandler::ProcessEvent (this=0x8484d50,
    event=@0xbfc8eda0) at ../src/generic/scrlwing.cpp:212
#15 0x080bfce9 in wxWindowX11::SendPaintEvents (this=0x88ceb60)
    at ../src/x11/window.cpp:1210
#16 0x080c0061 in wxWindowX11::Update (this=0x88ceb60)
    at ../src/x11/window.cpp:1170
#17 0x080c014a in wxWindowX11::OnInternalIdle (this=0x88ceb60)
    at ../src/x11/window.cpp:1286
#18 0x080765cc in wxHtmlWindow::OnInternalIdle (this=0x88ceb60)
    at ../src/html/htmlwin.cpp:1073
#19 0x08112dfa in wxAppBase::SendIdleEvents (this=0x83f53c8, win=0x88ceb60,
    event=@0xbfc8ef74) at ../src/common/appcmn.cpp:426
#20 0x08112e96 in wxAppBase::SendIdleEvents (this=0x83f53c8, win=0x88ce970,
    event=@0xbfc8ef74) at ../src/common/appcmn.cpp:440
#21 0x08112e96 in wxAppBase::SendIdleEvents (this=0x83f53c8, win=0x841bc38,
    event=@0xbfc8ef74) at ../src/common/appcmn.cpp:440
#22 0x08112d41 in wxAppBase::ProcessIdle (this=0x83f53c8)
    at ../src/common/appcmn.cpp:406
#23 0x080a6d5a in wxEndBusyCursor () at ../src/x11/cursor.cpp:206
#24 0x08051acf in ~wxBusyCursor (this=0xbfc8f087) at utils.h:552
#25 0x080740f7 in wxHtmlWindow::LoadPage (this=0x88ceb60,
location=@0xbfc8f0f4)
    at ../src/html/htmlwin.cpp:482
#26 0x0805b09c in wxHtmlHelpFrame::DisplayContents (this=0x841bc38)
    at ../src/html/helpfrm.cpp:749
#27 0x080517c8 in wxHtmlHelpController::DisplayContents (this=0x84195a8)
    at ../src/html/helpctrl.cpp:325
#28 0x0804fec3 in MyApp::OnInit (this=0x83f53c8)
    at ../../../../samples/html/helpview/helpview.cpp:87
#29 0x08050228 in wxAppConsole::CallOnInit (this=0x83f53c8) at app.h:87
#30 0x08227ba9 in wxEntry (argc=@0xbfc8f210, argv=0x83c14f0)
    at ../src/common/init.cpp:423
#31 0x08227c91 in wxEntry (argc=@0xbfc8f210, argv=0xbfc8f294)
    at ../src/common/init.cpp:451
#32 0x0804fc66 in main (argc=2, argv=0xbfc8f294)
    at ../../../../samples/html/helpview/helpview.cpp:56


Keep me posted as I'm curious...

Cheers,

Ryan



-----Original Message-----
From: Vadim Zeitlin [mailto:vadim at wxwindows.org] 
Sent: September 9, 2006 9:43 AM
To: wx-users at lists.wxwidgets.org
Subject: Re: [wx 2.6.3, X11, g++4.0.3] wxHtml crashes in unicode build
because of NULL pangoContext

On Thu, 7 Sep 2006 13:49:28 -0700 Ryan Jaeger <rjaeger at quizam.com> wrote:

RJ> The sample compiles without error, but will crash on runtime displaying
RJ> these errors:
...
RJ> I'm having difficulty tracking down why this issue exists in wxHtml and
RJ> where the fix should go. Can anyone point me in the right direction?

 Could you please show the backtrace when this happens? It should be enough
to put a breakpoint on g_log() function (used by GTK and, hopefully, Pango,
to print out the errors you see) to be able to see it.

 Thanks,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wx-users-help at lists.wxwidgets.org





More information about the wx-users mailing list