Log: Loop not properly cleaned up on failures in Log constructor

Bug #1415374 reported by Albert Astals Cid
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Medium
zeitgeist (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

If the lambda fails the code leaves a MainLoop around that breaks things (i.e. the Qt main glib loop).

Patches and stuff at https://bugs.freedesktop.org/show_bug.cgi?id=88846

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

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.

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Created attachment 112905
The patch

Add finally {} to try {} catch {}

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Created attachment 112906
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);

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Created attachment 112907
Generated .c code if patched

Note that all the exit paths properly have a g_main_loop_quit (_data1_->mainloop);

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Please if possible credit this to "Albert Astals Cid <email address hidden>" and not to "Albert Astals Cid <email address hidden>" I'm just using my kde.org account since I didn't feel like creating a new one just for this.

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Created attachment 112950
The patch

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

It's been commited.

Changed in zeitgeist:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in zeitgeist (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.