Bug #1146
closedWTreeView without javascript support
0%
Description
Hi,
I get an Arithmetic exception (division by viewportHeight when it is zero) when running the code attached to the forum thread [1] on a browser (Chrome) with Javascript disabled. I'm using the git version of yesterday (25/01/12).
[1] http://redmine.webtoolkit.eu/boards/2/topics/3558
Stacktrace:
Thread [7] 12988 (Suspended : Signal : SIGFPE:Arithmetic exception)
Wt::WTreeView::currentPage() at WTreeView.C:2,677 0xb7ad3138
Wt::DefaultPagingBar::update() at WAbstractItemView.C:62 0xb785800c
boost::_mfi::mf0<void, Wt::DefaultPagingBar>::operator() at 0xb78652fd
void boost::_bi::list1<boost::_bi::value<Wt::DefaultPagingBar*> >::operator() at 0xb78653ce
void boost::_bi::bind_t<void, boost::_mfi::mf0<void, Wt::DefaultPagingBar>, boost::_bi::list1<boost::_bi::value<Wt::DefaultPagingBar*> > >::operator() at 0xb78645ca
boost::detail::function::void_function_obj_invoker6<boost::_bi::bind_t<void, boost::_mfi::mf0<void, Wt::DefaultPagingBar>, boost::_bi::list1<boost::_bi::value<Wt::DefaultPagingBar*> > >, void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>::invoke() at 0xb7863566
boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>::operator() at function_template.hpp:1,013 0xb784ad13
boost::signals::detail::call_bound6::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >::operator() at signal_template.hpp:119 0xb784a8ff
boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound6::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >, boost::signals::detail::named_slot_map_iterator>::dereference() at slot_call_iterator.hpp:61 0xb784a6af
boost::iterator_core_access::dereference<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound6::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >, boost::signals::detail::named_slot_map_iterator> >() at iterator_facade.hpp:517 0xb784a42b
boost::iterator_facade<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound6::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, int>::operator*() at iterator_facade.hpp:643 0xb7849e71
postfix_increment_proxy() at iterator_facade.hpp:145 0xb7849859
boost::operator<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound6::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, int>() at iterator_facade.hpp:732 0xb78490e8
boost::last_value::operator() at last_value.hpp:49 0xb78480d8
boost::signal6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::last_value, int, std::less, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >::operator() at signal_template.hpp:354 0xb7846839
Wt::Signal<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>::emit() at WSignal:937 0xb7845b5b
Wt::WTreeView::rerenderTree() at WTreeView.C:1,485 0xb7ace1da
Wt::WTreeView::render() at WTreeView.C:1,387 0xb7acd69c
Wt::WWidget::createSDomElement() at WWidget.C:325 0xb7b10583
Wt::StdWidgetItemImpl::createDomElement() at StdWidgetItemImpl.C:58 0xb7835748
Wt::StdGridLayoutImpl::createDomElement() at StdGridLayoutImpl.C:514 0xb7830170
Wt::WContainerWidget::createDomChildren() at WContainerWidget.C:662 0xb7906810
Wt::WContainerWidget::createDomElement() at WContainerWidget.C:650 0xb7906751
Wt::WContainerWidget::createDomElement() at WContainerWidget.C:638 0xb79066e4
Wt::WWebWidget::createActualElement() at WWebWidget.C:1,931 0xb7b00489
Wt::WWidget::createSDomElement() at WWidget.C:326 0xb7b105a6
Wt::WContainerWidget::createDomChildren() at WContainerWidget.C:717 0xb7906ec8
Wt::WContainerWidget::createDomElement() at WContainerWidget.C:650 0xb7906751
Wt::WContainerWidget::createDomElement() at WContainerWidget.C:638 0xb79066e4
Wt::WWebWidget::createActualElement() at WWebWidget.C:1,931 0xb7b00489
Wt::WWidget::createSDomElement() at WWidget.C:326 0xb7b105a6
Wt::WContainerWidget::createDomChildren() at WContainerWidget.C:717 0xb7906ec8
Wt::WContainerWidget::createDomElement() at WContainerWidget.C:650 0xb7906751
Wt::WContainerWidget::createDomElement() at WContainerWidget.C:638 0xb79066e4
Wt::WWebWidget::createActualElement() at WWebWidget.C:1,931 0xb7b00489
Wt::WWidget::createSDomElement() at WWidget.C:326 0xb7b105a6
Wt::WebRenderer::serveMainpage() at WebRenderer.C:1,245 0xb7c56d96
Wt::WebRenderer::serveResponse() at WebRenderer.C:228 0xb7c4ee74
Wt::WebSession::serveResponse() at WebSession.C:2,223 0xb7c439e4
Wt::WebSession::render() at WebSession.C:2,173 0xb7c4350f
Wt::WebSession::notify() at WebSession.C:2,062 0xb7c42a22
Wt::WApplication::notify() at WApplication.C:1,453 0xb7897e6d
Wt::WebSession::handleRequest() at WebSession.C:1,383 0xb7c3cb2a
Wt::WebController::handleRequest() at WebController.C:612 0xb7c1efea
http::server::WtReply::consumeRequestBody() at WtReply.C:136 0xb71a2373
http::server::WtReply::consumeData() at WtReply.C:80 0xb71a1f40
http::server::RequestParser::parseBody() at RequestParser.C:141 0xb7168fa4
http::server::Connection::handleReadBody() at Connection.C:226 0xb71499f3
http::server::Connection::handleReadRequest0() at Connection.C:165 0xb714958a
http::server::Connection::handleReadRequest() at Connection.C:198 0xb714981c
boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned int>::call<boost::shared_ptrhttp::server::Connection, boost::system::error_code const, unsigned int>() at mem_fn_template.hpp:271 0xb718b5f3
boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned int>::operator() at mem_fn_template.hpp:286 0xb718a3b8
boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> () at bind.hpp:392 0xb719df79
boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned int>, boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> () at bind_template.hpp:102 0xb719dd92
boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned int>, boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> () at bind_handler.hpp:97 0xb719da65
boost::asio::asio_handler_invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned int>, boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> () at handler_invoke_hook.hpp:64 0xb719d80c
boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned int>, boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> () at handler_invoke_helpers.hpp:39 0xb719d634
boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned int>, boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> () at reactive_socket_recv_op.hpp:106 0xb719d470
boost::asio::detail::task_io_service_operation::complete() at task_io_service_operation.hpp:35 0xb79829e3
boost::asio::detail::task_io_service::do_one() at task_io_service.ipp:278 0xb7984673
boost::asio::detail::task_io_service::run() at task_io_service.ipp:130 0xb7984224
boost::asio::io_service::run() at io_service.ipp:57 0xb79849fe
Wt::WIOService::run() at WIOService.C:126 0xb7980d34
boost::_mfi::mf0<void, Wt::WIOService>::operator() at 0xb798c131
void boost::_bi::list1<boost::_bi::value<Wt::WIOService*> >::operator() at 0xb798c034
boost::_bi::bind_t<void, boost::_mfi::mf0<void, Wt::WIOService>, boost::_bi::list1<boost::_bi::value<Wt::WIOService*> > >::operator() at 0xb798bda2
boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, Wt::WIOService>, boost::_bi::list1<boost::_bi::value<Wt::WIOService*> > > >::run() at 0xb798b6d2
thread_proxy() at 0xb6c31476
start_thread() at pthread_create.c:300 0xb6c62955
clone() at clone.S:130 0xb6d41e7e
Kind regards,
Rob.
Updated by Koen Deforche almost 13 years ago
- Status changed from New to InProgress
- Assignee set to Pieter Libin
- Target version set to 3.2.1
Updated by Pieter Libin almost 13 years ago
- Status changed from InProgress to Resolved
Hi,
the div by zero exception was a bug, which we fixed in git,
however, when settings the size of a non-ajax WTreeView as you do in the evaluate_height() method in your example,
you should take into account the navigation-bar-height, which should be 25.
So you should use:
resize(Wt::WLength::Auto, rowHeight().value()*(row_count + 1) + 25);
Thanks for reporting the issue,
Pieter
Updated by Rob Van Dyck almost 13 years ago
Ah, thanx for the info and the quick response.
Regards,
Rob.