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 649569 - GDK_THREADS_ENTER in file_print_cb@modules/printbackends/file/printbackendfile.c
GDK_THREADS_ENTER in file_print_cb@modules/printbackends/file/printbackendfile.c
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.24.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-05-06 13:46 UTC by Yehouda
Modified: 2012-05-17 04:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch (1.94 KB, patch)
2011-05-06 16:25 UTC, Matthias Clasen
accepted-commit_now Details | Review

Description Yehouda 2011-05-06 13:46:36 UTC
The function file_print_cb in the file modules/printbackends/file/printbackendfile.c does GDK_THREAD_ENTER and GDK_THREAD_LEAVE.
That seems to be ok when it called from file_write, which is presumably called without the gdk lock because it is used by g_io_add_watch. But it is wrong when it is called from gtk_print_backend_file_print_stream, which must be called with the gdk lock. In this case you get a reursive lock.

You can get that by selecting a "print to file" in the print dialog, select "other.." in the "save in folder" combobox, enter rubbish path and the tries to print. 

Seems to have been there since at least 2.12.
Comment 1 Matthias Clasen 2011-05-06 16:25:46 UTC
Created attachment 187364 [details] [review]
a patch

I've failed to reproduce the problem here locally, but the problem description certainly makes sense.
Can you test this patch ?
Comment 2 Yehouda 2011-05-09 14:57:20 UTC
We have done a quick test (with 2.22.0 rather than 2.24) and it works ok. But we normally use the distributions that come with the machines, so it will not tested much.
Comment 3 Fabio Durán Verdugo 2011-06-29 03:36:37 UTC
Matthias: The patch is applied?, can we close this report?
Comment 4 Akhil Laddha 2011-08-11 13:44:13 UTC
Matthias, ping, what's status of patch, committed or not ?