Actions
Bug #4433
closedIf dataChanged() is called for a view index that is being edited, the program will segfault.
Start date:
08/28/2015
Due date:
% Done:
0%
Estimated time:
Description
See attached example which uses WItemDelegate.
It uses a WTimer to call the updateData() function.
This emits the dataChanged signal for index(0,0) every second.
This should simulate the underlying data changing.
If you start editing index(0,0) using the delegate then the program segfaults.
Thread 2 (Thread 1374):
#0 std::_Rb_tree<std::string, std::pair<std::string const, Wt::WString>, std::_Select1st<std::pair<std::string const, Wt::WString> >, std::less<std::string>, std::allocator<std::pair<std::string const, Wt::WString> > >::find (this=0x0, __k="drop") at /usr/include/c++/4.9.2/bits/stl_tree.h:1913
#1 0xb6d22a20 in find (__x=..., this=<optimized out>) at /usr/include/c++/4.9.2/bits/stl_map.h:860
#2 Wt::WWebWidget::attributeValue (this=0xb4d52f40, name=...) at /usr/src/debug/wt/3.3.4-3/git/src/Wt/WWebWidget.C:882
#3 0xb6c0a688 in Wt::WItemDelegate::update (this=<optimized out>, widget=<optimized out>, index=..., flags=<error reading variable: Cannot access memory at address 0x0>) at /usr/src/debug/wt/3.3.4-3/git/src/Wt/WItemDelegate.C:204
#4 0xb6ccc3a0 in Wt::WTableView::renderWidget (this=this@entry=0xb4ca0fa8, widget=widget@entry=0xb4d52f40, index=...) at /usr/src/debug/wt/3.3.4-3/git/src/Wt/WTableView.C:281
#5 0xb6ccffac in Wt::WTableView::updateItem (this=this@entry=0xb4ca0fa8, index=..., renderedRow=renderedRow@entry=3, renderedColumn=renderedColumn@entry=1) at /usr/src/debug/wt/3.3.4-3/git/src/Wt/WTableView.C:1461
#6 0xb6cd023c in Wt::WTableView::modelDataChanged (this=0xb4ca0fa8, topLeft=..., bottomRight=...) at /usr/src/debug/wt/3.3.4-3/git/src/Wt/WTableView.C:1439
#7 0xb6cd4b2c in operator() (a2=..., a1=..., p=<optimized out>, this=<optimized out>) at /usr/include/boost/bind/mem_fn_template.hpp:280
#8 operator()<boost::_mfi::mf2<void, Wt::WTableView, const Wt::WModelIndex&, const Wt::WModelIndex&>, boost::_bi::list6<Wt::WModelIndex&, Wt::WModelIndex&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&> > (a=<synthetic pointer>, f=..., this=<optimized out>) at /usr/include/boost/bind/bind.hpp:392
#9 operator()<Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> (a3=<synthetic pointer>, a4=<synthetic pointer>, a5=<synthetic pointer>, a6=<synthetic pointer>, a2=..., a1=..., this=<optimized out>) at /usr/include/boost/bind/bind_template.hpp:203
#10 boost::detail::function::void_function_obj_invoker6<boost::_bi::bind_t<void, boost::_mfi::mf2<void, Wt::WTableView, Wt::WModelIndex const&, Wt::WModelIndex const&>, boost::_bi::list3<boost::_bi::value<Wt::WTableView*>, boost::arg<1>, boost::arg<2> > >, void, Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>::invoke (function_obj_ptr=..., a0=..., a1=..., a2=..., a3=..., a4=..., a5=...) at /usr/include/boost/function/function_template.hpp:153
#11 0x000995a0 in operator() (a1=..., a0=..., this=0xb4ca7404, a2=..., a3=..., a4=..., a5=...) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/function/function_template.hpp:767
#12 m_invoke<boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)>, 0u, 1u, 2u, 3u, 4u, 5u, Wt::WModelIndex&, Wt::WModelIndex&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&> (args=..., func=..., this=<optimized out>) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/signals2/detail/variadic_slot_invoker.hpp:92
#13 operator()<boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)>, Wt::WModelIndex&, Wt::WModelIndex&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, 6u> (args=..., func=..., this=<optimized out>) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/signals2/detail/variadic_slot_invoker.hpp:81
#14 m_invoke<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass), boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > > (connectionBody=..., this=0xb4bfc1f0) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/signals2/detail/variadic_slot_invoker.hpp:127
#15 operator()<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass), boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > > (connectionBody=..., this=0xb4bfc1f0) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/signals2/detail/variadic_slot_invoker.hpp:120
#16 dereference (this=0xb4bfc128) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/signals2/detail/slot_call_iterator.hpp:82
#17 dereference<boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type, Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>, std::_List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass), boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass), boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > > (f=...) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/iterator/iterator_facade.hpp:540
#18 operator* (this=0xb4bfc128) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/iterator/iterator_facade.hpp:646
#19 operator()<boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type, Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>, std::_List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass), boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass), boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > > (last=..., first=..., this=<optimized out>) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/signals2/optional_last_value.hpp:55
#20 operator()<boost::signals2::optional_last_value<void>, boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::variadic_slot_invoker<boost::signals2::detail::void_type, Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>, std::_List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass), boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int> >, boost::signals2::slot<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass), boost::function<void(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > > (last=..., first=..., combiner=..., this=<optimized out>) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/signals2/detail/result_type_wrapper.hpp:64
#21 boost::signals2::detail::signal_impl<void (Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)>, boost::function<void (boost::signals2::connection const&, Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)>, boost::signals2::mutex>::operator()(Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass) (this=0x1b00, this@entry=0xb4ca5df0, args#0=..., args#1=..., args#2=args#2@entry=..., args#3=args#3@entry=..., args#4=args#4@entry=..., args#5=args#5@entry=...) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/signals2/detail/signal_template.hpp:246
#22 0x000947bc in operator() (args#1=..., args#0=..., this=<optimized out>, args#2=..., args#3=..., args#4=..., args#5=...) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/boost/signals2/detail/signal_template.hpp:718
#23 Wt::Signal<Wt::WModelIndex, Wt::WModelIndex, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>::emit (this=this@entry=0xb4ca0b28, a1=..., a2=..., a3=..., a4=..., a5=..., a6=...) at /opt/poky/1.8/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/Wt/WSignal:992
#24 0x000957d4 in SimulateMenuModel::updateData (this=<optimized out>) at src/GuiModels.cpp:2708
Files
Updated by Benoit Daccache over 9 years ago
- Status changed from New to InProgress
- Assignee set to Benoit Daccache
- Target version set to 3.3.5
Updated by Benoit Daccache over 9 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche over 9 years ago
- Status changed from Resolved to Closed
Actions