Sorry if this section is not the most relevant to my question. I'm using cofestand to run coco files from the command line or Octave. However, after running and saving the file successfully by cofestand, it does not return the handle to the host application (e.g., Octave or cmd). Consequently, the next lines of my code cannot be executed and my program gets stuck there. I'd appreciate it if anyone has experienced the same issue or has a workaround for it.
Solve finished
Solve finished
Saved mysim.fsd
Saved mysim.fsd
SOLVE: OK
"THE CURSER KEEP BLINKING HERE"
cofestand does not return handle to command line
Moderator: jasper
Re: cofestand does not return handle to command line
I am not clear on your problem statement.
Can you first of all, when this happens, check with the task manager, or tasklist, whether COFE.exe and COFEStand.exe are still running at this point?
Secondly, which handle are you referring to? Presumably the STDOUT handle?
Can you first of all, when this happens, check with the task manager, or tasklist, whether COFE.exe and COFEStand.exe are still running at this point?
Secondly, which handle are you referring to? Presumably the STDOUT handle?
Re: cofestand does not return handle to command line
Thank you Jasper for your reply. I guess I didn't explain it well. I mean when I run cofestand on a coco file in cmd, the command prompt (>) is not returned until I press Ctrl+C. This causes issues when I want to run cofestand in a for loop inside MATLAB because each time I'd need to manually close the command prompt window or press ctril+C so the for loop goes to the next increment or the next line of the MATLAB code can be executed. I've added two cmd screenshots that show the issue. The coco file is also attached. I appreciate your time.
- Attachments
-
- cmd after ctrl+C
- cofestand2.PNG (13.1 KiB) Viewed 812 times
-
- cmd
- cofestand.PNG (36.97 KiB) Viewed 812 times
-
- compressors.fsd
- simulation file
- (20.72 KiB) Downloaded 43 times
Re: cofestand does not return handle to command line
I cannot reproduce this. In both PowerShell and cmd the process returns normally:
When this happens, can you check whether COFE.exe is still running? If so, when you close that (task manager) I presume COFEstand returns?
If this is the case, can you try again, now making sure COFE.exe is not running before you start?
When this happens, can you check whether COFE.exe is still running? If so, when you close that (task manager) I presume COFEstand returns?
If this is the case, can you try again, now making sure COFE.exe is not running before you start?
Re: cofestand does not return handle to command line
Thanks for your reply. I checked the task manager. The issue is that upon running cofestand in cmd (COFEstand C:\Users\Guest1\Desktop\compressors.fsd), both cofe.exe and cofestand.exe start to appear in the task manager and neither goes away after the simulation run is competed. The prompt comes back if I end cofe.exe manually from the task manager. So, the question is why is cofe.exe run unintentionally when the user runs cofestand. I'm using cofe 3.9.0.5 x64. Thanks.
Re: cofestand does not return handle to command line
COFE does not run unintentionally - COFEstand is just a small wrapper around COFE; it runs COFE to do the work.
So the problem is that COFE does not exit.
Can you reproduce this without COFEstand? If you just run the document in COFE, and the close COFE, does COFE remain active in the task manager?
So the problem is that COFE does not exit.
Can you reproduce this without COFEstand? If you just run the document in COFE, and the close COFE, does COFE remain active in the task manager?