#878 Segmentation Fault on C macro

Filetypes (68)

With C filetype and UTF-8 encoding, there becomes a crash in g_markup_escape() (or thereabouts).

Happens when typing this with filetype C:

#define MVALUE(nm<--- here is where it crashes

Printing the `utf8_name` prints sometimes "invalid" characters, instead of closing parens, that don't display on my (UTF-8) machine.

GDB traceback is attached. Seems to be that TagManager/Ctags is giving invalid UTF-8 back to Geany and Geany is not handling this before passing to GLIB functions which are expecting valid UTF-8.

Let me know what else I can provide.

Using Geany Git head and Xubuntu 12.04.

P.S. Lex can also reproduce this crash.


  • Anonymous - 2012-08-12

    GDB traceback

  • Colomban Wendling

    I'm afraid I can't reproduce the issue by just following the instructions here... is a tag file involved or something?

    @elextr: you mean that 89b7e08 introduced the issue?

  • Lex Trotman

    Lex Trotman - 2012-08-25


    I can repeatedly cause it, but its not repeatable every time, maybe an uninitialised variable that is correct some of the time? Exact instructions:

    1. open a C file (note a saved file not a new unsaved one)
    2. type

    #define RUBBISH(aaaaaa

    3. if it doesn't crash delete the 'a's and repeat slower, you want autocomplete to kick in
    4. keep trying until Geany crashes

    No I didn't mean 89b7e08 introduced it, just that it was still there in that version, so your latest commits in and around tagmanager/symbols didn't cause it and you could start your git bisect from there instead of HEAD.

  • Colomban Wendling

    • labels: 1385607 --> Filetypes
    • assigned_to: nobody --> colombanw
    • status: open --> open-accepted
  • Colomban Wendling

    OK, gotcha (thanks to Valgrind). Now wondering why the code looks like that in the first place... will fix soon.

  • Colomban Wendling

    • status: open-accepted --> closed-fixed
  • Colomban Wendling

    Now fixed in Git, thanks for reporting.

  • Colomban Wendling

    • milestone: --> v1.23

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks