justinfx / MayaSublime

Send selected Python and MEL code snippets from SublimeText to Maya via commandPort
MIT License
149 stars 38 forks source link

Crash #41

Closed JokerMartini closed 2 years ago

JokerMartini commented 2 years ago

So the updates you pushed yesterday fixed the issues with Maya. however I noticed when enabled 'receive_maya_output: true' it will hard crash maya. anytime you execute code from sublime. I wonder if this is related to the encoding stuff trying to send back to sublime or something.

justinfx commented 2 years ago

I found the cause. The callback that handles receiving the script editor output was using a function reference to encode the msg string that was not defined in that python namespace in Maya. And Maya does not like seeing a python exception within its output callback, which led to a hard crash. I've pushed the fix to master (6b7cd30) to make sure it properly encodes the string before sending it back to Sublime. Tested in both Maya 2016 and Maya 2022

https://github.com/justinfx/MayaSublime/releases/tag/3.1.3

JokerMartini commented 2 years ago

Awesome good stuff :)