[slic3r] Fix crash when loading config (#1020802)

Miro Hrončok churchyard at fedoraproject.org
Fri Oct 18 11:41:26 UTC 2013


commit 7ee7e67d92cfe6001c0d983f41c9c19ee8e07bfa
Author: Miro Hrončok <miro at hroncok.cz>
Date:   Fri Oct 18 13:41:24 2013 +0200

    Fix crash when loading config (#1020802)

 slic3r-load-config-fix.patch |   39 +++++++++++++++++++++++++++++++++++++++
 slic3r.spec                  |   26 +++++++++++++-------------
 2 files changed, 52 insertions(+), 13 deletions(-)
---
diff --git a/slic3r-load-config-fix.patch b/slic3r-load-config-fix.patch
new file mode 100644
index 0000000..7a1b46f
--- /dev/null
+++ b/slic3r-load-config-fix.patch
@@ -0,0 +1,39 @@
+From b71bc371110765141da46b1f8b36efafea21f61c Mon Sep 17 00:00:00 2001
+From: Alessandro Ranellucci <aar at cpan.org>
+Date: Mon, 17 Jun 2013 19:27:08 +0200
+Subject: [PATCH] Remove a couple cases of dangerous aliasing, causing crashes.
+ #1257
+
+---
+ lib/Slic3r/GUI/SkeinPanel.pm | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm
+index 6c4842e..7644136 100644
+--- a/lib/Slic3r/GUI/SkeinPanel.pm
++++ b/lib/Slic3r/GUI/SkeinPanel.pm
+@@ -247,7 +247,9 @@ sub load_config_file {
+     $Slic3r::GUI::Settings->{recent}{config_directory} = dirname($file);
+     Slic3r::GUI->save_settings;
+     $last_config = $file;
+-    $_->load_config_file($file) for values %{$self->{options_tabs}};
++    for my $tab (values %{$self->{options_tabs}}) {
++        $tab->load_config_file($file);
++    }
+ }
+ 
+ sub load_config {
+@@ -265,7 +267,9 @@ sub config_wizard {
+     return unless $self->check_unsaved_changes;
+     if (my $config = Slic3r::GUI::ConfigWizard->new($self)->run) {
+         if ($self->{mode} eq 'expert') {
+-            $_->select_default_preset for values %{$self->{options_tabs}};
++            for my $tab (values %{$self->{options_tabs}}) {
++                $tab->select_default_preset;
++            }
+         }
+         $self->load_config($config);
+     }
+-- 
+1.8.4
+
diff --git a/slic3r.spec b/slic3r.spec
index 4d75194..2295fb5 100644
--- a/slic3r.spec
+++ b/slic3r.spec
@@ -1,12 +1,12 @@
 Name:           slic3r
 Version:        0.9.10b
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
 License:        AGPLv3 and CC-BY
 # Images are CC-BY, code is AGPLv3
 Group:          Applications/Engineering
 URL:            http://slic3r.org/
-%global commit d0eac88ff9586b17dcc1766874f69dbd7e8c534f
+%global commit  d0eac88ff9586b17dcc1766874f69dbd7e8c534f
 %global shortcommit %(c=%{commit}; echo ${c:0:7})
 Source0:        https://github.com/alexrj/Slic3r/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
 
@@ -17,6 +17,9 @@ Patch0:         %{name}-datadir.patch
 # Reasons are a bit complicated and are described in the patch
 Patch1:         %{name}-english-locale.patch
 
+# Fix crash when loading a config file
+Patch2:         %{name}-load-config-fix.patch
+
 Source1:        %{name}.desktop
 BuildArch:      noarch
 BuildRequires:  perl(Boost::Geometry::Utils) >= 0.12
@@ -46,15 +49,6 @@ Requires:       perl(Growl::GNTP)
 Requires:       perl(XML::SAX)
 Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
-%if 0%{?fedora} < 18
-# This is provided by XML::SAX (but not stated there)
-%filter_from_requires /perl(XML::SAX::PurePerl)/d
-%endif
-
-# Not actually needed
-%filter_from_requires /perl(Wx::GLCanvas)/d
-%filter_setup
-
 %description
 Slic3r is a G-code generator for 3D printers. It's compatible with RepRaps,
 Makerbots, Ultimakers and many more machines.
@@ -65,9 +59,10 @@ for more information.
 %setup -qn Slic3r-%{commit}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
-perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
+SLIC3R_NO_AUTO=1 perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
 ./Build
 
 %install
@@ -88,7 +83,7 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
 ./Build test
 
 %files
-%doc MANIFEST README.markdown
+%doc README.markdown
 %{_bindir}/%{name}
 %{perl_vendorlib}/Slic3r*
 %{_datadir}/pixmaps/%{name}.ico
@@ -97,6 +92,11 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
 %{_mandir}/man3/*
 
 %changelog
+* Fri Oct 18 2013 Miro Hrončok <mhroncok at redhat.com> - 0.9.10b-4
+- Remove all filtering from provides, it is not needed anymore
+- Don't add MANIFEST to %%doc
+- Fix crash when loading config (#1020802)
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.10b-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list