The following wt app

WtApp::WtApp(const Wt::WEnvironment& env)
    : Wt::WApplication(env) {
              // Create a menu with some items
              Wt::WPopupMenu popup;
              popup.addItem("icons/item1.gif", "Item 1");
              popup.addItem("Item 2")->setCheckable(true);
              popup.addItem("Item 3");
              popup.addSeparator();
              popup.addItem("Item 4");
              popup.addSeparator();
              popup.addItem("Item 5");
              popup.addItem("Item 6");
              popup.addSeparator();
              Wt::WPopupMenu *subMenu = new Wt::WPopupMenu();
              subMenu->addItem("Sub Item 1");
              subMenu->addItem("Sub Item 2");
              popup.addMenu("Item 7", subMenu);
}


taken directly from the wpopupmenu reference page segfaults with the
following stack trace


#0  Wt::WObject::destroyed (this=this@entry=0x0) at WObject.C:122
#1  0x00007ff1308ff25d in Wt::WMenuItem::create
(this=this@entry=0x7ff0e80084d0, iconPath=..., text=...,
contents=contents@entry=0x0, policy=policy@entry=Wt::WMenuItem::LazyLoading)
    at WMenuItem.C:71
#2  0x00007ff1308ffb0b in Wt::WMenuItem::WMenuItem (this=0x7ff0e80084d0,
iconPath=..., text=..., contents=0x0, policy=Wt::WMenuItem::LazyLoading)
at WMenuItem.C:40
#3  0x00007ff1308f8dc0 in Wt::WMenu::addItem (this=0x7ff12b2a8070,
iconPath=..., name=..., contents=0x0, policy=Wt::WMenuItem::LazyLoading)
at WMenu.C:181
#4  0x00000000004043f5 in WtApp::WtApp (this=0x7ff0e8001ed0, env=...) at
wtapp.cpp:12


Am I doing something wrong with this? Any ideas?

Thanks,
Antonio

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to