I'm using CEGUI 0.7 with Ogre. I'm not sure if this is a bug in my code or in CEGUI as I lack experience with the library. I have a MultiColumnList that I update every once in a while with object's info. Objects are added periodically to the list. If I sort the list, the next object to be added does not appear in the list and the one after that causes the crash. If I do not sort the list, everything is fine. The error is "Expression : sequence not ordered". Also, if I try to reorder the list after the object that does not appear, it still doesn't appear. Just in case it doesn't make any sense, here's a play-by-play :
1. Let objects A and B be added into the list
2. Sort the list
3. Object C is added to the list but does not appear
4. Reordering the list here does not make C appear
5. Object D is added to the list and it crashes
This is the stack trace :
Code: Select all
> CEGUIBase_d.dll!std::_Debug_order_single2<std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > >(std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > _First={d_items=[2](0x04fef110 {d_textCols={...} d_font=0x00000000 d_renderedString={...} ...},0x04fef520 {d_textCols={...} d_font=0x00000000 d_renderedString={...} ...}) d_sortColumn=0 d_rowID=0 }, std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > _Last={d_items=[349230288](...,...) d_sortColumn=0 d_rowID=983049 }, bool __formal=true, const wchar_t * _File=0x00eea018, unsigned int _Line=2325, bool __formal=true) Line 1671 + 0x15 bytes C++
CEGUIBase_d.dll!std::_Debug_order_single<std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > >(std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > _First={d_items=[2](0x04fef110 {d_textCols={...} d_font=0x00000000 d_renderedString={...} ...},0x04fef520 {d_textCols={...} d_font=0x00000000 d_renderedString={...} ...}) d_sortColumn=0 d_rowID=0 }, std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > _Last={d_items=[349230288](...,...) d_sortColumn=0 d_rowID=983049 }, bool _IsFirstIteration=true, const wchar_t * _File=0x00eea018, unsigned int _Line=2325) Line 1679 + 0x75 bytes C++
CEGUIBase_d.dll!std::_Upper_bound<std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> >,CEGUI::MultiColumnList::ListRow,int>(std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > _First={d_items=[2](0x04fef110 {d_textCols={...} d_font=0x00000000 d_renderedString={...} ...},0x04fef520 {d_textCols={...} d_font=0x00000000 d_renderedString={...} ...}) d_sortColumn=0 d_rowID=0 }, std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > _Last={d_items=[349230288](...,...) d_sortColumn=0 d_rowID=983049 }, const CEGUI::MultiColumnList::ListRow & _Val={...}, int * __formal=0x00000000) Line 2325 + 0x59 bytes C++
CEGUIBase_d.dll!std::upper_bound<std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> >,CEGUI::MultiColumnList::ListRow>(std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > _First={d_items=[2](0x04fef110 {d_textCols={...} d_font=0x00000000 d_renderedString={...} ...},0x04fef520 {d_textCols={...} d_font=0x00000000 d_renderedString={...} ...}) d_sortColumn=0 d_rowID=0 }, std::_Vector_iterator<CEGUI::MultiColumnList::ListRow,std::allocator<CEGUI::MultiColumnList::ListRow> > _Last={d_items=[349230288](...,...) d_sortColumn=0 d_rowID=983049 }, const CEGUI::MultiColumnList::ListRow & _Val={...}) Line 2347 + 0x8f bytes C++
CEGUIBase_d.dll!CEGUI::MultiColumnList::addRow(CEGUI::ListboxItem * item=0x00000000, unsigned int col_id=0, unsigned int row_id=0) Line 830 + 0x61 bytes C++
CEGUIBase_d.dll!CEGUI::MultiColumnList::insertRow(CEGUI::ListboxItem * item=0x00000000, unsigned int col_id=0, unsigned int row_idx=0, unsigned int row_id=6) Line 868 + 0x12 bytes C++
CEGUIBase_d.dll!CEGUI::MultiColumnList::insertRow(unsigned int row_idx=0, unsigned int row_id=6) Line 857 C++
ThisGame.exe!GUISquad::update() Line 60 + 0x1d bytes C++
And this is the bit of code that creates a new entry in the list. It crashes at the insertRow line.
Code: Select all
// Create a new row
unsigned int lRow = lList->insertRow(0, lShip->getId());
CEGUI::ListboxTextItem* lItem = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(lShip->getId()), lShip->getId());
lList->setItem(lItem, 0, lRow);
lItem = new CEGUI::ListboxTextItem(CEGUI::PropertyHelper::intToString(lShip->getId()), lShip->getId());
lList->setItem(lItem, 1, lRow);
Let me know if you need more info. Thanks!