Open yuanmich2 opened 1 week ago
The LoggingSubprocess
does make available an optional encoding
argument that allows consumers to specify the output encoding of a given application. I think if you add encoding="utf-16"
in the 3dsMaxAdaptor when creating the LoggingSubprocess
for 3dsMax here: https://github.com/aws-deadline/deadline-cloud-for-3ds-max/blob/59d1716000dda7fbf41a3b81888ded550f04a780/src/deadline/max_adaptor/MaxAdaptor/adaptor.py#L268C13-L268C41 then you may have success with the regex patterns which weren't previously working.
Please let me know if this works for you!
Describe the bug
When the stdout of a program is in UTF-16, the app handler interprets the string as UTF-8 but with null characters (\x00) between each character.
This makes writing regex patterns for the regex handlers difficult because you need to account for all the null characters.
Expected Behaviour
UTF-16 strings should be properly parsed so there are no null characters
Current Behaviour
The app handler puts \x00 between each character
Reproduction Steps
The 3ds Max Adaptor (https://github.com/aws-deadline/deadline-cloud-for-3ds-max) can be modified to use 3dsmaxbatch by changing the call command in adaptor.py to this:
After doing so, all the regex patterns used by the regex handlers will fail because they don't account for null characters. Regex patterns can be found here: https://github.com/aws-deadline/deadline-cloud-for-3ds-max/blob/59d1716000dda7fbf41a3b81888ded550f04a780/src/deadline/max_adaptor/MaxAdaptor/adaptor.py#L173-L175
Environment
At minimum:
python3 --version
: 3.10Please share other details about your environment that you think might be relevant to reproducing the bug. I first encountered the bug while trying to build a 3ds max batch CMF worker