Assert Warnings related to Stdpbase.cpp and strvararg.h in MAC

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
preethis
Earned a small fee
Earned a small fee
Posts: 18
Joined: Tue Dec 05, 2017 9:10 am

Assert Warnings related to Stdpbase.cpp and strvararg.h in MAC

Post by preethis »

We are using WxWidgets 3.1 and Our project will run both in Windows and MAC.
In Windows we are using VS 2017 IDE and In MAC XCode IDE.

We are not using WX GUI.

The below warning messages are shown in the terminal when we run our application in MAC. In Windows there are no such warnings. Is there any specific settings or any preprocessor has to be added for MAC to avoid this kind of warning.

1) Code/WxWidgets3.1/Source/Src/Common/Stdpbase.cpp (62) : assert traits failed in Get(): Create wxApp before calling this

2) tools/wx/include/wx/strvararg.h(445): assert "(argtype & wxFormatStringSpecifier<T>::value))==argtype" failed in wxArgNormalizer(): Format specifier doesn't match the argument type


Please help!!!
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Assert Warnings related to Stdpbase.cpp and strvararg.h in MAC

Post by doublemax »

Did you run the Windows version in Debug mode?

Both asserts seem to indicate real issues in your code. You need to trace them back to the last code location in your code.

The first looks like you're calling a wxWidgets function / or create a wxWidgets object before wxWidgets itself is initialized. E.g. this can happen if have a global variable that is a wxWidgets object.

The second assert often happens when using a wrong parameter in a printf-style operation, e.g. %d instead of %ld
Use the source, Luke!
Post Reply