wxwidgets - wxFlexGridSizer AddGrowableCol throwing error -
i have several wxflexgridsizers used work in wxwigets version 2.8.11. after upgrading wxwidgets library 2.9.4 getting invalid column index in wxflexgridsizer::addgrowablecol().
here sample of sizer creating:
wxflexgridsizer* fgsizer1; fgsizer1 = new wxflexgridsizer( 3, 2, 0, 0 ); fgsizer1->addgrowablecol( 2 ); fgsizer1->setflexibledirection( wxboth ); fgsizer1->setnonflexiblegrowmode( wxflex_growmode_specified );
i tried changing value of addgrowablecol() arguement 1 because maybe thought might have been wrong before or still throws same error. can include stacktrace if helpful well.
..\..\src\common\sizer.cpp(1956): assert "!m_cols || idx < (size_t)m_cols" failed in wxflexgridsizer::addgrowablecol(): invalid column index call stack: [00] wxguiapptraitsbase::showassertdialog j:\wxwidgets-2.9.4\src\common\appcmn.cpp:475 [01] showassertdialog j:\wxwidgets-2.9.4\src\common\appbase.cpp:1265 [02] wxappconsolebase::onassertfailure j:\wxwidgets-2.9.4\src\common\appbase.cpp:761 [03] wxdefaultasserthandler j:\wxwidgets-2.9.4\src\common\appbase.cpp:1065 [04] wxonassert j:\wxwidgets-2.9.4\src\common\appbase.cpp:1141 [05] wxflexgridsizer::addgrowablecol j:\wxwidgets-2.9.4\src\common\sizer.cpp:1956 [06] myframe::myframe c:\users\james\documents\code\wx29starter - copy (2)\minimal.cpp:181 [07] myapp::oninit c:\users\james\documents\code\wx29starter - copy (2)\minimal.cpp:130 [08] wxappconsolebase::calloninit j:\wxwidgets-2.9.4\include\wx\app.h:94 [09] wxentryreal j:\wxwidgets-2.9.4\src\common\init.cpp:456 [10] wxentry j:\wxwidgets-2.9.4\src\msw\main.cpp:189 [11] wxentry j:\wxwidgets-2.9.4\src\msw\main.cpp:416 [12] winmain c:\users\james\documents\code\wx29starter - copy (2)\minimal.cpp:111 [13] __tmaincrtstartup f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:578 [14] winmaincrtstartup f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:403 [15] basethreadinitthunk [16] rtlinitializeexceptionchain [17] rtlinitializeexceptionchain
here assert code
void wxflexgridsizer::addgrowablecol( size_t idx, int proportion ) { wxassert_msg( !iscolgrowable( idx ), "addgrowablecol() called growable column" ); // see comment in addgrowablerow(): although it's less common omit // specification of number of columns, still can happen wxcheck_ret( !m_cols || idx < (size_t)m_cols, "invalid column index" ); m_growablecols.add( idx ); m_growablecolsproportions.add( proportion ); }
with confirmation winterblood changing parameter 1 call addgrowablecol()will solve problem, despite test!
Comments
Post a Comment