Review Request 124514: Don't crash on Q_ASSERT(!jobs.contains(nullptr)) if cancelling the builder config dialog

Friedrich W. H. Kossebau kossebau at kde.org
Thu Jul 30 20:13:58 UTC 2015



> On Juli 28, 2015, 5:34 nachm., Milian Wolff wrote:
> > +1, but please wait for aleix to confirm this is the proper fix
> 
> Milian Wolff wrote:
>     how did you reproduce this btw? can we add a unit test?

How to reproduce (in debug build, to enable assert):
1. Project > Open/import project
2. Go to a dir of a cmake-based project not yet opened (so without configuration especially for build dir), choose its CMakeLists.txt file.
3. Select CMake project management in the dialog, click "Finish".
4. In the Build dir config dialog click "Cancel"
5. *Boom*


- Friedrich W. H.


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


On Juli 29, 2015, 2:11 nachm., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124514/
> -----------------------------------------------------------
> 
> (Updated Juli 29, 2015, 2:11 nachm.)
> 
> 
> Review request for KDevelop and Aleix Pol Gonzalez.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> Seems `IProjectBuilder::build(ProjectBaseItem *item)` does not require that a job is returned, at least `CMakeBuilder` feels free to just return `0`, e.g. if the user cancels the dialog.
> 
> Thus `CMakeManager::createImportJob(ProjectFolderItem* item)` better deals with that, and only adds the result to the call of that method to jobs if it really is a job. Not only because `Q_ASSERT(!jobs.contains(nullptr));` a few lines later will complain badly to anyone running a debug build... ;)
> 
> No idea if `KDevelop::AbstractFileManagerPlugin::createImportJob()` should get the same handling, not investigated, only ran in the issue handled here.
> 
> 
> Diffs
> -----
> 
>   projectmanagers/cmake/cmakemanager.cpp 2b18fb5 
> 
> Diff: https://git.reviewboard.kde.org/r/124514/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

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


More information about the KDevelop-devel mailing list