KDE/kdevplatform/shell
Andreas Pakulat
apaku at gmx.de
Wed May 27 16:51:08 UTC 2009
On 27.05.09 18:42:52, David Nolden wrote:
> Am Mittwoch 27 Mai 2009 18:00:06 schrieb Andreas Pakulat:
> > On 27.05.09 15:47:05, David Nolden wrote:
> > > SVN commit 973668 by zwabel:
> > >
> > > Never unload language-supports. That leads to a certain crash, and
> > > happened with the cmake support when all cmake projects were closed.
> >
> > Can you explain why this causes the crash? Why isn't the plugin reloaded
> > when its needed. I'm completely against special casing plugins this way, so
> > we need to find out what exactly happened and fix the real problem.
> I think the main problem is the language controller. It caches languages, and
> a lot of information about them. When deleting a language support, the
> language support would have to unregister its language from the language
> controller and delete it.
>
> But if that was implemented, there would still be a big thread safety issue,
> see for example DUChainUtils::standardContextForUrl, which may be called from
> within any thread.
>
> Maybe this might be fixed with some additional safety using the duchain lock.
>
> But there is also a general problem with unloading language supports: Language
> supports are often requested from within a background thread, and the
> background thread can not load the plugin if it isn't loaded yet.
>
> Thus for now, I think it's best to just prevent language-supports from being
> unloaded, as that causes pain in several areas.
>
> In long-term, background-threads need to be enabled to load language supports
> as well.
Can you please add this information into a new bugreport and add a todo to
the plugincontroller.cpp lines referring to the bugreport.
Andreas
--
You will be held hostage by a radical group.
More information about the KDevelop-devel
mailing list