[Geany-devel] Possible infinite loop?

Lex Trotman elextr at xxxxx
Fri Aug 19 11:53:39 UTC 2011

On 19 August 2011 20:16, Matthew Brush <mbrush at codebrainz.ca> wrote:
> Hi,
> I have no idea why, but for some reason if I have my filetype set to C, with
> my Geany API tags loaded (and the other ones from the Wiki), when I typed

Can you narrow it down to one tags file, and maybe see if regenerating
it helps?  Also what happens if you turn off auto tags and then type
to there and save?

> the following, I get Geany locking up:
>        GeanyDocument *doc;
>        doc = document_get_current();
>        doc->file_type-[AND_GEANY_FREEZES_HERE]
> Not sure how to even troubleshoot this, but I did run it in gdb and killed
> it during the infinite loop, and it's stuck calling
> `tm_tag.c:tm_tags_find()` over and over again (I put a print statement
> here).  When I kill it, it's always stuck in that function or `bsearch()`
> function which that one calls.  So I think it's something that's calling the
> `tm_tag.c:tm_tags_find()` function in an infinite loop.

Whats the back trace when you kill it in gdb?

> I did try and revert to before the most recent changes to the TagManager
> stuff[1] and it seemed to still happen, so I don't think it's related. I've
> disabled all but the Class Build and Split Window plugins. Is it possibly
> something with corrupted tag files or similar?
> Otherwise, I'll just chock it up to a random fluke and use this work-around:
>        GeanyDocument *doc;
>        GeanyFiletype *ft;
>        doc = document_get_current();
>        ft = doc->file_type;
>        ft->file_type-[AND_IT_DOESNT_FREEZE ANYMORE]

Thats not actually the same code though, its doc->file_type->file_type- ?


> [1]
> http://git.geany.org/geany/commit/?id=b1ce79efed2ecd460b83a22daa610192abb6ef66
> Cheers,
> Matthew Brush
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

More information about the Devel mailing list