Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger plugin crashes IDE in small window sizes #229

Closed
deeptoaster opened this issue May 9, 2015 · 5 comments
Closed

Debugger plugin crashes IDE in small window sizes #229

deeptoaster opened this issue May 9, 2015 · 5 comments

Comments

@deeptoaster
Copy link

If Geany Debugger is enabled (from the Plugin Manager) while the window width is less than 700px, Geany crashes.

Incidentally, if Geany Debugger is already enabled, I cannot resize the window to less than 700px wide, which prevents me from being able to use Geany on half my screen. It would be nice if this minimum width requirement could be removed as well.

@codebrainz
Copy link
Member

Confirmed, but only when it's enabled after already being enabled and then disabled (the first time it just resizes the window to the minimum width). GDB traceback:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5b34435 in g_type_check_instance_is_fundamentally_a (
    type_instance=type_instance@entry=0x140000000055, 
    fundamental_type=fundamental_type@entry=80)
    at /build/buildd/glib2.0-2.44.0/./gobject/gtype.c:4026
4026    /build/buildd/glib2.0-2.44.0/./gobject/gtype.c: No such file or directory.
(gdb) bt
#0  0x00007ffff5b34435 in g_type_check_instance_is_fundamentally_a (type_instance=type_instance@entry=0x140000000055, fundamental_type=fundamental_type@entry=80) at /build/buildd/glib2.0-2.44.0/./gobject/gtype.c:4026
#1  0x00007ffff5b1aab6 in g_object_get_data (object=0x140000000055, key=0x7ffff70980b4 "gtk-tree-row-refs")
    at /build/buildd/glib2.0-2.44.0/./gobject/gobject.c:3439
#2  0x00007ffff6f290cd in gtk_tree_row_reference_free ()
    at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#3  0x00007fffdd1244d7 in add_empty_row () at envtree.c:82
#4  0x00007fffdd124b05 in envtree_init () at envtree.c:436
#5  0x00007fffdd127698 in tpage_init () at tpage.c:284
#6  0x00007fffdd127698 in tpage_init () at tpage.c:408
#7  0x00007fffdd125625 in plugin_init (data=<optimized out>) at plugin.c:105
#8  0x00007ffff79c4ba6 in plugin_new (plugin=0x2092f50)
    at ../../src/plugins.c:295
#9  0x00007ffff79c4ba6 in plugin_new (fname=fname@entry=0x8f05d0 "/home/mbrush/.local/lib/geany/debugger.so", load_plugin=load_plugin@entry=1, add_to_list=add_to_list@entry=1) at ../../src/plugins.c:446
#10 0x00007ffff79c5750 in pm_plugin_toggled (cell=<optimized out>, pth=<optimized out>, data=<optimized out>) at ../../src/plugins.c:948
#11 0x00007ffff5b13f3a in g_cclosure_marshal_VOID__STRINGv (closure=0x20daaa0, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x1fd2d80)
    at /build/buildd/glib2.0-2.44.0/./gobject/gmarshal.c:1794
---Type <return> to continue, or q <return> to quit---
#12 0x00007ffff5b11504 in _g_closure_invoke_va (closure=0x140000000055, 
    closure@entry=0x20daaa0, return_value=0x50, 
    return_value@entry=0x0, instance=0x1, instance@entry=0x20785a0, args=0x1, 
    args@entry=0x7fffffffd400, n_params=6854776, param_types=0x1)
    at /build/buildd/glib2.0-2.44.0/./gobject/gclosure.c:831
#13 0x00007ffff5b2afa7 in g_signal_emit_valist (instance=0x20785a0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd400)
    at /build/buildd/glib2.0-2.44.0/./gobject/gsignal.c:3214
