D6624: do not crash qaccessible by causing a resize in a resize event

Harald Sitter noreply at phabricator.kde.org
Tue Jul 18 08:46:09 UTC 2017


sitter added a comment.


  In https://phabricator.kde.org/D6624#126465, @cfeck wrote:
  
  > > It probably does.
  >
  > Were you able to test? I would prefer the simpler patch. I cannot test it, because my system does not have accessibility enabled.
  
  
  Yes, I did not manage to crash it that way.
  
  As I said though, I do not think making the smallest possible fix is prudent here. While that change would be simpler it would also be more fragile. In resizeEvent() we'd still call a function of which the intention is to change the size of cells, which is meant to result in a layout change and thus potentially causes a resize, bringing us back to the crashing call chain. Making the column update conditional does fix the immediate cause of this **right now**. Conceptually the issue would still be there: we call a method of which the intention is to change the layout from within a resizeEvent handler. Something that is not safe to do with the current qaccessible lifetime management.
  If someone goes ahead and changes the way the models are being used and/or //when// size calculation happens in the future we'll be crashing again.
  
  TLDR I don't find introducing the `if` a future-proof solution. It's only treating the symptom. We'd reinforce a bone with a metal plate whilst ignoring the fact that the patient has a disorder that makes her run in front of cars.
  
  (I do think that introducing that if would be handy eitherway, not as a measure of dealing with the crash though)

REPOSITORY
  R236 KWidgetsAddons

REVISION DETAIL
  https://phabricator.kde.org/D6624

To: sitter, gladhorn
Cc: cfeck, anthonyfieroni, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170718/e2f5e92a/attachment.html>


More information about the Kde-frameworks-devel mailing list