itemrepository crash on Mac OS X

Nicolas Alvarez nicolas.alvarez at gmail.com
Mon Nov 8 00:06:22 UTC 2010


Hi all,

I'm trying KDevelop 4.1 on Mac OS X 10.4. Around five minutes since  
starting KDevelop, it performs some duchain cleanup and immediately  
crashes with an assertion. Closing KDevelop before 5 minutes pass  
will trigger duchain cleanup immediately and crash too.

ASSERT: "static_cast<size_t>(file->pos()) == offset + (1 
+m_monsterBucketExtent)*DataSize" in file /Users/nicolas/src/ 
kdevplatform/language/duchain/repositories/itemrepository.h, line 417

I added debugging messages to get all the values involved in the  
assertion:

asserting file->pos == offset  + (1+m_monsterBucketExtent)*DataSize
asserting 2173660   == 2095814 + (1+0) * 77843
asserting 2173660   == 2095814 + 1 * 77843
asserting 2173660   == 2095814 + 77843
asserting 2173660   == 2173657

And here's the backtrace:
#7  0x1d3cf240 in qFatal ()
#8  0x0f3466e8 in  
KDevelop::Bucket<KDevelop::QualifiedIdentifierPrivate<false>,  
KDevelop::QualifiedIdentifierItemRequest, true, 0u>::store  
(this=0x36fbd9d0, file=0x36fbdac0, offset=2097180) at /Users/nicolas/ 
src/kdevplatform/language/duchain/repositories/itemrepository.h:410
#9  0x0f3467b4 in  
KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>,  
KDevelop::QualifiedIdentifierItemRequest, true, true, 0u,  
1048576u>::storeBucket (this=0x36fbd710, bucketNumber=1) at /Users/ 
nicolas/src/kdevplatform/language/duchain/repositories/ 
itemrepository.h:2552
#10 0x0f346990 in  
KDevelop::ItemRepository<KDevelop::QualifiedIdentifierPrivate<false>,  
KDevelop::QualifiedIdentifierItemRequest, true, true, 0u,  
1048576u>::store (this=0x36fbd710) at /Users/nicolas/src/kdevplatform/ 
language/duchain/repositories/itemrepository.h:2077
#11 0x0f1c2af4 in KDevelop::ItemRepositoryRegistry::store  
(this=0x2cf87210) at /Users/nicolas/src/kdevplatform/language/duchain/ 
repositories/itemrepository.cpp:346
#12 0x0f2dff50 in KDevelop::DUChainPrivate::doMoreCleanup  
(this=0x2cfd3a30, retries=1, needLockRepository=true) at /Users/ 
nicolas/src/kdevplatform/language/duchain/duchain.cpp:856
#13 0x0f2e0794 in KDevelop::DUChainPrivate::CleanupThread::run  
(this=0x2cfd6560) at /Users/nicolas/src/kdevplatform/language/duchain/ 
duchain.cpp:294
#14 0x1d3d7f10 in QThreadPrivate::start ()
#15 0x9002b908 in _pthread_body ()

I can't even complete a full parse of kdevplatform or kdevelop,  
because it crashes long before finishing parsing. So I can't do any  
other Mac fixes to KDevelop until this is fixed.

Let me know if you want me to add more debugging messages. But note  
that on this old Mac, it takes me literally 20 minutes(!) to rebuild  
kdevplatform after changing itemrepository.h, plus another 20 minutes  
to rebuild and relink kdevelop, so make the patch worthwhile! (test a  
dozen theories in one shot)





More information about the KDevelop-devel mailing list