Re: [Evolution-hackers] segfault with evolution client functions and g_modules
Am Montag, den 10.09.2007, 09:43 +0530 schrieb Srinivasa Ragavan: On Sat, 2007-09-08 at 13:39 +0200, Daniel Friedrich wrote: Hello, i currently programming the evo2 plugin of opensync. The plugins of Are they EPlugins? No, that is a plugin for opensync. (http://www.opensync.org) opensync are loaded with g_module_open(). If i now call for example e_book_get_addressbooks() inside the module and unload the modul, i get a segmentation fault while the return of the main function! If i do not unload the modul, the main returns fine. Maybe i need something like a Finalize()-methode for the EDS client API. - opensync load the opensync-plugin with g_module_open() - than opensync execute a function of the opensync-plugin which execute the e_book_get_addressbooks() function - after that opensync unload the opensync-plugin with g_module_close() - when the program reaches the end (return of main) i get a segfault Maybe the EDS client api uses the default g_main_loop and wants to execute some code while exiting the program. But at this point the plugin is already unloaded and the code not executable (SYMBOLS are unloaded). So it would be necessary to detach the EDS client from the g_main_loop. A finalize()-methode were great to do that. I hope somebody can follow me and help to solve the problem. Best Regards, Daniel Can you be little more specific here? A code paste can be more helpful to understand the issue. -Srini. Or why could that happen? Best regards, Daniel ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers
Re: [Evolution-hackers] segfault with evolution client functions and g_modules
On Mon, 2007-09-10 at 22:30 +0200, Daniel Friedrich wrote: - opensync load the opensync-plugin with g_module_open() - than opensync execute a function of the opensync-plugin which execute the e_book_get_addressbooks() function - after that opensync unload the opensync-plugin with g_module_close() - when the program reaches the end (return of main) i get a segfault Maybe the EDS client api uses the default g_main_loop and wants to execute some code while exiting the program. But at this point the plugin is already unloaded and the code not executable (SYMBOLS are unloaded). So it would be necessary to detach the EDS client from the g_main_loop. A finalize()-methode were great to do that. I hope somebody can follow me and help to solve the problem. libebook isn't designed to be loaded and unloaded, so it's best if you don't even try to. Even if there was a finalise() method, if you tried to load/unload/load it will probably crash straight away as it tries to re-register a supposedly static type. Ross -- Ross Burton mail: [EMAIL PROTECTED] jabber: [EMAIL PROTECTED] www: http://www.burtonini.com./ PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF signature.asc Description: This is a digitally signed message part ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers
Re: [Evolution-hackers] segfault with evolution client functions and g_modules
Am Montag, den 10.09.2007, 22:00 +0100 schrieb Ross Burton: On Mon, 2007-09-10 at 22:30 +0200, Daniel Friedrich wrote: - opensync load the opensync-plugin with g_module_open() - than opensync execute a function of the opensync-plugin which execute the e_book_get_addressbooks() function - after that opensync unload the opensync-plugin with g_module_close() - when the program reaches the end (return of main) i get a segfault Maybe the EDS client api uses the default g_main_loop and wants to execute some code while exiting the program. But at this point the plugin is already unloaded and the code not executable (SYMBOLS are unloaded). So it would be necessary to detach the EDS client from the g_main_loop. A finalize()-methode were great to do that. I hope somebody can follow me and help to solve the problem. libebook isn't designed to be loaded and unloaded, so it's best if you don't even try to. Even if there was a finalise() method, if you tried to load/unload/load it will probably crash straight away as it tries to re-register a supposedly static type. Ross Thanks for this answer. I only load and unload. Is this the same or another bug furthermore? I will open a bug report for this issue. Maybe it will be fixed some day :-) For now i will run the evolution2-opensync-plugin in a own process. Best regards, Daniel signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers
Re: [Evolution-hackers] segfault with evolution client functions and g_modules
On Sat, 2007-09-08 at 13:39 +0200, Daniel Friedrich wrote: Hello, i currently programming the evo2 plugin of opensync. The plugins of Are they EPlugins? opensync are loaded with g_module_open(). If i now call for example e_book_get_addressbooks() inside the module and unload the modul, i get a segmentation fault while the return of the main function! If i do not unload the modul, the main returns fine. Maybe i need something like a Finalize()-methode for the EDS client API. Can you be little more specific here? A code paste can be more helpful to understand the issue. -Srini. Or why could that happen? Best regards, Daniel ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers ___ Evolution-hackers mailing list Evolution-hackers@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-hackers