Regression in BambuStudio between wxWidgets 3.1.5 and 3.16 (Issue #24249)

27 views
Skip to first unread message

hadess

unread,
Jan 25, 2024, 7:04:30 AM1/25/24
to wx-...@googlegroups.com, Subscribed

BambuStudio uses a snapshot of wxWidgets 3.1.5 built against GTK3 that it builds itself.

I tried to package that application for Flatpak and because of build failures between the Flatpak environment and wxWidgets, I've had to upgrade to the latest wxWidgets (3.2.4).

However, some users (including myself) found that one dialogue didn't have any contents when using that version of wxWidgets that it did in other builds that used the original 3.1.5, reported here and here.

The code for the dialogue is here:
https://github.com/bambulab/BambuStudio/blob/master/src/slic3r/GUI/WipeTowerDialog.cpp

I've managed to downgrade wxWidgets in my build, picking up the necessary build fixes along the downgrade, and found that the problem happened between 3.1.5 and 3.1.6. I don't know whether the problem is due to a regression in wxWidgets, or a change in behaviour. Note that the versions of every dependency stayed the same, the only difference was the wxWidgets upgrade.

I'm afraid that I don't have the resources to bisect the commit that changed the behaviour, but hopefully @lanewei120 or @bambu123 do so they can move bambulab/BambuStudio#3340 along.

3.1.5:
image.png (view on web)

3.1.6:
image.png (view on web)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24249@github.com>

VZ

unread,
Jan 25, 2024, 9:54:17 AM1/25/24
to wx-...@googlegroups.com, Subscribed

AFAICS in the code the dialog doesn't define any minimal height, so it doesn't seem that surprising that it doesn't get it. Although I admit that I have no idea why it did with 3.1.5.

Still, the fix should be as simple as calling SetSizerAndFit() instead of SetSizer(), is there any reason not to do this?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24249/1910370657@github.com>

hadess

unread,
Jan 25, 2024, 10:05:29 AM1/25/24
to wx-...@googlegroups.com, Subscribed

Still, the fix should be as simple as calling SetSizerAndFit() instead of SetSizer(), is there any reason not to do this?

Although I'm quite familiar with GTK, I know absolutely nothing about wxWidgets. I'll try that though, thanks.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24249/1910392588@github.com>

hadess

unread,
Jan 25, 2024, 11:12:48 AM1/25/24
to wx-...@googlegroups.com, Subscribed

Tried this:

--- a/src/slic3r/GUI/WipeTowerDialog.cpp
+++ b/src/slic3r/GUI/WipeTowerDialog.cpp
@@ -225,7 +225,7 @@ WipingDialog::WipingDialog(wxWindow* parent, const std::vector<float>& matrix, c
 
     auto btn_sizer = create_btn_sizer(wxOK | wxCANCEL);
     main_sizer->Add(btn_sizer, 0, wxBOTTOM | wxRIGHT | wxEXPAND, BTN_GAP);
-    SetSizer(main_sizer);
+    SetSizerAndFit(main_sizer);
     main_sizer->SetSizeHints(this);
 
     if (this->FindWindowById(wxID_OK, this)) {

and also tried to replace every instance of SetSizer() to SetSizerAndFit() to no avail.

I just remembered that because it's GTK, I can launch the app with GTK_DEBUG=interactive and poke at it with the inspector to see if there's content, and sizing is definitely the problem.

image.png (view on web)

I'll have to try and poke at it some more.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24249/1910527003@github.com>

VZ

unread,
Jan 25, 2024, 11:25:13 AM1/25/24
to wx-...@googlegroups.com, Subscribed

Oops, sorry, I actually didn't notice that there was already a SetSizeHints() call in the code, so no surprise that using SetSizerAndFit() didn't change anything as it just calls SetSizer() followed by SetSizeHints(), sorry for a wrong suggestion.

But now that I look at the code more carefully, I really don't see anything wrong with it. I wonder what does main_sizer->CalcMin() return, i.e. does it compute the min size needed correctly?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24249/1910538776@github.com>

hadess

unread,
Jan 9, 2026, 5:15:49 PM (2 days ago) Jan 9
to wx-...@googlegroups.com, Subscribed
hadess left a comment (wxWidgets/wxWidgets#24249)

I retested with 3.2.9 and it's working as expected:
image.png (view on web)


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24249/3730753273@github.com>

hadess

unread,
Jan 9, 2026, 5:15:53 PM (2 days ago) Jan 9
to wx-...@googlegroups.com, Subscribed

Closed #24249 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/24249/issue_event/21956881562@github.com>

VZ

unread,
Jan 9, 2026, 5:18:33 PM (2 days ago) Jan 9
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#24249)

Thanks for rechecking this! I still have no idea what the original problem was but if it works in 3.2 (and, hopefully, 3.3 too), then it's indeed all good.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24249/3730764319@github.com>

Reply all
Reply to author
Forward
0 new messages