Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » DropList cores on ClearList()
DropList cores on ClearList() [message #2779] Tue, 25 April 2006 10:51 Go to previous message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

I was hoping I could get some debug insight into a problem I have currently.

We use a DropList, which we populate with about 10 or so items using the droplist.Add(int, String) syntax. I've added a menu option that will call

 droplist.ClearList();
 droplist.Clear();
 droplist.Add(5, "item 1");
 ... more Adds to re-populate list.



Initially, this works, ClearList()/Clear() appear ok on an empty Widget. But the second time it will core dump.

If I take out the ClearList() and Clear() calls, it works fine, except of course the DropList item now has duplicated (doubling each time I use the menu option).

I tried to reproduce this in Converter example, but I was unable to make it crash, so I assume it is something silly in my code.


The coredump traceback is rather deep, apologies:

#0  0x080fb7ed in Rect_<int>::operator==(Rect_<int> const&) const (
    this=0x6565724a, b=@0xbfbe4d40)
    at /home/lundman/upp/uppsrc/Core/Gtypes.h:513
513		return top == b.top && bottom == b.bottom && left == b.left && right == b.right;
(gdb) bt
#0  0x080fb7ed in Rect_<int>::operator==(Rect_<int> const&) const (
    this=0x6565724a, b=@0xbfbe4d40)
    at /home/lundman/upp/uppsrc/Core/Gtypes.h:513
#1  0x081625c3 in Ctrl::AddScroll(Rect_<int> const&, int, int) ()
#2  0x081629a8 in Ctrl::ScrollView(Rect_<int> const&, int, int) ()
#3  0x080a6e14 in Scroller::Scroll(Ctrl&, Rect_<int> const&, Point_<int>, Size_<int>) ()
#4  0x080b088e in ArrayCtrl::Scroll() ()
#5  0x08075f2c in CallbackMethodAction<ArrayCtrl, void (ArrayCtrl::*)()>::Execute() (this=0x87ad7b8) at /home/lundman/upp/uppsrc/Core/Cbgen.h:31
#6  0x082cba65 in Callback::Execute() const ()
#7  0x0807608b in Callback::operator()() const (this=0xbfbf6860)
    at /home/lundman/upp/uppsrc/Core/Cbgen.h:63
#8  0x080a3eb9 in ScrollBar::Set(int) ()
#9  0x080a485e in ScrollBar::Layout() ()
#10 0x08160dec in Ctrl::SyncLayout(bool) ()
#11 0x08160fa0 in Ctrl::UpdateRect() ()
#12 0x08160ec3 in Ctrl::SetPos0(Ctrl::LogPos, bool) ()
#13 0x0816104d in Ctrl::SetPos(Ctrl::LogPos, bool) ()
#14 0x08161162 in Ctrl::SetFramePos(Ctrl::LogPos) ()
#15 0x08161fff in Ctrl::SetFramePos(Ctrl::Logc, Ctrl::Logc) ()
#16 0x08161370 in Ctrl::SetFrameRect(int, int, int, int) ()
#17 0x08158bcc in LayoutFrameRight(Rect_<int>&, Ctrl*, int) ()
---Type <return> to continue, or q <return> to quit---
#18 0x080a4930 in ScrollBar::FrameLayout(Rect_<int>&) ()
#19 0x08160c57 in Ctrl::SyncLayout(bool) ()
#20 0x08091e33 in Ctrl::RefreshLayout() ()
#21 0x0809193f in Ctrl::RefreshParentLayout() ()
#22 0x0815a450 in Ctrl::Show(bool) ()
#23 0x080a3f55 in ScrollBar::Set(int, int, int) ()
#24 0x080a4027 in ScrollBar::SetTotal(int) ()
#25 0x080af339 in ArrayCtrl::SetSb() ()
#26 0x080b71ce in ArrayCtrl::Clear() ()
#27 0x080c28d0 in DropList::ClearList() ()
#28 0x08065b9f in UFxp::do_SiteWipe() (this=0xbfbe5c40)
    at /home/lundman/upp/MyApps/UFxp/main.cpp:43
#29 0x08060bd1 in Trans::do_SITELIST() (this=0xbfbe60d4)
    at /home/lundman/upp/MyApps/UFxp/Trans.cpp:663
#30 0x08060c15 in Trans::do_SITELISTx() (this=0xbfbe60d4)
    at /home/lundman/upp/MyApps/UFxp/Trans.cpp:671
#31 0x08075ed6 in CallbackMethodAction<Trans, void (Trans::*)()>::Execute() (
    this=0x87c2188) at /home/lundman/upp/uppsrc/Core/Cbgen.h:31
#32 0x082cba65 in Callback::Execute() const ()
#33 0x0807608b in Callback::operator()() const (this=0x87c5f54)
    at /home/lundman/upp/uppsrc/Core/Cbgen.h:63
#34 0x082cbee7 in CallbackForkAction::Execute() ()
#35 0x082cba65 in Callback::Execute() const ()
---Type <return> to continue, or q <return> to quit---
#36 0x0807608b in Callback::operator()() const (this=0x87c3684)
    at /home/lundman/upp/uppsrc/Core/Cbgen.h:63
#37 0x080d1594 in MenuItem::LeftUp(Point_<int>, unsigned) ()
#38 0x08165f7c in Ctrl::MouseEvent(int, Point_<int>, int, unsigned) ()
#39 0x08165cdb in Ctrl::MouseEventH(int, Point_<int>, int, unsigned) ()
#40 0x081667d1 in Ctrl::MEvent0(int, Point_<int>, int) ()
#41 0x081674d8 in Ctrl::DispatchMouseEvent(int, Point_<int>, int) ()
#42 0x081674a0 in Ctrl::DispatchMouseEvent(int, Point_<int>, int) ()
#43 0x081674a0 in Ctrl::DispatchMouseEvent(int, Point_<int>, int) ()
#44 0x081671c8 in Ctrl::DispatchMouse(int, Point_<int>, int) ()
#45 0x08175da5 in Ctrl::EventProc(Ctrl::XWindow&, _XEvent*) ()
#46 0x0817109e in Ctrl::ProcessEvent(_XEvent*) ()
#47 0x0817167b in Ctrl::EventLoop(Ctrl*) ()
#48 0x0816e3f9 in TopWindow::Run(bool) ()
#49 0x080712a9 in GuiMainFn_() ()
    at /home/lundman/upp/MyApps/UFxp/main.cpp:1089
#50 0x08071204 in main (argc=1, argv=0xbfbfea18, envptr=0xbfbfea20)
    at /home/lundman/upp/MyApps/UFxp/main.cpp:1083
#51 0x08048166 in ___start ()




 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ColumnList question (move and delete item)
Next Topic: Strange behaviour of my modal dialog
Goto Forum:
  


Current Time: Sat Jun 07 06:01:15 CEST 2025

Total time taken to generate the page: 0.03494 seconds