Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

fix(designer): avoid touching deleted widgets during init as QtDesigner will segfault

Merged wakonig_k requested to merge fix/designer_segfault into pre_release_v2

Description

Designer randomly segfaults on pre_release. It seems as if this is caused by the _enforce_unique_sibling_name method as it accesses all widgets and thus may also try to access widgets that have been marked for deletion by QtDesigner. However, it appears to be sufficient to move these checks outside of __init__. Here, I achieved this by using a single shot timer. In addition, I'm checking for deleted widgets before trying to access them. However, moving it to a single shot meant that the object is created and potentially returned through rpc before it is even registered. To remedy this, commit 0463b32d introduces a check to ensure that the serialized object is a valid entry in the registry.

While I was at it, I also fixed the TODOs in BECConnector (#475 (closed), #472 (closed))

Related Issues

closes #484 (closed) #475 (closed) #472 (closed)

Additional Comments

Please try to play around with QtDesigner a bit. For me, the segfaults happened when clicking on the plugins. If this MR really solves the problem, we should double-check that we are not accessing other widgets or even all widgets in other __init__ methods.

Definition of Done

  • Documentation is up-to-date.
Edited by wakonig_k

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading