Actions
Bug #2163
closedSIGSEGV when assigning a WFitLayout to WDialog::contents() [version 3.3.1rc1]
Start date:
08/29/2013
Due date:
% Done:
0%
Estimated time:
Description
When creating a WFitLayout with parent WDialog::contents(), the application crashes with a SIGSEGV.
I have modified the hello-word application to pop-up a dialog after during the greeting callback.
Here's also a gdb print of what's going on:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb07ffb40 (LWP 10476)]
Wt::StdLayoutImpl::setContainer (this=0x0, c=0xb18048c8) at /home/puls/install/wt-3.3.1-rc1/src/Wt/StdLayoutImpl.C:67
67 containerAddWidgets(container_);
(gdb) print this
$1 = (Wt::StdLayoutImpl * const) 0x0
(gdb) bt
#0 Wt::StdLayoutImpl::setContainer (this=0x0, c=0xb18048c8) at /home/puls/install/wt-3.3.1-rc1/src/Wt/StdLayoutImpl.C:67
#1 0xb7ab3e67 in Wt::WContainerWidget::setLayout (this=0xb18048c8, layout=0xb1804bc0, alignment=...)
at /home/puls/install/wt-3.3.1-rc1/src/Wt/WContainerWidget.C:103
#2 0xb7ab3f63 in Wt::WContainerWidget::setLayout (this=0xb18048c8, layout=0xb1804bc0)
at /home/puls/install/wt-3.3.1-rc1/src/Wt/WContainerWidget.C:76
#3 0xb7b3b33a in Wt::WLayout::setLayoutInParent (this=0xb1804bc0, parent=0xb18048c8) at /home/puls/install/wt-3.3.1-rc1/src/Wt/WLayout.C:155
#4 0xb7aebf42 in Wt::WFitLayout::WFitLayout (this=0xb1804bc0, parent=0xb18048c8) at /home/puls/install/wt-3.3.1-rc1/src/Wt/WFitLayout.C:19
#5 0x0804c2c9 in HelloApplication::greet (this=0xb46039e8) at /home/puls/install/wt-3.3.1-rc1/examples/hello/hello.C:89
#6 0xb7c303ad in operator() (a0=..., this=<optimized out>) at /usr/include/boost/function/function_template.hpp:760
#7 operator()<boost::signals::detail::connection_slot_pair> (slot=..., this=<optimized out>) at /usr/include/boost/signals/signal_template.hpp:119
#8 dereference (this=<optimized out>) at /usr/include/boost/signals/detail/slot_call_iterator.hpp:61
#9 dereference<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Wt::WMouseEvent, boost::function<void(Wt::WMouseEvent)> >, boost::signals::detail::named_slot_map_iterator> > (f=...) at /usr/include/boost/iterator/iterator_facade.hpp:517
#10 operator* (this=<optimized out>) at /usr/include/boost/iterator/iterator_facade.hpp:643
#11 postfix_increment_proxy (x=..., this=<optimized out>) at /usr/include/boost/iterator/iterator_facade.hpp:145
#12 operator++<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Wt::WMouseEvent, boost::function<void(Wt::WMouseEvent)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, const boost::signals::detail::unusable&, int> (i=...) at /usr/include/boost/iterator/iterator_facade.hpp:732
#13 operator()<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Wt::WMouseEvent, boost::function<void(Wt::WMouseEvent)> >, boost::signals::detail::named_slot_map_iterator> > (last=..., first=..., this=<optimized out>)
at /usr/include/boost/last_value.hpp:49
#14 boost::signal1<void, Wt::WMouseEvent, boost::last_value<void>, int, std::less<int>, boost::function<void (Wt::WMouseEvent)> >::operator()(Wt::WMouseEvent) (this=0xb07fc838, a1=<error reading variable: Cannot access memory at address 0x0>) at /usr/include/boost/signals/signal_template.hpp:354
#15 0xb7c3057f in Wt::EventSignal<Wt::WMouseEvent>::processDynamic (this=0xb4607268, jse=...) at /home/puls/install/wt-3.3.1-rc1/src/Wt/WSignal:1142
#16 0xb7d3e006 in Wt::WebSession::processSignal (this=0xb1800d78, s=0xb4607268, se="", request=..., kind=Wt::WebSession::Dynamic)
at /home/puls/install/wt-3.3.1-rc1/src/web/WebSession.C:2617
Files
Updated by Roman Puls over 11 years ago
here's the offending code:
void HelloApplication::greet()
{
/*
* Update the text, using text input into the nameEdit_ field.
*/
greeting_->setText("Hello there, " + nameEdit_->text());
WDialog *dlg = new WDialog();
// application crashes within next instruction:
WFitLayout *layout = new WFitLayout(dlg->contents());
dlg->contents()->addWidget(new WText(nameEdit_->text()));
dlg->resize(640, 480);
dlg->show();
}
Updated by Koen Deforche over 11 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
Hey,
The WFitLayout cannot be used for a WContainerWidget:
http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WFitLayout.html#details
We have been deprecating Wt::Ext for a long time now, so its removal is imminent and at that point we might implement WFitLayout for WContainerWidget.
Regards,
koen
Updated by Koen Deforche about 11 years ago
- Target version changed from 3.3.1 to 3.3.2
Updated by Koen Deforche almost 11 years ago
- Status changed from Feedback to InProgress
- Assignee deleted (
Koen Deforche) - Target version changed from 3.3.2 to 3.3.3
Updated by Koen Deforche over 10 years ago
- Target version changed from 3.3.3 to 3.3.4
Updated by Koen Deforche almost 10 years ago
- Status changed from InProgress to Resolved
- Assignee set to Koen Deforche
Updated by Koen Deforche almost 10 years ago
- Status changed from Resolved to Closed
Actions