ASSERT: "!relative.contains("/")" in file /home/milian/projects/kde4/kdevelop/projectmanagers/cmake/cmakemanager.cpp, line 1038

Matt Rogers mattr at kde.org
Wed Oct 13 13:36:37 UTC 2010


On Wed, Oct 13, 2010 at 6:36 AM, Milian Wolff <mail at milianw.de> wrote:
> On Wednesday 13 October 2010 13:19:41 Milian Wolff wrote:
>> On Wednesday 13 October 2010 13:12:49 Milian Wolff wrote:
>> > On Wednesday 13 October 2010 13:07:09 Milian Wolff wrote:
>> > > hey aleix,
>> > >
>> > > just triggered this assert by creating a new folder in cmake:
>> > >
>> > > ASSERT: "!relative.contains("/")" in file
>> > > /home/milian/projects/kde4/kdevelop/projectmanagers/cmake/cmakemanager.
>> > > cp p, line 1038
>> > >
>> > > since you changed this in 4.1 really make sure to fix this! It would be
>> > > horrible to ship final with this!
>> >
>> > ignore the corrupted things, I can reliably trigger this with master by
>> > creating a folder in some subfolder:
>> >
>> > kdevelop(30884)/kdevelop (cmake support debug) CMakeManager::addFolder:
>> > Adding folder  KUrl("file:///home/development/projects/testbar/icons")
>> > to KUrl("file:///home/development/projects/testbar/icons/test")  as
>> > "icons/test"
>>
>> the folder url does not contain the trailing slash but that is required by
>> KUrl::relativeUrl...
>>
>> how should we fix this?
>
> for the record: I've now enforced trailing slashes in FolderItems (setUrl
> overload, does not break bc or sc since FileItem already overloaded it).
>
> This way we can safely do KUrl::relativeUrl(folder->url()) without falling in
> this trap again (I bet there are other places where this happened).
>
> bye

Sounds like a good candidate for a unit test to me. :)
--
Matt




More information about the KDevelop-devel mailing list