Bug #13701
openCrash with Menu with StackedWidget
0%
Description
Creating and showing a dialog that contains a WMenu with a StackedWidget causes a Segfault/SIGABRT.
This seems to be related to
https://redmine.emweb.be/issues/13291
since fixing this in 4.11.3, worked fine with StackedWidgets.
In 4.11.4, the fix has been reverted (commit e680203), and release 4.11.4 segfaults again.
Stacktrace:
Thread #57 [webtcs] 79053 [core: 6] (Suspended : Signal : SIGABRT:Aborted)
abort() at 0x7ffff1c335e7
std::__glibcxx_assert_fail() at assert_fail.cc:41 0x7ffff1ed3f70
std::vector >::operator at stl_vector.h:1,128 0x7ffff25bf9d0
std::vector >::operator at stl_vector.h:1,128 0x7ffff25bf9d0
Wt::WStackedWidget::setCurrentIndex() at WStackedWidget.C:146 0x7ffff25bf9d0
Wt::WMenu::undoSelectVisual() at WMenu.C:519 0x7ffff2566d96
Wt::WebRenderer::learnabi:cxx11 at WebRenderer.C:1,961 0x7ffff280f8e9
Wt::EventSignalBase::processPreLearnStateless() at WSignal.C:398 0x7ffff25aec85
Wt::WebRenderer::preLearnStateless() at WebRenderer.C:1,928 0x7ffff280f098
Wt::WebRenderer::collectJavaScriptUpdate() at WebRenderer.C:1,764 0x7ffff280f291
<...more frames...>
The relevant line from WStackedWidget:
if (loadPolicies_[currentIndex_] == ContentLoading::Lazy) {
...
currentIndex_ is -1 and causes the invalid access to loadPolicies.
Updated by Matthias Van Ceulebroeck 7 days ago
- Related to Bug #13291: Nested WMenu items causing segfaults added
Updated by Matthias Van Ceulebroeck 7 days ago
- Related to Bug #13585: Segfault on internal path navigation with submenus added
Updated by Matthias Van Ceulebroeck 7 days ago
- Status changed from New to InProgress
- Assignee set to Matthias Van Ceulebroeck
- Target version set to 4.12.0
Hello Stephan,
thank you for the report. This is indeed a regression.
Due to changes in #13585 that aimed to greatly simplify the complexity of WMenu::select
, the currentIndex_ == -1
fix was omitted.
Updated by Matthias Van Ceulebroeck 7 days ago
- Status changed from InProgress to Review
- Assignee deleted (
Matthias Van Ceulebroeck)