#14 0x00007ffff5b2b8ff in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /build/buildd/glib2.0-2.44.0/./gobject/gsignal.c:3361
#15 0x00007ffff6dba831 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#16 0x00007ffff6f58fb7 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#17 0x00007ffff6f591eb in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#18 0x00007ffff6f4e0f8 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x00007ffff6e4ed1f in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#23 0x00007ffff5b2b8ff in <emit signal ??? on instance 0x1b05d90 [GtkTreeView]> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /build/buildd/glib2.0-2.44.0/./gobject/gsignal.c:3361
    #20 0x00007ffff5b112d5 in g_closure_invoke (closure=0x692170, return_value=0x7fffffffd8e0, n_param_values=2, param_values=0x7fffffffd990, invocation_hint=0x7fffffffd930) at /build/buildd/glib2.0-2.44.0/./gobject/gclosure.c:768
    #21 0x00007ffff5b22f32 in signal_emit_unlocked_R (node=node@entry=0x6921c0, detail=detail@entry=0, instance=instance@entry=0x1b05d90, emission_return=emissi---Type <return> to continue, or q <return> to quit---
on_return@entry=0x7fffffffda40, instance_and_params=instance_and_params@entry=0x7fffffffd990) at /build/buildd/glib2.0-2.44.0/./gobject/gsignal.c:3587
    #22 0x00007ffff5b2b1a5 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffdb20) at /build/buildd/glib2.0-2.44.0/./gobject/gsignal.c:3315
#24 0x00007ffff6f6661c in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#25 0x00007ffff6e4d464 in gtk_propagate_event ()
    at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#26 0x00007ffff6e4d8fb in gtk_main_do_event ()
    at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#27 0x00007ffff6ac0bac in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#28 0x00007ffff5637c3d in g_main_context_dispatch (context=0x64ac90)
    at /build/buildd/glib2.0-2.44.0/./glib/gmain.c:3122
#29 0x00007ffff5637c3d in g_main_context_dispatch (context=context@entry=0x64ac90) at /build/buildd/glib2.0-2.44.0/./glib/gmain.c:3737
#30 0x00007ffff5637f20 in g_main_context_iterate (context=0x64ac90, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /build/buildd/glib2.0-2.44.0/./glib/gmain.c:3808
#31 0x00007ffff5638242 in g_main_loop_run (loop=0x1f360e0)
    at /build/buildd/glib2.0-2.44.0/./glib/gmain.c:4002
#32 0x00007ffff6e4c857 in gtk_main ()
    at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#33 0x00007ffff79bffe1 in main_lib (argc=1, argv=0x7fffffffdfc8)
    at ../../src/libmain.c:1215
---Type <return> to continue, or q <return> to quit---
#34 0x00007ffff7387a40 in __libc_start_main (main=
    0x4005d0 <main>, argc=2, argv=0x7fffffffdfc8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdfb8)
    at libc-start.c:289
#35 0x00000000004005fe in _start ()

@codebrainz
Copy link
Member

Crash can be prevented with:

diff --git a/debugger/src/envtree.c b/debugger/src/envtree.c
index d8bf362..1cfd059 100644
--- a/debugger/src/envtree.c
+++ b/debugger/src/envtree.c
@@ -448,6 +448,7 @@ GtkWidget* envtree_init(void)
 void envtree_destroy(void)
 {
    gtk_tree_row_reference_free(empty_row);
+   empty_row = NULL;
 }

 /*

@deeptoaster
Copy link
Author

On a side note, I'm trying to compile the debugger plugin but it's giving me this error:

debug.c:53:21: fatal error: vte/vte.h: No such file or directory
 #include <vte/vte.h>

Is there something I'm missing?

@b4n
Copy link
Member

b4n commented Jun 18, 2015

#158 should fix this issue

@b4n
Copy link
Member

b4n commented Jun 18, 2015

On a side note, I'm trying to compile the debugger plugin but it's giving me this error:

   debug.c:53:21: fatal error: vte/vte.h: No such file or directory
    #include <vte/vte.h>

Is there something I'm missing?

Looks like you don't have libvte development files installed, but that's odd as the plugin should then be disabled… was the plugin disabled after configure bu you're still building it by explicitly running make inside its own subdirectory?

@b4n b4n closed this as completed in b2152ba Jul 4, 2015
marcelogp pushed a commit to marcelogp/geany-plugins that referenced this issue Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants