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

Any QScriptProgram passed and evaluated in the function causes segmentation fault in destructor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • 4.7.2
    • 4.7.0
    • Qt Script
    • None
    • Ubuntu 10.10 32bit;
      Qt 4.7.0 OpenSource 32bit;
      g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5;
      QtCreator 2.0.1
      Notebook Samsung Q210-fs03.

      If QScriptEngine that evaluated a QScriptProgram, was deleted, it seems that QScriptProgram does not notice that.
      May be it is supposed to behave this way, but documentation says QScriptProgram is created to be evaluated several times, nothing said about that evaluator should be a single object.
      May be bug is here

      QScriptProgramPrivate::~QScriptProgramPrivate()
      {
      if (engine)

      { QScript::APIShim shim(engine); _executable.clear(); }

      }

      A simple bug example in attachment.

        1. main.cpp
          0.6 kB
          Nikita
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kenthans Kent Hansen (Inactive)
            nikita Nikita
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes