[Geany-devel] Possible infinite loop?

Matthew Brush mbrush at xxxxx
Fri Aug 19 10:16:41 UTC 2011


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 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.

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]

[1] 
http://git.geany.org/geany/commit/?id=b1ce79efed2ecd460b83a22daa610192abb6ef66

Cheers,
Matthew Brush
	




More information about the Devel mailing list