[Geany-devel] Possible infinite loop?

Matthew Brush mbrush at xxxxx
Fri Aug 19 12:08:03 UTC 2011


On 08/19/2011 04:53 AM, Lex Trotman wrote:
> 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?
>

I just tried moving my old config dir out of the way to let a blank one 
be made, it didn't freeze, I then loaded geany-0.19.c.api and 
geany.vala.tags files, it still didn't freeze.

So I'm not really sure what it is.

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

Attached.

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

Sorry, that was a typo:

	ft->[ANYTHING_AND_IT_DOESNT_FREEZE]

When it's a member of a GeanyDocument, as soon as you hit the `>` after 
`doc->file_type-` (presumably when it does a lookup), is when it locks up.


Cheers,
Matthew Brush
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: geany-freeze.bt
URL: <http://lists.geany.org/pipermail/devel/attachments/20110819/61567a1b/attachment.ksh>


More information about the Devel mailing list