Photonics

Photonics

Topics related to Lumerical and more.

QProcess: Destroyed while process (“fdtd-solutions.exe”) is still running.

    • Zhaoyu Zhang
      Subscriber

      Hi,

      When I use FDTD lumapi to run some optimization algorithms in python, the error "QProcess: Destroyed while process ("fdtd-solutions.exe") is still running" would sporadically pop up and terminate my program altogether. 

      I'm not sure where this error is steming from or what it's specifically related to. Any ideas how to avoid/fix this?

      Thanks.

    • Zhaoyu Zhang
      Subscriber

      Please see above image for the error. The "QProcess: Destroyed while process (“fdtd-solutions.exe”) is still running" error can be seen at the bottom of the image. This error fatally terminates my optimization process while running fdtd via lumapi.

      Any help woule be appreciated!

      • Lito
        Ansys Employee

        @Zhaoyu Zhang,

        Try to run this sample API script (i.e. save as 'lumtest.py'); 

        import lumapi
        fdtd = lumapi.FDTD()
        fdtd.addfdtd()
        fdtd.addring()
        fdtd.addmesh()
        fdtd.save("lumtestpy.fsp")

        from the "CAD > Script file editor" window. With Python Integration showing "Active". (see image) 

        If it works and runs to completion, it will save the file, "lumtestpy.fsp" on your current working directory (cwd). 

    • Zhaoyu Zhang
      Subscriber

      Hi Lito, yes your sample code worked and saved the test file. How is this related to the QProcess error?

      • Lito
        Ansys Employee

        @Zhaoyu Zhang,

        That was to test if our API is working.

        Based on your screenshot your are not running from the CAD > Script file editor window. Try running your ‘lumapi script’ from the CAD as you did with our sample script and see this works.  And vice-versa, run our sample lumapi script on the third party application (shown on your screenshot), to verify if it works outside the CAD. 

        This should verify if the issue is with the API or Lumerical CAD or something else on your settings for the other application or system settings.  

        Looking forward to your feedback. Thank you.  

         

         

        • Zhaoyu Zhang
          Subscriber

          Hi Lito, appreciete the detailed explanations.

          I've tested lumapi in both the CAD and my own python code IDE, and both times it worked just fine. Actually, the QProcess error only occurs sporadically (meaning it occurs randomly and inconsistently). 

          I have  a question: which part of lumerical FDTD uses the QProcess module?

          Best.

    • Lito
      Ansys Employee

      @Zhaoyu Zhang,

      Does the error happen when you run the script in the CAD or only when you run from the other application? QT is used by “lumapi”. Which version of Ansys Optics/FDTD are you using. 

       

      • Zhaoyu Zhang
        Subscriber

        Hi Lito,

        The error only occurs when I run in my python IDE. My version of FDTD is 2021 R1.4. 

        I did some deeper searches on the internet and found that the QProcess error could be connected to the GUI or multi-processes computing. But i'm not sure how that would translate to my problem.  

        Actually, I can think of a possible reason why this error occurs. I'm using a windows software called "clickoff" that detects pop-up windows and automatically clicks buttons on the pop-up window to close it (https://whatsoftware.com/auto-click-annoying-confirmation-buttons-clickoff/).  "clickoff" is used by me to automatically detect and close the "select frequency" window when I run the field and power monitor (DFT monitor) in FDTD, where it would click the "ok" button to close the window (see image below). Do you think the error could have been caused by using the "clickoff" tool? 

         

        • Lito
          Ansys Employee

          QT is used by the API which requires and calls the CAD when run.

          >>>Python API overview – Ansys Optics 

          We do not know how other application affect our software since we do not use thirdparty utilities. But based on your information on what this software does, it might affect our application. You can disable this software before running the API script as this is not require by our tools.

          Or you can hide the CAD/GUI on your lumapi script.  

          >>>Session management – Python API – Ansys Optics 

           

Viewing 3 reply threads
  • The topic ‘QProcess: Destroyed while process (“fdtd-solutions.exe”) is still running.’ is closed to new replies.