[Gimp-developer] Error when calling gimp_file_load() from	concurrent thread
- From: Alessandro Francesconi <misterbirra hotmail it>
- To: gimp-developer-list gnome org
- Subject: [Gimp-developer] Error when calling gimp_file_load() from	concurrent thread
- Date: Sat, 14 Jul 2012 21:15:43 +0200
Hello, I'm the author of BIMP, Batch Image Manipulation Plugin 
(http://www.alessandrofrancesconi.it/projects/bimp/) and I'm extending 
this tool with the possibility to stop the whole batch process by 
clicking on a GTK button.
For that I'm enabling a multi threading functionality. In few words, 
when clicking on the "Apply" button, the function that does the batch 
process is called from a newly created thread, with the use of  
'g_thread_new ("thread_name", bimp_start_batch, data)'.
I'm facing a strange problem: everything that is called from the 
concurrent thread (precisely by 'bimp_start_batch' function) works, 
except when it's time to call 'gimp_file_load' for opening the image 
files... because the program crashes with this kind of message in the 
console:
(bimp:6646): LibGimpBase-ERROR **: gimp_wire_read_msg: could not find 
handler for message: 1952804208
Is it something related to the fact that gimp_file_load() tries to send 
a message but, having it been called from a secondary thread, the 
message "never reaches its destination"?
Does the group of functions here 
http://developer.gimp.org/api/2.0/libgimp/libgimp-gimpmessage.html and 
here 
http://developer.gimp.org/api/2.0/libgimp/libgimp-gimpplugin.html#gimp-plugin-set-pdb-error-handler 
can help me?
In other words, what's the correct way to call gimp_* functions from a 
concurrent thread? Thank you so much for your help.
-Ale
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]