Project

General

Profile

Actions

Bug #14065

open

Segmentation fault in WTableView::select

Added by Michael Seibt 23 days ago. Updated 21 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/22/2025
Due date:
% Done:

0%

Estimated time:

Description

Affected: WTableView::select(const WModelIndex& index,option = SelectionFlag::Select) of Wt 4.12.1
with SelectionBehavior::Items and SelectionMode::Single

(Works with: 4.12.0 and 4.11.4)

Segmentation fault occurs in WTableView::itemWidget when TableView::select is called by ctor of a subclass of WTableView
if browser loads an URL with a previous session id.
The app can be started only if the initial URL does not contain a session id.
(Of course, the WModelIndex is valid and setModel has been called right before [with a fixed-size model].)

Callstack (with some private data removed):

libwt.so.4.12.1!Wt::WTableView::itemWidget(const Wt::WTableView * const this, const Wt::WModelIndex & index) (\root\parts\wt\src\src\Wt\WTableView.C:1978)
libwt.so.4.12.1!Wt::WTableView::renderSelected(Wt::WTableView * const this, Wt::WTableView * const this@entry, bool selected, const Wt::WModelIndex & index) (\root\parts\wt\src\src\Wt\WTableView.C:2019)
libwt.so.4.12.1!Wt::WTableView::internalSelect(Wt::WTableView * const this, const Wt::WModelIndex & index, Wt::SelectionFlag option) (\root\parts\wt\src\src\Wt\WTableView.C:1963)
libwt.so.4.12.1!Wt::WAbstractItemView::select(Wt::WAbstractItemView * const this, const Wt::WModelIndex & index, Wt::SelectionFlag option) (\root\parts\wt\src\src\Wt\WAbstractItemView.C:964)
CTableView::CTableView(shared_ptr<CTableModel> ModelPtr)
std::make_unique<CTableView>(shared_ptr<CTableModel>) (\usr\include\c++\14\bits\unique_ptr.h:1076)
...
std::make_unique<CApplication, int const&, char** const&, Wt::WEnvironment const&>() (\usr\include\c++\14\bits\unique_ptr.h:1076)
Main<CApplication>(int, char**)::{lambda(Wt::WEnvironment const&)#1}::operator()(Wt::WEnvironment const&) const(const struct {...} * const __closure, const Wt::WEnvironment & rcEnv)
std::__invoke_impl<std::unique_ptr<Wt::WApplication, std::default_delete<Wt::WApplication> >, Main<CApplication>(int, char**)::{lambda(Wt::WEnvironment const&)#1}&, Wt::WEnvironment const&>(std::__invoke_other, Main<CApplication>(int, char**)::{lambda(Wt::WEnvironment const&)#1}&, Wt::WEnvironment const&)(struct {...} & __f) (\usr\include\c++\14\bits\invoke.h:61)
std::__invoke_r<std::unique_ptr<Wt::WApplication, std::default_delete<Wt::WApplication> >, Main<CApplication>(int, char**)::{lambda(Wt::WEnvironment const&)#1}&, Wt::WEnvironment const&>(Main<CApplication>(int, char**)::{lambda(Wt::WEnvironment const&)#1}&, Wt::WEnvironment const&)(struct {...} & __fn) (\usr\include\c++\14\bits\invoke.h:116)
std::_Function_handler<std::unique_ptr<Wt::WApplication, std::default_delete<Wt::WApplication> > (Wt::WEnvironment const&), Main<CApplication>(int, char**)::{lambda(Wt::WEnvironment const&)#1}>::_M_invoke(std::_Any_data const&, Wt::WEnvironment const&)(const std::_Any_data & __functor, const Wt::WEnvironment & __args#0) (\usr\include\c++\14\bits\std_function.h:291)
libwt.so.4.12.1!std::function<std::unique_ptr<Wt::WApplication, std::default_delete<Wt::WApplication> > (Wt::WEnvironment const&)>::operator()(Wt::WEnvironment const&) const(const Wt::WEnvironment & __args#0, const std::function<std::unique_ptr<Wt::WApplication, std::default_delete<Wt::WApplication> >(const Wt::WEnvironment&)> * const this) (\usr\include\c++\13\bits\std_function.h:591)
libwt.so.4.12.1!Wt::WebController::doCreateApplication(Wt::WebController * const this, Wt::WebSession * session, Wt::WebSession * session@entry) (\root\parts\wt\src\src\web\WebController.C:902)
libwt.so.4.12.1!Wt::WebSession::start(Wt::WebSession * const this, Wt::WebSession * const this@entry, Wt::WebResponse * response) (\root\parts\wt\src\src\web\WebSession.C:700)
Actions

Also available in: Atom PDF