Project

General

Profile

Actions

Bug #5684

closed

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

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

Actions #1

Updated by Michiel Derhaeg over 7 years ago

  • Status changed from New to Implemented @Emweb
Actions #2

Updated by Roel Standaert over 7 years ago

  • Status changed from Implemented @Emweb to Resolved
Actions #3

Updated by Roel Standaert over 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF