Fix BUG 374894 - KDevelop crashes when clicking on QuickOpen
ClosedPublic

Authored by antonanikin on Feb 13 2017, 3:09 PM.

Details

Summary

The problem was in uninitialized value returned by ResultCache::cachedResult() which is called from ProjectItemDataProvider::itemCount() and ProjectItemDataProvider::unfilteredItemCount() methods.

The crash happens only if uninitialized value is sufficiently big and ResultCache::markDirty() was not called before.

BUG: 374894

Test Plan

Tested on master branch

Diff Detail

Repository
R33 KDevPlatform
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
antonanikin retitled this revision from to Fix BUG 374894 - KDevelop crashes when clicking on QuickOpen.
antonanikin updated this object.
antonanikin edited the test plan for this revision. (Show Details)
antonanikin added reviewers: KDevelop, kfunk.
antonanikin added a subscriber: kdevelop-devel.
antonanikin updated this object.Feb 13 2017, 3:17 PM
brauch added a subscriber: brauch.Feb 13 2017, 3:50 PM

Why is it not the proper fix to initialize m_dirty to true instead?

kfunk edited edge metadata.Feb 13 2017, 5:08 PM

Cough, what a stupid fault from my side. Sorry. :\

kfunk added a comment.Feb 13 2017, 5:08 PM
In D4598#85981, @brauch wrote:

Why is it not the proper fix to initialize m_dirty to true instead?

+1

kfunk requested changes to this revision.Feb 13 2017, 5:08 PM
kfunk edited edge metadata.
This revision now requires changes to proceed.Feb 13 2017, 5:08 PM
kfunk added a comment.EditedFeb 13 2017, 5:09 PM

Also, this fixes a reported bug, doesn't it? Please link it in the commit message.

antonanikin edited edge metadata.
  • Code simplify
antonanikin edited edge metadata.
In D4598#86025, @kfunk wrote:

Cough, what a stupid fault from my side. Sorry. :\

No problems. A good point was that I practiced my debugging skills :)

kfunk accepted this revision.Feb 14 2017, 7:54 AM
kfunk edited edge metadata.
This revision is now accepted and ready to land.Feb 14 2017, 7:54 AM
This revision was automatically updated to reflect the committed changes.