Project

General

Profile

Actions

Bug #5684

closed
JL

Wt::WAbstractItemView::setDragEnabled(true) leads to segmentation fault

Bug #5684: Wt::WAbstractItemView::setDragEnabled(true) leads to segmentation fault

Added by Jan Lindemann over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/27/2017
Due date:
% Done:

0%

Estimated time:

Description

The WApplication::exposedSignals_ map uses std::string keys that contain the sender-object's id(). In consequence, if an object changes its id during its lifecycle, it will fail to unregister those of its signals in its destructor, which were registered before the id change. This can leave exposedSignals_ with dangling references, and crashes on me somewhere down the road.

There is a subtle bug in WWebWidget's id() bookkeeping, which falls into exactly this trap in the context of

WAbstractItemView::setDragEnabled(true)
dragWidget_->setId(id() + "dw");
WApplication::addExposedSignal( ... scrollVisibilityChanged ...)

The attached patch fixes that.


Files

MD Updated by Michiel Derhaeg over 9 years ago Actions #1

  • Status changed from New to Implemented @Emweb

RS Updated by Roel Standaert over 9 years ago Actions #2

  • Status changed from Implemented @Emweb to Resolved

RS Updated by Roel Standaert about 9 years ago Actions #3

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom