Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12753

Crash of DiagramScene example

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.0
    • 4.6.2, 4.7.0
    • Examples and Demos
    • None
    • Windows XP SP3
    • 5dedcd3c4cac993949295d109804a8f7cc3a5b0a

    Description

      1- create 2 Conditional items
      2- create an arrow to linked them
      3- select FIRST the arrow and then Conditional items (holding CTRL)
      4- delete them
      5- the crash happens (dos not appear every time) try again!

      remarks:
      It's easier to reproduce the crash with 3 items connected each other like a circle. But you have to select the arrows (first?)

      Actually, in MainWindow::deleteItem() (mainwindow.cpp line 125 Qt-4.7.0-beta2) you can delete an arrow without to call removeArrow on the both DiagramArrows connected. If you only remove the arrow, DiagramItem(s) still have pointer on an arrow that is not anymore in the scene. I though that it was a memory leak in MainWindow::deleteItem(), because items are removed from scene but nobody delete them... but by this way the arrow pointers of DiagramItems still point on a "almost valid" arrow (not anymore on the scene but happily still in memory). Maybe the best way to correct this problem is to call DiagramItem::removeArrow in the destructor of Arrow(). It does not explain why DiagramScene crashes but it can be a good start.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            sylv Sylv
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes