Tracking a CMakeProjectManager bug

Aleix Pol aleixpol at kde.org
Sun Apr 18 20:47:13 UTC 2010


On Sun, Apr 18, 2010 at 9:48 PM, Victor Vicente de Carvalho <
victor.v.carvalho at gmail.com> wrote:

>
>
> 2010/4/18 Aleix Pol <aleixpol at kde.org>
>
> On Sun, Apr 18, 2010 at 6:43 PM, Aleix Pol <aleixpol at kde.org> wrote:
>>
>>> On Sun, Apr 18, 2010 at 5:41 PM, Victor Vicente de Carvalho <
>>> victor.v.carvalho at gmail.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I've been facing a bug on CMakeProjectManager, and been able to trace it
>>>> at some point, but haven't figured how to solve it:
>>>>
>>>> When I try to rename a file inside a subfolder, I'm actually getting
>>>> more than one target for renaming, and thus kdevelop is crashing on an
>>>> assertion:
>>>>
>>>> in file: projectmanagers/cmake/cmakemanager.cpp:1295
>>>> on method
>>>> bool CMakeManager::renameFile(ProjectFileItem* it, const KUrl& newUrl)
>>>>
>>>> when i try to rename a file there, the folowing line:
>>>>
>>>>      QList<ProjectFileItem*>
>>>> files=it->project()->filesForUrl(it->url());
>>>>
>>>> is returning more than one file with the same name, and thus giving me 2
>>>> targets, and I don't have two files named the same.
>>>> Then when this is called:
>>>>
>>>> in file: projectmanagers/cmake/cmakemanager.cpp:1331
>>>>
>>>>     e.addDocuments(IndexedString(lists), IndexedString(lists));
>>>>
>>>> the assertion in file  language/codegen/applychangeswidget.cpp:129
>>>> on method
>>>> void ApplyChangesWidget::addDocuments(const IndexedString & original,
>>>> const IndexedString & modified)
>>>>
>>>>     Q_ASSERT(files.first != original);
>>>>
>>>> is failing trying to insert the file CMakeLists.txt two times.
>>>>
>>>> Why is "CMakeLists.txt" is being added every time on renameFile?
>>>>
>>>>
>>>> Hope that this can be understandable :D
>>>>
>>>> --
>>>>
>>>> KDevelop-devel mailing list
>>>> KDevelop-devel at kdevelop.org
>>>> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>>>>
>>>>
>>> Let me take a look at it. Is there any bug filled for that problem?
>>>
>>> Thanks,
>>> Aleix
>>>
>>
>> Fixed.
>> Anything else?
>>
>>
> Woah :D
>
> Care to tell what the problem was??
>
> Thanks!
>
>
>
>> Unlocked and loaded :D
>>
>> --
>> KDevelop-devel mailing list
>> KDevelop-devel at kdevelop.org
>> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>>
>>
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
>
When navigating through all the targets that need the file, we add the
CMakeLists.txt file to the applychangeswidget. The problem was that since
there were 2 targets using the same file, when the file was added for the
second time instead of pointing to the already existing it just crashed.

:),
Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100418/ec754767/attachment.html>


More information about the KDevelop-devel mailing list