Google sparsehash and Qt::Handle on Mac Os X

Cédric PASTEUR cedric.pasteur.2006 at polytechnique.org
Tue Dec 23 18:08:44 UTC 2008


I finished compiling and now when I run it I get the following crash:
#0  0x0247864f in QMutex::lock ()
#1  0x02cb10e6 in QMutexLocker::relock (this=0xbfffdde8) at qmutex.h:116
#2  0x02cb1155 in QMutexLocker::QMutexLocker (this=0xbfffdde8, m=0x10) at
qmutex.h:98
#3  0x02d7fd5c in
KDevelop::RepositoryManager<KDevelop::ItemRepository<Repositories::StringData,
Repositories::StringRepositoryItemRequest, KDevelop::ReferenceCounting,
true, 0u, 524288u>, true, true>::createRepository (this=0x2e9df64) at
repositories/itemrepository.h:189
#4  0x02d7fe6f in
KDevelop::RepositoryManager<KDevelop::ItemRepository<Repositories::StringData,
Repositories::StringRepositoryItemRequest, KDevelop::ReferenceCounting,
true, 0u, 524288u>, true, true>::operator-> (this=0x2e9df64) at
repositories/itemrepository.h:180
#5  0x02d7f3be in KDevelop::IndexedString::IndexedString (this=0xbfffdea4,
string=@0xbfffdea8) at
/Users/ccpasteur/dev/kdevplatform/language/duchain/indexedstring.cpp:68
#6  0x02d49e20 in KDevelop::Identifier::Identifier (this=0x2e9de34,
id=@0xbfffdefc, start=0, takenRange=0x0) at
/Users/ccpasteur/dev/kdevplatform/language/duchain/identifier.cpp:299
#7  0x02e04559 in __static_initialization_and_destruction_0 ()
#8  0x02e045d4 in global constructors keyed to
_ZN8KDevelop20DUContextDynamicData24m_localDeclarationsMutexE ()
#9  0x8fe12f36 in
__dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
()
#10 0x8fe0e7e3 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#11 0x8fe0e775 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#12 0x8fe0e775 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#13 0x8fe0e8c9 in
__dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE ()
#14 0x8fe04102 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#15 0x8fe07bcf in __dyld__ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_ ()
#16 0x8fe01872 in __dyld__ZN13dyldbootstrap5startEPK11mach_headeriPPKcl ()
#17 0x8fe01037 in __dyld__dyld_start ()

With the 'Bus error' mesage printed.

Any idea where does this come from?

2008/12/23 Cédric PASTEUR <cedric.pasteur.2006 at polytechnique.org>

> Hi,I'm trying to compile KDevelop on Mac OS X.
> I have a problem with DUChain and it's use of dense_hash_map with Key ==
> Qt::HANDLE, which corresponds to a void* on Mac OS X (and an unsigned int on
> Linux).
> But there is no hash<void*> in STL hash_fun.h
>
> The fix I found was to add a template specialization;
>
>  template<>
>
>     struct hash<void*>
>
>     {
>
> size_t
>
> operator()(void* __x) const
>
> { return (unsigned long)__x; }
>
>     };
>
>
> in hash_fun.h
>
>
> Is it the right way to fix this?
>
>
> Best regards
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20081223/5830fabb/attachment.html>


More information about the KDevelop-devel mailing list