Project

General

Profile

Actions

Bug #13063

open

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

Added by Christian Meyer about 2 months ago. Updated 5 days ago.

Status:
Review
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 about 2 months 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 #2

Updated by Romain Mardulyn 5 days ago

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn
Actions #3

Updated by Romain Mardulyn 5 days ago

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)
Actions

Also available in: Atom PDF