From: Dennis S. <sy...@yo...> - 2004-10-18 22:33:02
|
Alright, What is now in CVS would be anough to create the UI tree, next is a GTK2 widget, that would suite as a test. And after that I will implement UI update notification, and param change events propagation. How are the other hackers doing ? :)) Cheers, Dennis |
From: Vitaly V. B. <vi...@ph...> - 2004-10-19 00:00:37
|
On Tue, 19 Oct 2004 00:33:14 +0200 Dennis Smit <sy...@yo...> wrote: > How are the other hackers doing ? :)) Hunting those weird bugs... and my hangs. Dennis, shouldn't visual_bin_destroy() free only managed plugins, should it? visual_plugin_unload() dlclose()'s library even if it is used... That's all for today :) -- Vitaly GPG Key ID: F95A23B9 |
From: Dennis S. <sy...@yo...> - 2004-10-19 09:11:12
|
On Tue, 2004-10-19 at 03:00 +0300, Vitaly V. Bursov wrote: > On Tue, 19 Oct 2004 00:33:14 +0200 > Dennis Smit <sy...@yo...> wrote: > > > How are the other hackers doing ? :)) > Hunting those weird bugs... and my hangs. > > Dennis, shouldn't visual_bin_destroy() free only managed plugins, should it? > > visual_plugin_unload() dlclose()'s library even if it is used... > > That's all for today :) I'm not sure about the bin, I really need to redo it from scratch.... About visual_plugin_unload, would it be better to set an error, and have a way to force it ? What others bugs do you have? I might be able to help you fixing those. Cheers, Dennis |
From: Vitaly V. B. <vit...@us...> - 2004-10-19 19:28:19
|
On Tue, 19 Oct 2004 11:11:23 +0200 Dennis Smit <sy...@yo...> wrote: > On Tue, 2004-10-19 at 03:00 +0300, Vitaly V. Bursov wrote: > > On Tue, 19 Oct 2004 00:33:14 +0200 > > Dennis Smit <sy...@yo...> wrote: > > > > > How are the other hackers doing ? :)) > > Hunting those weird bugs... and my hangs. > > > > Dennis, shouldn't visual_bin_destroy() free only managed plugins, should it? > > > > visual_plugin_unload() dlclose()'s library even if it is used... > > > > That's all for today :) > > I'm not sure about the bin, I really need to redo it from scratch.... I mean int visual_bin_destroy (VisBin *bin) { visual_log_return_val_if_fail (bin != NULL, -1); if ((bin->actor != NULL) /*-->*/ && (bin->managed) /*<--*/ ) visual_actor_destroy (bin->actor); ... > About visual_plugin_unload, would it be better to set an error, and have > a way to force it ? No, of course not! if you unload library that is used everything will crash. Well, here's an example that will not work. plug1 = visual_plugin_load(ref); plug2 = visual_plugin_load(ref); // realize, etc. visual_plugin_unload(plug1); visual_plugin_unload(plug2); // <-- Hard Crash here. because it dlclose()'s library. :( I do not see a quick&nice way to fix this but write a dlopen() manager with static struct array with handles and refcounters. This thing should be fixed. > What others bugs do you have? I might be able to help you > fixing those. OK, just as I find some. :) -- Vitaly GPG Key ID: F95A23B9 |
From: Dennis S. <sy...@yo...> - 2004-10-19 19:56:58
|
On Tue, 2004-10-19 at 22:02 +0300, Vitaly V. Bursov wrote: > > I'm not sure about the bin, I really need to redo it from scratch.... > I mean > > int visual_bin_destroy (VisBin *bin) > { > visual_log_return_val_if_fail (bin != NULL, -1); > > if ((bin->actor != NULL) /*-->*/ && (bin->managed) /*<--*/ ) > visual_actor_destroy (bin->actor); > ... Aah that way, well, yeah, maybe it's better to always destroy childs... I'm not going to fix this right now, but do that when we do the rewrite. > > About visual_plugin_unload, would it be better to set an error, and have > > a way to force it ? > No, of course not! if you unload library that is used everything will crash. > > Well, here's an example that will not work. > > plug1 = visual_plugin_load(ref); > plug2 = visual_plugin_load(ref); Well, I don't have a crash related to this... I can load 2 plugins and unload them both, my dlopen gives a fake handle for the second library, and REALLY closes the library when all handles are being dlclosed... > visual_plugin_unload(plug1); > visual_plugin_unload(plug2); // <-- Hard Crash here. > > because it dlclose()'s library. :( > > I do not see a quick&nice way to fix this but write a > dlopen() manager with static struct array with > handles and refcounters. > > This thing should be fixed. > > > What others bugs do you have? I might be able to help you > > fixing those. > OK, just as I find some. :) Alright, Keep me updated, I might be able to help :) Cheers, Dennis |
From: Vitaly V. B. <vit...@us...> - 2004-10-20 06:09:47
|
On Tue, 19 Oct 2004 21:57:06 +0200 Dennis Smit <sy...@yo...> wrote: > Well, I don't have a crash related to this... I can load 2 plugins and > unload them both, my dlopen gives a fake handle for the second library, > and REALLY closes the library when all handles are being dlclosed... Hm, it should. Sorry. ...weird. -- Vitaly GPG Key ID: F95A23B9 |
From: Dennis S. <sy...@yo...> - 2004-10-20 14:51:23
|
On Wed, 2004-10-20 at 09:07 +0300, Vitaly V. Bursov wrote: > On Tue, 19 Oct 2004 21:57:06 +0200 > Dennis Smit <sy...@yo...> wrote: > > > Well, I don't have a crash related to this... I can load 2 plugins and > > unload them both, my dlopen gives a fake handle for the second library, > > and REALLY closes the library when all handles are being dlclosed... > Hm, it should. Sorry. > ...weird. > The following test program: #include <libvisual/libvisual.h> int main (int argc, char **argv) { VisPluginRef *ref1; VisPluginData *plug1; VisPluginData *plug2; visual_init (&argc, &argv); ref1 = visual_plugin_find (visual_plugin_get_registry (), "oinksie"); printf ("%p\n", ref1); plug1 = visual_plugin_load (ref1); plug2 = visual_plugin_load (ref1); printf ("plug: %p\n", plug1); visual_plugin_realize (plug1); visual_plugin_realize (plug2); visual_plugin_unload (plug1); visual_plugin_unload (plug2); return 0; } Works perfectly, what dlopen seems to do here, is when a library gets opened twice, generate one fake handle. and close the library for real if the last handle is being dlclosed(). Can you show me your code that does not work, or make it possible for me to test. If it seems that dlopen is indeed different on different systems, I can introduce an easy hack into the plugin loader that keeps track on the real handle. But I really think this is NOT needed... Cheers, Dennis |