Project

General

Profile

Bug #5684

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

Added by Jan Lindemann over 4 years ago. Updated over 4 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

#1

Updated by Michiel Derhaeg over 4 years ago

  • Status changed from New to Implemented @Emweb
#2

Updated by Roel Standaert over 4 years ago

  • Status changed from Implemented @Emweb to Resolved
#3

Updated by Roel Standaert over 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF