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

Accessing destroyed value in a method connected to a Signal results in a crash.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.7.0 FF, 6.7
    • dev
    • QML: Compiler
    • None
    • Linux/X11
    • c1320e7a3 (dev)

    Description

      While attempting to reproduce QTBUG-29676 I ran into the issue. Scenario is quite similar to what's being described in the aforementioned bug. Roughly:

      1. An Object A has a field F and a method M accessing that field F
      2. M is being connected to the signal S
      3. A is being destroyed
      4. Signal S is being emitted -> M is being called trying to access F (which is null)

      Here I am attaching a reproducible crash setup. (After clicking on "Say hello" the app crashes)

      There is no crash when Cachegen is disabled though.

      Attachments

        1. repro.zip
          2 kB
          Dmitrii Akshintsev

        Issue Links

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

          Activity

            People

              dima.a Dmitrii Akshintsev
              dima.a Dmitrii Akshintsev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes