Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-11-12 15:09:33 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-11-12 15:10:32 +0400
commitd0cbf563544b03d2373ed146e6b7f432d919a135 (patch)
treefe04897070a53292268af2dbc2fbdde98d12ac3e
parent76213fb5b71f0ab24a59f3740b71a8d1cfee3843 (diff)
Workaround "Attempt to free unreferenced scalar..." on Linux 32-bit
-rw-r--r--lib/Slic3r.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm
index bb04f3f2f..0205b094c 100644
--- a/lib/Slic3r.pm
+++ b/lib/Slic3r.pm
@@ -94,9 +94,20 @@ sub parallelize {
$q->enqueue(@items, (map undef, 1..$Config->threads));
my $thread_cb = sub {
- my $result = $params{thread_cb}->($q);
+ $params{thread_cb}->($q);
Slic3r::thread_cleanup();
- return $result;
+
+ # This explicit exit avoids an untrappable
+ # "Attempt to free unreferenced scalar" error
+ # triggered on Ubuntu 12.04 32-bit when we're running
+ # from the Wx plater and
+ # we're reusing the same plater object more than once.
+ # The downside to using this exit is that we can't return
+ # any value to the main thread but we're not doing that
+ # anymore anyway.
+ # collect_cb is completely useless now
+ # and should be removed from the codebase.
+ threads->exit;
};
$params{collect_cb} ||= sub {};