After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 648936 - segfault while populating thumb view
segfault while populating thumb view
Status: RESOLVED FIXED
Product: cheese
Classification: Applications
Component: general
git master
Other Linux
: Normal major
: 3.0
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-04-29 12:22 UTC by Matthias Clasen
Modified: 2011-10-25 19:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch guarding gtk_calls (5.09 KB, patch)
2011-05-10 01:25 UTC, Luciana Fujii
rejected Details | Review

Description Matthias Clasen 2011-04-29 12:22:34 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=693083 has a stacktrace of a crash during thumb view population. Direct link here: https://bugzilla.redhat.com/attachment.cgi?id=489582

Looking at the code, a few things jump out:

1. cheese_thumb_view_thread_append_item takes the gtk lock when accessing the list store

2. cheese_thumb_view append_item does not

To be really correct, in a multithreaded app all gtk calls have to be protected by the gtk lock. In this case, things would probably work out ok, if you at least make sure that all accesses to the list store are protected by the lock, since thats the one data structure that is shared here.
Comment 2 Matthias Clasen 2011-04-29 13:00:49 UTC
It may fix this instance, yes
Comment 3 Luciana Fujii 2011-05-10 01:25:38 UTC
Created attachment 187535 [details] [review]
Patch guarding gtk_calls

I made a patch to protect the gtk calls. I think I covered everything. Can someone review this?
Comment 4 David King 2011-10-25 19:19:19 UTC
Comment on attachment 187535 [details] [review]
Patch guarding gtk_calls

I came up with a simpler approach of doing the thumbnail processing in an idle handler. This removes the need to use the GDK lock, and the associated complexity of using threads. I pushed my changes to master as commit 3cfeb415b27e9f667607d5adf1a1cdf4248b652c.