DevHeads.net

Review Request: remove an assert

Review request for kdelibs.

Description
I've suffered this assert starting kdevelop.
The assert and the comment are no longer valid, as the rootDir can be set also calling rootDir, not only setRootDir.

Diffs
kdecore/io/karchive.cpp 43539e3

Diff: <a href="http://git.reviewboard.kde.org/r/107211/diff/" title="http://git.reviewboard.kde.org/r/107211/diff/">http://git.reviewboard.kde.org/r/107211/diff/</a>

Testing
avoid an unnecesary debug crash.

Thanks,

Jaime Torres Amate

Comments

Re: Review Request: remove an assert

By david at 11/06/2012 - 02:46

The responsibility of deleting d->rootDir seems to lie within KArchive. Therefore by setting the rootDir twice either implicitly or explicitly (which this assert is designed to avoid) you risk leaking the first KArchiveDirectory object.

I think you need something more involved than just removing the checks.

- David Edmundson

On Nov. 5, 2012, 2:47 p.m., Jaime Torres Amate wrote:

Re: Review Request: remove an assert

By Jaime Torres Amate at 11/06/2012 - 05:08

The problem comes from ktar.cpp, line 472 after finding a "." directory entry in a .tar file.
For example, the kdevelop ruby templates at $KDE_INSTALL_DIR/share/apps/kdevappwizard/templates/kderubyapp.tar.bz2

- Jaime Torres

On Nov. 5, 2012, 2:47 p.m., Jaime Torres Amate wrote:

Re: Review Request: remove an assert

By Andras Mantia at 11/10/2012 - 07:37

On Tuesday, November 06, 2012 09:08:36 AM Jaime Torres Amate wrote:
The problem is in KTar and should be fixed there. The bug is reported already:
<a href="https://bugs.kde.org/show_bug.cgi?id=309463" title="https://bugs.kde.org/show_bug.cgi?id=309463">https://bugs.kde.org/show_bug.cgi?id=309463</a>

FYI, the assert is not hit by final users "just" by those using developer build
of kdelibs.

Andras