Home » U++ Library support » TabCtrl » TabCtrl crash in debug mode when using remove method
TabCtrl crash in debug mode when using remove method [message #23476] |
Thu, 22 October 2009 00:14 |
Didier
Messages: 680 Registered: November 2008 Location: France
|
Contributor |
|
|
Hello,
In my app I use TabCtrl. I add and remove tabs dynamically but there seems to be a bug: when the app is compiled in DEBUG mode it crashes when the last tab gets removed.
I looked in the debugger and it crashes in the following sequence:
Upp::AssertFailed (file=0x8296f14 "/home/didier/upphg/uppsrc/Core/Vcont.h", line=17, cond=0x8296f79 "i >= 0 && i < items") at /home/didier/upphg/uppsrc/Core/Util.cpp:86
Upp::Vector<void*>::Get (this=0xbfffdbe8, i=0) at /home/didier/upphg/uppsrc/Core/Vcont.h:17
Upp::Vector<void*>::operator[] (this=0xbfffdbe8, i=0) at /home/didier/upphg/uppsrc/Core/Vcont.h:32
Upp::Array<Upp::TabCtrl::Item>::Get (this=0xbfffdbe4, i=0) at /home/didier/upphg/uppsrc/Core/Vcont.h:132
Upp::Array<Upp::TabCtrl::Item>::operator[] (this=0xbfffdbe4, i=0) at /home/didier/upphg/uppsrc/Core/Vcont.h:144
Upp::TabCtrl::ScrollInto (this=0xbfffdb78, i=0) at /home/didier/upphg/uppsrc/CtrlLib/TabCtrl.cpp:257
Upp::TabCtrl::Layout (this=0xbfffdb78) at /home/didier/upphg/uppsrc/CtrlLib/TabCtrl.cpp:139
Upp::TabCtrl::Remove (this=0xbfffdb78, i=0) at /home/didier/upphg/uppsrc/CtrlLib/TabCtrl.cpp:401
testOnglet::closeOnglet (this=0xbfffda5c) at /home/didier/upphg/MyApps/testOnglet/main.cpp:34
The vector::get() statement crashes because we try to remove element '0' while there are no more elements in vector (items = 0)
When compiling in OPTIMAL mode, everything seems to be OK.
I joined a test app:
compil in DEBUG, Launch and press the close button 3 times (until last tab gets removed)
==> crash when trying to close last tab ?????
|
|
|
Goto Forum:
Current Time: Mon May 13 09:07:46 CEST 2024
Total time taken to generate the page: 0.02793 seconds
|