wxMotif: Assertion in the widgets sample

21 views
Skip to first unread message

Igor Korot

unread,
Jun 21, 2014, 2:27:46 AM6/21/14
to wx-dev
Hi, ALL,
I successfully compiled wxMotif under Oracle Solaris and then build all sample.
The build went thru fine.

The configure line used was:

../configure --enable-debug --enable-debug_gdb --with-motif --enable-utf8

and I also had to put

#undef wxUSE_GRAPHICS_CONTEXT

in the file include/wx/motif/chkconf.h.

Running minimal sample I got a warning in the console:

Warning: Missing charsets in String to FontSet conversion

My guess is that it is coming from me enabling utf8.
I can look where does it coming from later unless Vadim/someone else
already knows. ;-)

The next sample I run was widgets.
This gives me an assert failure: src/motif/settings.cpp(162): assert
"Assert failure" failed: unknown colour

Running under the debugger I see that the sample is trying to create
wxGenericTreeCtrl with the m_highlightBrush of the color
wxSYS_COLOUR_HIGHLIGHT.
But the closest colour referenced in the file src/motif/settings.cpp
is wxSYS_COLOUR_HOTLIGHT in wxSystemSettingsNative::GetColour().

This is most likely a missing switch branch.
So adding wxSYS_COLOUR_HIGHLIGHT should make the code run again.
The addition will probably needs to be added below wxSYS_COLOUR_HIGHLIGHT.

Thank you.

Igor Korot

unread,
Jun 21, 2014, 2:43:08 AM6/21/14
to wx-dev
Apologies.
I really need some rest. and get used to dbx on Solaris. ;-)

The failing color index is wxSYS_COLOUR_LISTBOXTEXT.

stack trace:

wxSystemSettingsNative::GetColour() in settings.cpp
wxGenericTreeCtrl::GetClassDefaultAttribute() line 4125 in treectlg.cpp
wxGenericTreeCtrl::GetDefaultAttributes() line 218 in treectlg.cpp
wxGenericTreeCtrl::Create() line 1014 in treectlg.cpp
wxGenericTreeCtrl::wxGenericTreeCtrl() line 55 in treectlg.cpp
wxTreeCtrl::wxTreeCtrl() line 384 in treectlg.h
wxTreebook::Create() line 97 in treebkg.cpp

Thank you.

Igor Korot

unread,
Jun 21, 2014, 4:15:19 AM6/21/14
to wx-dev
On Fri, Jun 20, 2014 at 11:43 PM, Igor Korot <ikor...@gmail.com> wrote:
> Apologies.
> I really need some rest. and get used to dbx on Solaris. ;-)
>
> The failing color index is wxSYS_COLOUR_LISTBOXTEXT.

After fixing this one the next assert is this:

../src/motif/dcclient.cpp(794): assert "sourceDC" failed: Blit source
DC must br wxWindowDCImpl or derived class.

stack trace is:

wxWindowDCImpl::DoBlit() line 794 in dcclient.cpp
wxMotifDCImpl::DoDrawBitmap() line 62 in dc.cpp
wxDC::DrawBitmap() line 1212 in dc.h
wxGenericImageList::Draw() line 256 in imaglist.cpp
wxGenericTreeCtrl::PaintItem() line 2664 in treectlg.cpp
wxGenericTreeCtrl::PaintLevel() line 2809 in treectlg.cpp
wxGenericTreeCtrl::PaintLevel() line 2739 in treectlg.cpp
wxGenericTreeCtrl::OnPaint() line 3025 in treectlg.cpp

Thank you.
Reply all
Reply to author
Forward
0 new messages