[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Debug plugin load weirdness
From:       Michael Jansen <info () michael-jansen ! biz>
Date:       2009-07-23 21:10:51
Message-ID: 200907232310.51328.info () michael-jansen ! biz
[Download RAW message or body]

Which version of qt do you guys use? I'm on master-stable and i see man 
QGlobalStaticDeleter related crashes. Perhaps something is wrong there.


On Wednesday 22 July 2009 17:03:24 Andreas Pakulat wrote:
> On 22.07.09 16:32:10, Thiago Macieira wrote:
> > Em Quarta-feira 22 Julho 2009, ās 01:54:33, Ramon Zarazua escreveu:
> > > >>I've got a small problem here with a kdevelop plugin (the C++ support
> > > >> in fact). The plugin works just fine when loaded into kdevelop as do
> > > >> all the other plugins we have. Unfortunately it seems that somehow
> > > >> the KComponentData for the plugins factory (created via
> > > >> K_PLUGIN_FACTORY) gets corrupted when loading the plugin from a
> > > >> unit-test.
> > > >>
> > > >>...
> > > >>
> > > >>So somehow the global static pointer is being changed, or there are
> > > >> two different statics allocated somehow (no idea how that can
> > > >> happen). Anybody with an idea?
> > > >
> > > >I have been running it through GDB, and on the last pass What I got is
> > > > that there are two concurrent instances of
> > > >_k_static_KDevCppSupportFactoryfactorycomponentdata, both with
> > > > different addresses. I had a display to the address of the first
> > > > instance when KDevCppSupportFactory::init() was called. Here is a
> > > > part of the output:
> > > >
> > > >188         if (!_k_static_KDevCppSupportFactoryfactorycomponentdata )
> > > >1: x/xg 140737020780840  0x7fffe4216128
> > > ><_ZL51_k_static_KDevCppSupportFactoryfactorycomponentdata>:
> > > >0x000000000278f920
> > > >Value returned is $6 = true
> > > >(gdb) p _k_static_KDevCppSupportFactoryfactorycomponentdata
> > > >$7 = {_q_value = 0x0}
> > > >(gdb) p &_k_static_KDevCppSupportFactoryfactorycomponentdata
> > > >$8 = (QBasicAtomicPointer<KComponentData> *) 0x6ceba0
> > > >(gdb) display /xg 0x6ceba0
> > > >2: x/xg 7138208  0x6ceba0
> > > ><_ZL51_k_static_KDevCppSupportFactoryfactorycomponentdata>:
> > > >0x0000000000000000
> > > >(gdb)
> > > >
> > > >Why would this happen?
> > >
> > > Examining the exectutable with nm I found out that apparently the
> > > second instance is the one hard-linked to the executable:
> > > 00000000006ceba0 b
> > > _ZL51_k_static_KDevCppSupportFactoryfactorycomponentdata
> > >
> > > So I went examining the libraries that might have a duplicate of this
> > > variable, but none of them have it, where could it be coming from?
> >
> > You probably have a K_GLOBAL_STATIC in a .h file.
> >
> > They are *static*. They can't be in .h.
>
> There is one in a header class, but its totally unrelated to the factory
> here. The factory being created here is only referenced once in a .cpp file
> via K_EXPORT_PLUGIN. So it doesn't seem like thats the problem.
>
> Andreas
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic