Threading problem in extension system
Hi all, There is a threading problem with the extension system. It results in a crash when saving a document and quitting while the save is happening. Have a look here: https://bugs.launchpad.net/inkscape/+bug/967416
I don't know enough about glib's threading to fix this bug. I do not fully understand where the execution flow is going after the fork (/src/extension/implementation/script.cpp, line 1017, _main_loop->run();), nor where the fork is terminated.
I hope someone who knows more about this can have a look. I'm afraid it may lead to pretty weird bugs when running time consuming extensions and doing stuff meanwhile. (gdb reports illegal mem accesses when doing stuff while an extension is running, for example).
Is this asynchronous extension execution so important, or can we disable it for now to improve stability?
regards, Johan
On Sun, 2014-06-29 at 23:38 +0200, Johan Engelen wrote:
Hi all, There is a threading problem with the extension system. It results in a crash when saving a document and quitting while the save is happening. Have a look here: https://bugs.launchpad.net/inkscape/+bug/967416
I don't know enough about glib's threading to fix this bug. I do not fully understand where the execution flow is going after the fork (/src/extension/implementation/script.cpp, line 1017, _main_loop->run();), nor where the fork is terminated.
I hope someone who knows more about this can have a look. I'm afraid it may lead to pretty weird bugs when running time consuming extensions and doing stuff meanwhile. (gdb reports illegal mem accesses when doing stuff while an extension is running, for example).
Is this asynchronous extension execution so important, or can we disable it for now to improve stability?
Liam emailed me with a crash he thought was happening in the style code I modified. After examining it a bit it appears to be a problem with asynchronous behavior and is probably the same bug as this. To reproduce, take a very large file (icons.svg) and apply one of the color extensions to part of it (an icon). Inkscape will crash with in few applications of the extension.
Tav
On Sun, Jun 29, 2014, at 10:57 PM, Tavmjong Bah wrote:
Liam emailed me with a crash he thought was happening in the style code I modified. After examining it a bit it appears to be a problem with asynchronous behavior and is probably the same bug as this. To reproduce, take a very large file (icons.svg) and apply one of the color extensions to part of it (an icon). Inkscape will crash with in few applications of the extension.
If anyone is interested in looking into this, I can lend a hand. If not, then I'll take a look once I manage to get a build system working again. It does appear to manifest on Ubuntu, so I should be able to get something going within just a few days.
However... it does look like a good opportunity for someone who might be interested in learning more on how to attack such bugs to be able to collaborate on it.
participants (3)
-
Johan Engelen
-
Jon A. Cruz
-
Tavmjong Bah