idcrook
Posts: 9
Joined: Wed Dec 12, 2018 5:58 pm

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

It's really difficult to figure out what is failing if STDOUT is not available from the post-processing script.

Simple file-based debugging has already confirmed script on v4 works to completion, but exact same thing in v5 fails to complete.

Here's a github issue that tracks this:

Simplify3D: Postprocessing script not executing on S3D v5 where it worked on v4 · Issue #4 · idcrook/s3d-thumbnail-generator-macos)
idcrook
Posts: 9
Joined: Wed Dec 12, 2018 5:58 pm

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

S3D-Jason wrote: Mon Jan 30, 2023 9:33 am It may help to review this recent thread:
viewtopic.php?p=63885#p63885

It gives an example showing how to prove the scripts run correctly. We have already tested that process on several operating systems and it worked on each one, so it should be a good place to start. Of course, if you are using a custom script you have to make sure it doesn't error out earlier on in the script, but it should at least explain the basics and give you a sample script to show V5 is working correctly.
I guess great minds think alike. This had already been done and results shared above.

I'm wondering if STDOUT (and STDERR) from post-processing script step could be available on macOS?
idcrook
Posts: 9
Joined: Wed Dec 12, 2018 5:58 pm

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

I found a way for the bash script itself to capture its own output. This is basically what I was looking for to help debug.

Code: Select all

    # capture stdout+stderr from this script running
    # https://stackoverflow.com/a/314678
    exectrace="${INSTALL_DIR}exectrace"
    exec > "$exectrace"
    exec 2>&1
It should be easier to narrow down source of the problem now.

Here's the first results (which suggests what we are seeing may be security / permissions related):

Code: Select all

$ cat exectrace
++ /opt/homebrew/bin/GetWindowID Simplify3D --list
++ grep Simplify3D
+ winidinfo=
+ '[' 1 -eq 1 ']'
+ echo 'Could not find Simplify3D window. Exiting with error'
Could not find Simplify3D window. Exiting with error
+ exit 1
idcrook
Posts: 9
Joined: Wed Dec 12, 2018 5:58 pm

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

I've determined one issue. In V5, identifying windows belonging to app on macOS from post-processing script run returns "(null)".
But on command line and in V4 execution, it returns "AppName licensed to..."
It is using utility https://github.com/smokris/GetWindowID

I guess a possible working heuristic would be instead to use the numerically lowest id=?

running V5

Code: Select all

cat exectrace
+ /opt/homebrew/bin/GetWindowID Simplify3D --list
"(null)" size=0x0 id=731
"(null)" size=1200x828 id=730
++ /opt/homebrew/bin/GetWindowID Simplify3D --list
++ grep Simplify3D
+ winidinfo=
+ '[' 1 -eq 1 ']'
+ echo 'Could not find Simplify3D window. Exiting with error'
Could not find Simplify3D window. Exiting with error
+ exit 1
working run

Code: Select all

/opt/homebrew/bin/GetWindowID Simplify3D --list
"(null)" size=0x0 id=651
"Simplify3D (Licensed to xxxx xxxx)" size=1200x828 id=650
RobertJones
Posts: 1
Joined: Tue Jan 31, 2023 12:19 pm

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

It sounds like you are experiencing a bug with the postprocessing script in S3D v5.0.1. To resolve this issue, you could try the following steps:

Check if there are any updates available for S3D that may resolve the bug.
Try restarting your computer and rerunning the script to see if it resolves the issue.
Check the script for any syntax errors or compatibility issues with the current version of S3D.
If the problem persists, try reaching out to the S3D support team for further assistance.
Please provide more information about your setup, the script you are trying to run, and any error messages you may be encountering to help the community provide a more specific solution.
idcrook
Posts: 9
Joined: Wed Dec 12, 2018 5:58 pm

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

Using the method that captures self STDOUT and STDERR of bash script I was able to determine what was causing the problem with V5.

It appears to be a macOS system permissions issue with respect to Screen Recordings permissions and its interaction with GetWindowID utility. That is why the "(null)" was being listed for Window title instead of Simplify3D ...

Deleting the Simplify3D application from the Screen Recording pane (and then having normal user dialog flow have it get added back) solved the problem I was seeing for me with Simplify3D V5 and this post-processing script.
S3D-Jason
Posts: 1383
Joined: Sun May 31, 2015 6:01 am

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

Awesome! And nice tips on how to capture STDOUT and STDERR.

Just to confirm, this issue is now resolved correct? The problem was just that your script was trying to take screenshots which require special permission grants in new versions of Mac OS. This was the reason why the script was failing to run.

Let us know if that sounds correct.
JeffSEdge16
Posts: 1
Joined: Wed Feb 01, 2023 2:23 pm

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

I too seem to be having an issue with a Post Processing Script not being executed in v5.0.1 that did work in v4. I am trying to run the ArcWelder.exe to assist in making smoother and more round prints. I have imported an stl file, sliced it and then reviewed the gcode in notepad. The first line in the code indicates that it was generated by Simplify3D(R) Version 5.0.1. In the past I have also seen a statement that it was also processed by ArcWelder but I no longer see that statement. Any help or assistance would be greatly appreciated. Thank you.
S3D-Jason
Posts: 1383
Joined: Sun May 31, 2015 6:01 am

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

I would suggest making a new thread if you're talking about a totally different script/tool. The solution for this one is unlikely to work for you unless you are taking screenshots in the plugin.
bolsoncerrado
Posts: 177
Joined: Tue Mar 17, 2015 10:55 am

Re: [BUG] Postprocessing script not being executed on S3D v5.0.1

Ended up being a permissions issue on Mac regarding screen capture. This can be marked as fixed.

Return to “Troubleshooting and Bug Reports”