Project

General

Profile

Actions

Bug #13063

open

Widget created in signal handler: cannot adjust information after creation without segfault

Added by Christian Meyer 27 days ago. Updated 20 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Start date:
09/25/2024
Due date:
% Done:

0%

Estimated time:

Description

I want to add Text to a container, with the HTML Tag <pre>.

I used the following snippet inside a signal handler

auto pre = this->list->addNew<Wt::WText>("Add Sample Text");
pre->setHtmlTagName("pre"); // comment out to make code work

if I do not set HTML Tag name, this works just as expected.
But there is a Segfault in WStringStream if the tag is used.

Then I tried to use a unique_ptr directly, but the same thing happened

auto pre = std::make_unique<Wt::WText>("Some Text to Show Unique Works");
pre->setHtmlTagName("pre"); // same problem, same solution, comment out

this->list->addWidget(std::move(pre));
Actions #1

Updated by Matthias Van Ceulebroeck 20 days ago

  • Target version set to 4.11.2

I am going to guess this is an edge case when the DomElement is being rendered.
This will be investigated further soon.

Actions

Also available in: Atom PDF