[Debtags-devel] Any Idea why this fails?

Benjamin Mesing bensmail@gmx.net
Sun, 12 Sep 2004 18:21:08 +0200


Hello,


the code below fails when run multiple times (but not allways but only
under special circumstences). I do not understand it and it seems to
make no sense to me as the code does not depend on any of the class
members so it should work independent of the context
I have also tried executing the code more then once in the class and
this does also work, so it is not a simple rule as "It can't be called
twice". 
Perhaps it might have something to do with a lock on the debtags file or
whatever. Here is the code that is called, the
Debtags::TagDB::outputSystem(collBuilder, false) function call
segfaults.

        Tagcoll::InputMerger<int, string> merger;
        Tagcoll::TagcollBuilder collBuilder(*(new Tagcoll::HandleMaker<string>()));
        // load the database into the collBuilder and change it to handles
        Debtags::TagDB::outputSystem(collBuilder, false);
        
And here is the relevant part of the backtrace:

#0  0x08169554 in ?? ()
#1  0x401d690a in Tagcoll::DerivedTagList::getDerived () from /usr/lib/libtagcoll.so.0
#2  0x4004dac5 in Tagcoll::ApplyDerivedTags<std::string>::consume () from /usr/lib/libdebtags.so.0
#3  0x4004d3a2 in Tagcoll::TagcollConsumer<std::string, std::string>::consume () from /usr/lib/libdebtags.so.0
#4  0x401e461e in Tagcoll::FilterChain<std::string, std::string>::consume () from /usr/lib/libtagcoll.so.0
#5  0x401dbc95 in Tagcoll::parseTagcoll () from /usr/lib/libtagcoll.so.0
#6  0x40049c2b in (anonymous namespace)::VocabularyParser::getNextRecord () from /usr/lib/libdebtags.so.0
#7  0x4004bcec in Debtags::TagDB::outputFile () from /usr/lib/libdebtags.so.0
#8  0x4004be51 in Debtags::TagDB::outputSystem () from /usr/lib/libdebtags.so.0
#9  0x4382f465 in NPlugin::DebtagsPluginContainer::updateDebtags (this=0x81b7970) at debtagsplugincontainer.cpp:252


Currently I am out of ideas (as it is difficult to debug into libraries)
so help would be greatly appreciated.

Greetings Ben