Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
OpenWalnut Core OpenWalnut Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 86
    • Issues 86
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenWalnut
  • OpenWalnut CoreOpenWalnut Core
  • Issues
  • #144

Closed
Open
Created Apr 15, 2013 by Sebastian Volke@volkeOwner

-RM-279-MR-Segmentation Fault caused by WQtCustomDockWidget with Multi-Threaded-Views

If you remove a module from the module-tree which uses a WQtCustomDockWidget, then there sometimes is an segmentation fault. I think the reason for this is a combination of multiple-inheritance and multithreading. The WQtCustomDockWidget inherits from WCustomWidget and WQtGLDockWidget. In the constructor it adds a WCustomWidget::WindowHandler to the event-queue stored in the WQtGLDockWidget. The problem is that after deletion of the WCustomWidget-part, there is an invalid pointer in the still existing WindowHandler, which gets deleted in the WQtGLDockWidget-part. Due to multithreading, there could be an update-traversal in between these deletions and therefore the invalid pointer could cause a segmentation-fault.

Reproducing: I reproduce this bug by simply adding and removing the same module again and again.

Possible solution: Invalidate (set NULL) the pointer stored in the WCustomWidget::WindowHandler in the destructor of the WQtCustomDockWidget. Then check this case in the WCustomWidget::WindowHandler::handle-function instead of using the pointer to the WCustomWidget. This solutions requires a setter for this pointer in the WCustomWidget::WindowHandler and a reference of the WindowHandler stored in the WQtCustomDockWidget.

(from redmine: created on 2013-04-15, closed on 2014-03-04)

Assignee
Assign to
OpenWalnut 1.4
Milestone
OpenWalnut 1.4
Assign milestone
Time tracking