Rebuild with wxWidgets 3.2 (again) with additional fixes
This commit is contained in:
parent
a62e48a5ab
commit
1549bb81f9
|
@ -0,0 +1,26 @@
|
|||
Author: Thomas Viehmann <tv@beamnet.de>
|
||||
Date: Thu, 8 Dec 2022 12:23:15 +0800
|
||||
Subject: Fix segfault due to uninitialized imgui in wxwidgets3.2
|
||||
|
||||
Bug-Debian: https://bugs.debian.org/1022234
|
||||
From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022234#15
|
||||
Forwarded: no
|
||||
---
|
||||
src/slic3r/GUI/HintNotification.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp
|
||||
index e88947d..1ca52e0 100644
|
||||
--- a/src/slic3r/GUI/HintNotification.cpp
|
||||
+++ b/src/slic3r/GUI/HintNotification.cpp
|
||||
@@ -560,7 +560,9 @@ void HintDatabase::clear_used()
|
||||
|
||||
void NotificationManager::HintNotification::count_spaces()
|
||||
{
|
||||
- //determine line width
|
||||
+ ImGuiWrapper& imgui = *wxGetApp().imgui();
|
||||
+ imgui.new_frame();
|
||||
+ //determine line width
|
||||
m_line_height = ImGui::CalcTextSize("A").y;
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
From: Chow Loong Jin <hyperair@debian.org>
|
||||
Date: Tue, 11 Oct 2022 10:42:05 +0800
|
||||
Subject: Fix segfault due to WxTranslations::Get() returning nullptr
|
||||
|
||||
Bug-Debian: https://bugs.debian.org/1020702
|
||||
Bug: https://github.com/prusa3d/PrusaSlicer/issues/9024
|
||||
Origin: https://github.com/prusa3d/PrusaSlicer/issues/8299#issuecomment-1236874810
|
||||
Author: Lukas Matena <lukasmatena@seznam.cz>
|
||||
---
|
||||
src/slic3r/GUI/GUI_App.cpp | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
|
||||
index 0aeebc7..fd22f2c 100644
|
||||
--- a/src/slic3r/GUI/GUI_App.cpp
|
||||
+++ b/src/slic3r/GUI/GUI_App.cpp
|
||||
@@ -2075,6 +2075,15 @@ bool GUI_App::load_language(wxString language, bool initial)
|
||||
{
|
||||
// Allocating a temporary locale will switch the default wxTranslations to its internal wxTranslations instance.
|
||||
wxLocale temp_locale;
|
||||
+#ifdef __WXOSX__
|
||||
+ // ysFIXME - temporary workaround till it isn't fixed in wxWidgets:
|
||||
+ // Use English as an initial language, because of under OSX it try to load "inappropriate" language for wxLANGUAGE_DEFAULT.
|
||||
+ // For example in our case it's trying to load "en_CZ" and as a result PrusaSlicer catch warning message.
|
||||
+ // But wxWidgets guys work on it.
|
||||
+ temp_locale.Init(wxLANGUAGE_ENGLISH);
|
||||
+#else
|
||||
+ temp_locale.Init();
|
||||
+#endif // __WXOSX__
|
||||
// Set the current translation's language to default, otherwise GetBestTranslation() may not work (see the wxWidgets source code).
|
||||
wxTranslations::Get()->SetLanguage(wxLANGUAGE_DEFAULT);
|
||||
// Let the wxFileTranslationsLoader enumerate all translation dictionaries for PrusaSlicer
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
Name: prusa-slicer
|
||||
Version: 2.4.2
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: 3D printing slicer optimized for Prusa printers
|
||||
|
||||
# The main PrusaSlicer code and resources are AGPLv3, with small parts as
|
||||
|
@ -30,6 +30,10 @@ Patch1: prusa-slicer-no-cereal-lib.patch
|
|||
# Proposed upstream: https://github.com/prusa3d/PrusaSlicer/pull/9434
|
||||
Patch2: prusa-slicer-gcc13.patch
|
||||
|
||||
# Fix a couple of segfaults that happen with wxWidgets 3.2 (from Debian)
|
||||
Patch3: prusa-slicer-fix-wxtranslations-segfault.patch
|
||||
Patch4: prusa-slicer-fix-uninitialized-imgui-segfault.patch
|
||||
|
||||
# Beware!
|
||||
# Patches >= 340 are only applied on Fedora 34+
|
||||
# Patches >= 350 are only applied on Fedora 35+
|
||||
|
@ -71,8 +75,7 @@ BuildRequires: openvdb
|
|||
BuildRequires: openvdb-devel
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: tbb-devel
|
||||
BuildRequires: wxBase3-devel
|
||||
BuildRequires: wxGTK3-devel
|
||||
BuildRequires: wxGTK-devel
|
||||
|
||||
# Things we wish we could unbundle
|
||||
#BuildRequires: admesh-devel >= 0.98.1
|
||||
|
@ -392,6 +395,9 @@ desktop-file-validate %buildroot%_datadir/applications/PrusaGcodeviewer.desktop
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jan 27 2023 Scott Talbert <swt@techie.net> - 2.4.2-7
|
||||
- Rebuild with wxWidgets 3.2 (again) with additional fixes
|
||||
|
||||
* Fri Jan 27 2023 Scott Talbert <swt@techie.net> - 2.4.2-6
|
||||
- Fix FTBFS with GCC 13
|
||||
|
||||
|
|
Loading…
Reference in New Issue