Hi<br><br>The plugin fails due to the two lines below in the constructor of GitPlugin (and the fact that git is not installed on the host machine) - correct?:<br><br>    DVcsJob* versionJob = new DVcsJob(QDir::tempPath(), this, KDevelop::OutputJob::Silent);<br>
    *versionJob << "git" << "--version";<br>
<br>As far as I can tell the output of the versionJob is only used in the <br><br>status(const KUrl::List& localLocations, KDevelop::IBasicVersionControl::RecursionMode recursion)<br><br>function.<br><br>Why not wait with creating a versionJob untill the status function is called? (And then of course only create and parse it the first time).<br>
<br>That should solve the problem described in <a href="https://bugs.kde.org/show_bug.cgi?id=257650">https://bugs.kde.org/show_bug.cgi?id=257650</a><br><br>Just my 2 cents:<br>
<br>
Regards <br><br>Morten<br><br><br><div class="gmail_quote">2010/12/20 Aleix Pol <span dir="ltr"><<a href="mailto:aleixpol@kde.org" target="_blank">aleixpol@kde.org</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><div></div><div><div class="gmail_quote">On Mon, Dec 20, 2010 at 12:51 PM, Dmitry Risenberg <span dir="ltr"><<a href="mailto:dmitry.risenberg@gmail.com" target="_blank">dmitry.risenberg@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
2010/12/20 Aleix Pol <<a href="mailto:aleixpol@kde.org" target="_blank">aleixpol@kde.org</a>>:<br>
<div>> Maybe you could try to explore why is this crashing? I don't like to change<br>
> the plugin interface to provide errors, we could end up with code checking<br>
> if plugins are wrong all over the place.<br>
> Aleix<br>
<br>
</div>The reason is that the plugin object returned from<br>
KServiceTypeTrader::createInstanceFromQuery (plugincontroller.cpp:435)<br>
is used by some later initialization code, particularly in<br>
ProjectPrivate::loadVersionControlPlugin, and this code does not know<br>
that the plugin has in fact been unloaded. Unloading via<br>
PluginController::unloadPlugin deletes the plugin object, so accessing<br>
it later is accessing freed memory.<br>
To sum up, the plugin itself cannot know whether it is safe to unload<br>
at a given moment, so it is up to PluginController to decide, which,<br>
in turn, has to check for errors. In fact it seems strange that there<br>
is no error reporting mechanism, and it is just assumed that the<br>
plugin always loads correctly.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div>Dmitry Risenberg<br>
<br>
--<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org" target="_blank">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
</div></div></blockquote></div><br></div></div><div>On the other hand, plugins can be unloaded by the user and we have to be prepared for that.</div><div><br></div><font color="#888888"><div>Aleix</div>
</font><br>--<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org" target="_blank">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>- When the split is pulled, mr. Grenade is no longer our friend<br>