Author Topic: C::B won't start (assertion failed) with wxGTK, compiled with debug USE flag  (Read 6427 times)

Offline Brane2

  • Multiple posting newcomer
  • *
  • Posts: 39
I'm using Gentoo 64-bit on Phenom and when I start it with wxGTK, compiled with debug USE flag ( which translates to being configured with "--enable-debug"), I get message:

Quote
An Assertion failed!

/var/tmp/portage/x11-libs/wxGTK-2.8.10.1-r3/work/wxPython-src-2.8.10.1/src/generic/imaglist.cpp(69):
assert "bitmap.GetWidth() >= m_width && bitmap.GetHeight() == m_height) || (m_width == 0 && m_height == 0)" failed in Add(): invalid bitmap size in wxImageList: this might work on this platform but definitely won't under Windows

After I click "Continue", message repeats for some 10x and after quite some similar messages program starts.
But just for about any operation "failed assertions" continue to pop up.

Is this normal ?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7256
Yes, because some of the images don't have correct size and will be resized by wxWidgets.

There are some more asserts, some that can be fixed, some that are fixed in codecompletion-refactoring-branch, some that can not (easily) be fixed.

You can uncheck the show this message next-time (or something like this) checkbox before pressing continue and you will not get the message anymore.

EDIT:

You can stop wxWidgets from popping up th assert-message with overriding the OnAssert-function:

Quote from: wxWidgets-docu
::wxOnAssert

void wxOnAssert(const char *fileName, int lineNumber, const char *func, const char *cond, const char *msg = NULL)

This function is called whenever one of debugging macros fails (i.e. condition is false in an assertion). It is only defined in the debug mode, in release builds the wxCHECK failures don't result in anything.

To override the default behaviour in the debug builds which is to show the user a dialog asking whether he wants to abort the program, continue or continue ignoring any subsequent assert failures, you may override wxApp::OnAssertFailure which is called by this function if the global application object exists.
« Last Edit: September 03, 2009, 01:05:59 pm by jens »