Bug #14302
open[Wt 4.12.2] Regression in WHBoxLayout::setResizable and WTreeView triggers endless width/resize loop
0%
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
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
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
Updated by Romain Mardulyn about 14 hours ago
- Related to Bug #14314: WDialog not taking into account title bar being cleared added
Updated by Romain Mardulyn about 14 hours ago
- Related to Bug #11875: WBoxLayout incorrectly calculates the size of scrollable widgets added
Updated by Romain Mardulyn about 12 hours ago
- Status changed from InProgress to Review
- Assignee deleted (
Romain Mardulyn)