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

QProcess crash running PS1 script

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.15.0 RC2
    • Core: Threads
    • None
    • Windows

    Description

      Hello everyone,

      I need to run a PowerShell script via a QProcess. The script is correct and its output is in JSON format even when an error occours. I wrote an example project to try that but It crashes in QProcess::start().

      The script has 4 sections. If I eliminate section 2 or section 3 to short the script the execution succedes. I also tried running longer scripts and they worked, hence the script length is not the problem.

      In the example project I tried two way of running the script. Mode 1 runs the script from the main thread whereas mode 2 runs the script from a worker thread but the results are the same.
      Run mode can be selected in MainQ::MainQ().

      The script is ComputersAndUsers.ps1 but has been minified and inserted in the source code as macro. In MainQ.cpp there are several macro COMPUTERSANDUSERS_PS1* used for testing purposes.

       

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            elvisthepelvis Alvise Bendandi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes