Bug 88846 - Log: Loop not properly cleaned up on failures in Log constructor
Summary: Log: Loop not properly cleaned up on failures in Log constructor
Status: RESOLVED FIXED
Alias: None
Product: Zeitgeist
Classification: Unclassified
Component: libzeitgeist (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: zeitgeist-bugs@lists.freedesktop.org
QA Contact: zeitgeist-bugs@lists.freedesktop.org
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-28 08:46 UTC by Albert Astals Cid
Modified: 2015-01-29 15:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
The patch (451 bytes, text/plain)
2015-01-28 08:48 UTC, Albert Astals Cid
Details
Generated .c code if unpatched (1.96 KB, text/plain)
2015-01-28 08:49 UTC, Albert Astals Cid
Details
Generated .c code if patched (2.02 KB, text/plain)
2015-01-28 08:49 UTC, Albert Astals Cid
Details
The patch (898 bytes, patch)
2015-01-29 15:29 UTC, Albert Astals Cid
Details | Splinter Review

Description Albert Astals Cid 2015-01-28 08:46:57 UTC
If the lambda fails the code leaves a MainLoop around that breaks things (i.e. the Qt main glib loop).

I'm attaching the patch that fixes the problem, the generated code with and the patch.
Comment 1 Albert Astals Cid 2015-01-28 08:48:09 UTC
Created attachment 112905 [details]
The patch

Add finally {} to try {} catch {}
Comment 2 Albert Astals Cid 2015-01-28 08:49:14 UTC
Created attachment 112906 [details]
Generated .c code if unpatched

Note that there's some return; error conditions where the loop is not exited correctly with g_main_loop_quit (_data1_->mainloop);
Comment 3 Albert Astals Cid 2015-01-28 08:49:52 UTC
Created attachment 112907 [details]
Generated .c code if patched

Note that all the exit paths properly have a g_main_loop_quit (_data1_->mainloop);
Comment 4 Albert Astals Cid 2015-01-28 08:51:06 UTC
Please if possible credit this to "Albert Astals Cid <albert.astals@canonical.com>" and not to "Albert Astals Cid <aacid@kde.org>" I'm just using my kde.org account since I didn't feel like creating a new one just for this.
Comment 5 Albert Astals Cid 2015-01-29 15:29:55 UTC
Created attachment 112950 [details] [review]
The patch
Comment 6 Albert Astals Cid 2015-01-29 15:35:56 UTC
It's been commited.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.