-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error tolerant script loading #746
Comments
actually, it looks like my code was failing because some of the string plug values had "\n" in them (which was my fault and shouldn't typically happen). Still, something to look out for... |
The ast munging discussed here sounds like it might be a relevant approach : http://stackoverflow.com/questions/9670931/sandboxing-running-python-code-line-by-line |
- Raw pointer rather than smart pointer for plugSet(). We only use smart pointers where we need to manage ownership. - Slightly more robust way of identifying the relevant plug. - Removed signal handling after the correction has been applied. - Removed unnecessary connection member variable. - Added \todo discussing a better mechanism which relies on doing #746 first.
We bumped priority on this as it's already affecting us and will certainly annoy test users. |
Errors are reported to the user via a dialogue, but the file is no longer prevented from loading. Fixes GafferHQ#746.
Hello,
Using Gaffer in production, we found pretty quickly that you need to be able to load scripts with dodgy nodes in them, without the load process terminating prematurely. In my software, I've been getting round this by manually executing the scripts line by line. This has worked so far, but I've just noticed a situation where the values in path filter "paths" plugs get saved out on separate lines. This is breaking my code, as the lines no longer make sense in isolation. I imagine it's a matter of weeks before people start complaining about this in production, (I wouldn't be surprised if it's caused problems already). I could probably work around it on my side, but it'd be a workaround on top of a workaround, and it seems like high time we fixed this in Gaffer anyway, so here's a ticket.
The text was updated successfully, but these errors were encountered: