#79 geany 0.21 crashes at program end under debugging

open
debugger (11)
5
2012-06-18
2012-06-18
Anonymous
No

geany -V
geany 0.21 (built on Mar 19 2012 with GTK 2.24.10, GLib 2.31.20)

$geany -v
(geany:21735): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion `GTK_IS_MENU_SHELL(menu)' failed

(geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

(geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

(geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

(geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

(geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

(geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

(geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

(geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

(geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed
$

1. Starting geany from terminal.
2. Opening project with C program (ex. helloworld.c)
3. Lunch program in debugger
4. When program ends - click "Stop" button on debugger tab - geany crash

Discussion

  • "When program ends" - do you mean standing on a last line of code?
    Can't you pls supply your helloworld.c?

     
  • Heretic
    Heretic
    2012-06-18

    #include <stdio.h>

    int main(int argc, char **argv)
    {
    printf("Hello!");
    return 0;
    }

     
  • Heretic
    Heretic
    2012-06-18

    I mean, that program is "exited-normally" (as write in "Debugger messages" tab). But "Stop" button is only available on Debug tools panel

     
  • oh, ok, got it
    will look asap, thanks for submitting

     
  • Ivan Trombley
    Ivan Trombley
    2012-08-08

    I'm having the same issue with v1.22. Also, if I start geany from the ubuntu menu (i.e. not from a terminal), start debugging then click stop, it kills my session and kicks me back to the login screen. That's pretty severe.

     
  • There was such a bug that was fixed but didn't manage to be included in 1.22 release.
    Can you clone my github branch (https://github.com/cesspit/geany-plugins) and check if it's gone?

     
  • Ivan Trombley
    Ivan Trombley
    2012-08-10

    Looks good. Thanks.

     
  • Ivan Trombley
    Ivan Trombley
    2012-08-10

    Ah, I spoke too soon. Now when I start debugging, it appears to lock up for a few seconds then crashes with this output:

    (geany:14207): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion `GTK_IS_MENU_SHELL(menu)' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:14207): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed
    *** glibc detected *** .apps/geany/bin/geany: double free or corruption (fasttop): 0x0000000002450220 ***
    ======= Backtrace: =========
    /lib/x86_64-linux-gnu/libc.so.6(+0x7e626)[0x7fe30fada626]
    /home/ivan/.apps/geany/lib/geany/debugger.so(+0x163b0)[0x7fe300f4e3b0]
    /home/ivan/.apps/geany/lib/geany/debugger.so(+0x16995)[0x7fe300f4e995]
    /home/ivan/.apps/geany/lib/geany/debugger.so(+0x17245)[0x7fe300f4f245]
    /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x133)[0x7fe31088dd53]
    /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x480a0)[0x7fe31088e0a0]
    /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_loop_run+0x6a)[0x7fe31088e49a]
    /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_main+0xa7)[0x7fe311ff62f7]
    .apps/geany/bin/geany(main+0xdcc)[0x448aec]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fe30fa7d76d]
    .apps/geany/bin/geany[0x449ee1]
    ======= Memory map: ========
    00400000-0062e000 r-xp 00000000 08:01 17173034 /home/ivan/.apps/geany/bin/geany
    0082e000-0082f000 r--p 0022e000 08:01 17173034 /home/ivan/.apps/geany/bin/geany
    0082f000-00835000 rw-p 0022f000 08:01 17173034 /home/ivan/.apps/geany/bin/geany
    00835000-0083b000 rw-p 00000000 00:00 0
    01c47000-024e5000 rw-p 00000000 00:00 0 [heap]
    7fe2e4000000-7fe2e4021000 rw-p 00000000 00:00 0
    7fe2e4021000-7fe2e8000000 ---p 00000000 00:00 0
    7fe2ec000000-7fe2ec021000 rw-p 00000000 00:00 0
    7fe2ec021000-7fe2f0000000 ---p 00000000 00:00 0
    7fe2f2809000-7fe2f280b000 r-xp 00000000 08:01 29100202 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
    7fe2f280b000-7fe2f2a0a000 ---p 00002000 08:01 29100202 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
    7fe2f2a0a000-7fe2f2a0b000 r--p 00001000 08:01 29100202 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
    7fe2f2a0b000-7fe2f2a0c000 rw-p 00002000 08:01 29100202 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
    7fe2f2a0c000-7fe2f2a6c000 rw-s 00000000 00:04 294913 /SYSV00000000 (deleted)
    7fe2f2a6c000-7fe2f2a70000 r-xp 00000000 08:01 29100278 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
    7fe2f2a70000-7fe2f2c70000 ---p 00004000 08:01 29100278 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
    7fe2f2c70000-7fe2f2c71000 r--p 00004000 08:01 29100278 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
    7fe2f2c71000-7fe2f2c72000 rw-p 00005000 08:01 29100278 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
    7fe2f2c72000-7fe2f3d9b000 r--p 00000000 08:01 30148054 /usr/share/icons/hicolor/icon-theme.cache
    7fe2f3d9b000-7fe2f8000000 r--p 00000000 08:01 30147902 /usr/share/icons/gnome/icon-theme.cache
    7fe2f8000000-7fe2f8022000 rw-p 00000000 00:00 0
    7fe2f8022000-7fe2fc000000 ---p 00000000 00:00 0
    7fe2fc000000-7fe2fc022000 rw-p 00000000 00:00 0
    7fe2fc022000-7fe300000000 ---p 00000000 00:00 0
    7fe300016000-7fe300076000 rw-s 00000000 00:04 262144 /SYSV00000000 (deleted)
    7fe300076000-7fe300126000 r--p 00000000 08:01 29754265 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
    7fe300126000-7fe30012c000 r-xp 00000000 08:01 29100272 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gif.so
    7fe30012c000-7fe30032b000 ---p 00006000 08:01 29100272 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gif.so
    7fe30032b000-7fe30032c000 r--p 00005000 08:01 29100272 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gif.so
    7fe30032c000-7fe30032d000 rw-p 00006000 08:01 29100272 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gif.so
    7fe30032d000-7fe30032e000 ---p 00000000 00:00 0
    7fe30032e000-7fe300b2e000 rw-p 00000000 00:00 0
    7fe300b2e000-7fe300b34000 r-xp 00000000 08:01 29100287 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so
    7fe300b34000-7fe300d33000 ---p 00006000 08:01 29100287 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so
    7fe300d33000-7fe300d34000 r--p 00005000 08:01 29100287 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so
    7fe300d34000-7fe300d35000 rw-p 00006000 08:01 29100287 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so
    7fe300d35000-7fe300d37000 r-xp 00000000 08:01 23858771 /lib/x86_64-linux-gnu/libutil-2.15.so
    7fe300d37000-7fe300f36000 ---p 00002000 08:01 23858771 /lib/x86_64-linux-gnu/libutil-2.15.so
    7fe300f36000-7fe300f37000 r--p 00001000 08:01 23858771 /lib/x86_64-linux-gnu/libutil-2.15.so
    7fe300f37000-7fe300f38000 rw-p 00002000 08:01 23858771 /lib/x86_64-linux-gnu/libutil-2.15.so
    7fe300f38000-7fe300f61000 r-xp 00000000 08:01 17172825 /home/ivan/.apps/geany/lib/geany/debugger.so
    7fe300f61000-7fe301160000 ---p 00029000 08:01 17172825 /home/ivan/.apps/geany/lib/geany/debugger.so
    7fe301160000-7fe301161000 r--p 00028000 08:01 17172825 /home/ivan/.apps/geany/lib/geany/debugger.so
    7fe301161000-7fe301164000 rw-p 00029000 08:01 17172825 /home/ivan/.apps/geany/lib/geany/debugger.so
    7fe301164000-7fe301165000 rw-p 00000000 00:00 0
    7fe301165000-7fe301166000 ---p 00000000 00:00 0
    7fe301166000-7fe301966000 rw-p 00000000 00:00 0
    7fe301966000-7fe301988000 r-xp 00000000 08:01 23858764 /lib/x86_64-linux-gnu/libtinfo.so.5.9
    7fe301988000-7fe301b88000 ---p 00022000 08:01 23858764 /lib/x86_64-linux-gnu/libtinfo.so.5.9
    7fe301b88000-7fe301b8c000 r--p 00022000 08:01 23858764 Aborted (core dumped)

     
  • Did you checkout a "master" branch? Active branch at my github repo is named "debugger",
    sorry for not mentioning earlier.
    It you've checkout "debugger" can you start geany inder gdb, reproduce crashing and paste stack trace here?
    BTW what ubuntu version are you on?

     
  • oops. forgot to log in

     
  • Ivan Trombley
    Ivan Trombley
    2012-08-11

    I'm using Ubuntu 12.04. Here's how to reproduce the issue. Install GDC (sudo apt-get install gdc) and build the following code using "gdc -g -o test test.d":

    // test.d >>>----->
    import std.stdio;

    int main()
    {
    int[100] arr = void;

    foreach (idx, val; arr)
    writefln("%s = %s", idx, val);

    return 0;
    }
    // <-----<<< test.d

    Set a breakpoint on the line with "foreach" and start debugging. This should work fine. Change the line with "arr" to this:

    int[100] arr;

    Build and start debugging. geany will hang for a few seconds and then crash. I can debug this without issue from the command line.

     

  • Anonymous
    2012-08-23

    Same issue here with Xubuntu 12.04
    Geany 1.23 (git>=2b77157)
    Debugger 1.23 (downloaded from here http://download.geany.org/geany_plugins_git.tar.gz\)

    Here is the debug log:

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    (geany:13635): GLib-CRITICAL **: g_hash_table_remove_all: assertion `hash_table != NULL' failed

    It will be very good to fix this plugins immediately cause its the only full featured debug plugin for Geany.

     
  • hi guys, sorry for delay, i was getting married ),
    I checked your requests on ubuntu 12.04 and my head branch
    (it has 3 commits on it that have not been merged into geany/geany-plugins yet, but I just opened a pull request)
    and all seems ok:

    1. session is not being killed when stopping debugging syncronously or asyncronously, or when program is exiting normally
    2. geany does not hang on debuging D program with both array declarations

    You can clone my branch by doing
    git clone git://github.com/cesspit/geany-plugins.git

    or you can wait until pull request will be merged and pull master branch of geany/geany-plugins

    If you still experience problems pls post here, will look asap

     
  • 3. geany does not crash when stopping debugging syncronously or
    asyncronously, or when program is exiting normally

     

  • Anonymous
    2012-08-24

    Tested and the issue solved :)
    Thank you very much and I am wishing you the best of life today and in the days to come.

     

  • Anonymous
    2012-08-24

    The message

    (geany:21735): GLib-CRITICAL **: g_string_free: assertion `string != NULL' failed

    still appears but the debug plugins works.
    Just to inform you.

     
  • Ivan Trombley
    Ivan Trombley
    2012-08-28

    Congratulations Alexander.

    I switched to dmd (for other reasons) and tried your changes. I still get the same issue but now it will happen if arr is initialized or not.

     
  • Ivan Trombley
    Ivan Trombley
    2012-08-28

    Backtrace:

    #0 0x00007ffff5370445 in __GI_raise (sig=<optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
    #1 0x00007ffff5373bab in __GI_abort () at abort.c:91
    #2 0x00007ffff53ade2e in __libc_message (do_abort=2,
    fmt=0x7ffff54b60d0 "*** glibc detected *** %s: %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:201
    #3 0x00007ffff53b8626 in malloc_printerr (action=3,
    str=0x7ffff54b62c0 "double free or corruption (fasttop)",
    ptr=<optimized out>) at malloc.c:5007
    #4 0x00007fffd93a93b0 in get_variables (vars=0xba3260) at dbm_gdb.c:1389
    #5 0x00007fffd93a9995 in update_autos () at dbm_gdb.c:1592
    #6 0x00007fffd93aa245 in on_read_from_gdb (src=<optimized out>,
    cond=<optimized out>, data=<optimized out>) at dbm_gdb.c:530
    #7 0x00007ffff616bd53 in g_main_context_dispatch ()
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #8 0x00007ffff616c0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #9 0x00007ffff616c49a in g_main_loop_run ()
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #10 0x00007ffff78d42f7 in gtk_main ()
    from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
    #11 0x0000000000448e0c in main (argc=1, argv=0x7fffffffe2b8) at main.c:1155

     
  • Ivan Trombley
    Ivan Trombley
    2012-08-29

    I just tried it again and now it works.

     
  • I tried yesterday and it didn't but with other symptoms - exit right after start debugging on both ubuntu 12.04 and debian squeeze, however I'm hardly rewriting gdb backend now, so if it works for you for now, I wont search for my problem source at my box