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

QScriptDebugger crash when attached engine is deleted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.0.0
    • 4.7.4
    • Qt Script
    • None
    • 0a4e802f182e6e4b3c54cafa141c8d07ec7621f6

    Description

      When a QScriptEngineDebugger is attached to an QScriptEngine, which is then deleted at some point, the debugger window will crash on close.

      attached is a simple program to reproduce this issue.

      here is the valgrind backtrace:
      ==18533== Invalid read of size 8
      ==18533== at 0x5359832: QScopedPointer<QScriptEngineAgentPrivate, QScopedPointerDeleter<QScriptEngineAgentPrivate> >::data() const (qscopedpointer.h:135)
      ==18533== by 0x535FAED: QScopedPointer<QScriptEngineAgentPrivate, QScopedPointerDeleter<QScriptEngineAgentPrivate> >::pointer qGetPtrHelper<QScopedPointer<QScriptEngineAgentPrivate, QScopedPointerDeleter<QScriptEngineAgentPrivate> > >(QScopedPointer<QScriptEngineAgentPrivate, QScopedPointerDeleter<QScriptEngineAgentPrivate> > const&) (qglobal.h:2341)
      ==18533== by 0x535FB0B: QScriptEngineAgent::d_func() const (qscriptengineagent.h:83)
      ==18533== by 0x535FAA5: QScriptEngineAgent::engine() const (qscriptengineagent.cpp:506)
      ==18533== by 0x4E6BD49: QScriptDebuggerBackendPrivate::postEvent(QEvent*) (qscriptdebuggerbackend.cpp:157)
      ==18533== by 0x4E7B4D5: QScriptEngineDebuggerBackend::processCommand(int, QScriptDebuggerCommand const&) (qscriptenginedebuggerfrontend.cpp:204)
      ==18533== by 0x4E7BBDB: QScriptEngineDebuggerFrontend::processCommand(int, QScriptDebuggerCommand const&) (qscriptenginedebuggerfrontend.cpp:332)
      ==18533== by 0x4E793C3: QScriptDebuggerFrontendPrivate::processCommands() (qscriptdebuggerfrontend.cpp:134)
      ==18533== by 0x4E7932B: QScriptDebuggerFrontendPrivate::event(QEvent*) (qscriptdebuggerfrontend.cpp:122)
      ==18533== by 0x4E7B8FE: QScriptEngineDebuggerFrontendPrivate::event(QEvent*) (qscriptenginedebuggerfrontend.cpp:275)
      ==18533== by 0x4E79033: QScriptDebuggerFrontendEventReceiver::event(QEvent*) (qscriptdebuggerfrontend.cpp:89)
      ==18533== by 0x58C89FB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4481)
      ==18533== Address 0x8 is not stack'd, malloc'd or (recently) free'd

      Attachments

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

        Activity

          People

            kenthans Kent Hansen (Inactive)
            milianw Milian Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes