Project

General

Profile

Actions

Bug #14302

open

[Wt 4.12.2] Regression in WHBoxLayout::setResizable and WTreeView triggers endless width/resize loop

Added by Stefan Bn 5 days ago. Updated about 12 hours ago.

Status:
Review
Priority:
High
Assignee:
-
Target version:
Start date:
02/04/2026
Due date:
% Done:

0%

Estimated time:

Description

Hello Wt-Team,

I do experience serious issues in the latest version Wt 4.12.2, seen both in Firefox and Edge alike.

1) Creating a flex-layout WHBoxLayout::setResizable leads to an immediate crash.
Calling setResizable() while constructing the page (before it is actually shown/rendered) consistently aborts with Wt: fatal error: Cannot update widget without id. This suggests setResizable() triggers a client-side/DOM update too early (before widget IDs exist). This might be due to an initialization / first-render ordering issue. See also debug-log backtrace in FlexLayoutImpl.C attached.

Maybe due to:
https://redmine.emweb.be/issues/13670

2) A WTreeView added as a stretch item inside a WHBoxLayout causes the horizontal size to grow indefinitely and triggers continuous Wt round-trips (non-converging layout/resize loop). Replacing WTreeView with a plain WContainerWidget works fine, and constraining the tree’s width (e.g. max-width) stops the loop. This suggests an interaction between WTreeView’s intrinsic sizing and the flex/box layout sizing algorithm.

Maybe similar:
https://redmine.emweb.be/issues/1409

I'm happy that I could extract the relevant parts into the sample code attached that allows to reproduce the issues.

Best,
Stefan


Files

main.cpp (2.92 KB) main.cpp Stefan Bn, 02/04/2026 10:51 PM
Debug_FlexLayoutImpl.PNG (64.9 KB) Debug_FlexLayoutImpl.PNG Stefan Bn, 02/04/2026 10:51 PM

Related issues 2 (2 open0 closed)

Related to Bug #14314: WDialog not taking into account title bar being clearedReview02/09/2026

Actions
Related to Bug #11875: WBoxLayout incorrectly calculates the size of scrollable widgetsReviewMatthias Van Ceulebroeck08/15/2023

Actions
Actions #1

Updated by Stefan Bn 5 days ago

And there is more :-(

3) Assining a WHBoxLayout to WContainerWidget* Wt::WDialog::titleBar() leads to a crash when the dialog is shown. This used to work flawless in earlier versions.

auto dlg = this->addChild(std::make_unique<WDialog>());
auto titleHLayout = dlg->titleBar()->setLayout(std::make_unique<WHBoxLayout>());     // Crash

Debugger breaks at:

1 Wt::WTemplate::setCondition(std::stringconst&, bool) WTemplate.C 227 0x7ff805379373 
2 Wt::WDialog::render(Wt::WFlags<Wt::RenderFlag>)      WDialog.C   453 0x7ff80524aa2c
Actions #2

Updated by Romain Mardulyn 4 days ago

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

Updated by Romain Mardulyn about 14 hours ago

  • Related to Bug #14314: WDialog not taking into account title bar being cleared added
Actions #4

Updated by Romain Mardulyn about 14 hours ago

  • Related to Bug #11875: WBoxLayout incorrectly calculates the size of scrollable widgets added
Actions #5

Updated by Romain Mardulyn about 12 hours ago

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

Also available in: Atom PDF