Review Request 127795: [DataEngine] Fix memory leak and possible crash + detailed test
David Edmundson
david at davidedmundson.co.uk
Mon May 2 17:01:50 UTC 2016
> On May 2, 2016, 4:33 p.m., David Edmundson wrote:
> > src/plasma/dataengine.cpp, line 573
> > <https://git.reviewboard.kde.org/r/127795/diff/3/?file=462320#file462320line573>
> >
> > Deleting an object auotmatically disconnects it
> >
> > This seems like a terrible thing to do.
>
> Anthony Fieroni wrote:
> It's written in that style. Leak is a line below :)
What is wrtten in that style?
> On May 2, 2016, 4:33 p.m., David Edmundson wrote:
> > src/plasma/dataengine.cpp, line 415
> > <https://git.reviewboard.kde.org/r/127795/diff/3/?file=462320#file462320line415>
> >
> > This (and the following changes) accomplish absolutely nothing!
> >
> > previously. It started on -1, went down on refs, went up on refs.
> > The only other usage is isUsed() which compares it to zero.
> >
> > You've just switched the logic from negative to positive.
> >
> > Whilst I agree yours makes far more sense, given you haven't mentioned it, it seem like you're just changing things at random without understanding it.
>
> Anthony Fieroni wrote:
> I change it to 0, at first, but i saw, after that, loading engine can be make it without manager to know. For me it's a broken design. I can revert manager changes, at last.
How is it a broken design? It's *exactly* the same just with negative numbers.
> On May 2, 2016, 4:33 p.m., David Edmundson wrote:
> > src/plasma/datacontainer.cpp, line 262
> > <https://git.reviewboard.kde.org/r/127795/diff/3/?file=462319#file462319line262>
> >
> > why check storage is not null?
> >
> > if storageCount > 1 and storage is null we have a huge bug elsewhere.
>
> Anthony Fieroni wrote:
> So this *can* dangerous, if job emit twice. It's complex.
If a job emits what twice?
> On May 2, 2016, 4:33 p.m., David Edmundson wrote:
> > src/plasma/dataengine.cpp, line 419
> > <https://git.reviewboard.kde.org/r/127795/diff/3/?file=462320#file462320line419>
> >
> > Why?
>
> Anthony Fieroni wrote:
> Because it's depend of KPluginInfo, line 425, when KPluginInfo does not know that plugin, this is something *really* not valid, about me.
OK cool. These two lines make sense then.
+1
Though this to the description / commit message
"If the DataEngine constructor is called with an invalid KPluginInfo object, make sure valid is set to false."
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127795/#review95092
-----------------------------------------------------------
On May 2, 2016, 2:20 p.m., Anthony Fieroni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127795/
> -----------------------------------------------------------
>
> (Updated May 2, 2016, 2:20 p.m.)
>
>
> Review request for KDE Frameworks and Marco Martin.
>
>
> Repository: plasma-framework
>
>
> Description
> -------
>
> ^^
>
>
> Diffs
> -----
>
> autotests/pluginloadertest.h 61fc963
> autotests/pluginloadertest.cpp 4f96780
> src/plasma/datacontainer.cpp ee067db
> src/plasma/dataengine.cpp f942926
> src/plasma/private/dataenginemanager.cpp 08e42fb
>
> Diff: https://git.reviewboard.kde.org/r/127795/diff/
>
>
> Testing
> -------
>
> Test pass.
>
>
> Thanks,
>
> Anthony Fieroni
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160502/d7870309/attachment.html>
More information about the Kde-frameworks-devel
mailing list