From: Vitaly V. B. <vit...@us...> - 2004-11-21 20:39:47
|
Hi! :) lvdisplay now supports multiple screens :) ...but before you start demo program... there's a problem. ======= *** glibc detected *** double free or corruption: 0x0810a338 *** [ that's my new glibc :) I like it! ] Program received signal SIGABRT, Aborted. [Switching to Thread 1083998352 (LWP 4063)] 0xffffe410 in ?? () (gdb) bt [ snip ] #8 0x40029df1 in visual_mem_free (ptr=0x0) at lv_mem.c:49 #9 0x40026c41 in visual_plugin_unload (plugin=0x1fa) at lv_plugin.c:504 #10 0x40022e1e in visual_input_destroy (input=0x805fd40) at lv_input.c:163 #11 0x40023c08 in visual_bin_destroy (bin=0x805fcc8) at lv_bin.c:91 #12 0x40018bf5 in lvdisplay_finalize (v=0x8057300) at lv_display.c:326 #13 0x08048de5 in main (argc=1, argv=0xbffff6a4) at main.c:243 ======= ======= example/main.c VisInput *input = visual_input_new("alsa"); [snip] visual_bin_connect(bin, actor, input); visual_bin_connect(bin2, actor2, input); [snip] lvdisplay_finalize(v); lvdisplay_finalize(v2); ======== yup, "input" gets free()'d 2 times. How we're going to fix it? a. forbid such kind of code. Add input->is_used field to debug it. b. add refcounting to input and alike structures and free it accordingly I think b. is nice here. Because we have a reentrant design, plugin can be used multiple times.... or not? and BTW, why not to move -O3 flag to configure scripts and use it only when --enable-debug is not passed? -- Vitaly GPG Key ID: F95A23B9 |