Review Request 120152: Check for null session before using it (see description)

Sergey Kalinichev kalinichev.so.0 at gmail.com
Fri Sep 12 13:55:35 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120152/#review66346
-----------------------------------------------------------


>Is it valid for IDefinesAndIncludesManager::manager() to Q_ASSERT that it got a plugin? 

I think yes, it's pretty much valid, as it uses X-KDevelop-LoadMode=AlwaysOn

- Sergey Kalinichev


On Sept. 12, 2014, 9:19 a.m., Olivier Jean de Gaalon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120152/
> -----------------------------------------------------------
> 
> (Updated Sept. 12, 2014, 9:19 a.m.)
> 
> 
> Review request for KDevelop, Aleix Pol Gonzalez, Milian Wolff, and Sergey Kalinichev.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> Currently TestItemRepositoryRegistryDeferredDeletion is crashing. This is because it creates and deletes the session, then in TestCore::shutdown an event loop is kicked off (just in case!) which loads some plugins (on shutdown!), and checks the active session to see if they are enabled.
> 
> Question #1: This is one fix, but it's not clear that this is even a valid situation (loading plugins after the session has died). Possibly the test should be fixed instead.
> 
> With this fix, the crash is deferred to KDevelop, where IDefinesAndIncludesManager::manager() Q_ASSERTS that it got a plugin, and then everywhere IDefinesAndIncludesManager::manager() is used, it's used without checking the pointer.
> 
> Question #2: Is it valid for IDefinesAndIncludesManager::manager() to Q_ASSERT that it got a plugin? There are a couple ways the plugin could be disabled, which would trigger this assert or just crash later in release mode.
> 
> After ensuring that the IDefinesAndIncludesManager::manager() pointer is checked, the test completes successfully.
> 
> 
> Diffs
> -----
> 
>   shell/plugincontroller.cpp 1acb54b 
> 
> Diff: https://git.reviewboard.kde.org/r/120152/diff/
> 
> 
> Testing
> -------
> 
> TestItemRepositoryRegistryDeferredDeletion
> 
> 
> Thanks,
> 
> Olivier Jean de Gaalon
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140912/f6521c0c/attachment.html>


More information about the KDevelop-devel mailing list