PySide + Maya 2014: New Scene -> Fatal Error

Not sure how best to describe this issue, so I made a quick video:

//youtu.be/-_Gy1K8MF0o

[video]https://dl.dropboxusercontent.com/u/10939513/maya2014_crash.mp4[/video]

I’ve been developing this tool in 2015, and am snowed in at home today, where I only have 2014. So, I start to work and am getting constant fatal errors that are not present in 2015. It seems to only be happening after having the UI loaded, doing a new scene, and then firing off the UI again. I have DeleteOnClose set on the window, as well as trying to close and deleteLater when creating an instance. I can do this all day within a maya scene session, but as soon as I do a new scene, it crashes.

Anyone have any ideas what might be causing this in 2014? Any help is much appreciated!
Thanks!

Try looking at the Maya 2015 release notes to see if any crashes were fixed. Perhaps one of them affects your code?

[QUOTE=RFlannery;26801]Try looking at the Maya 2015 release notes to see if any crashes were fixed. Perhaps one of them affects your code?[/QUOTE]

I skimmed it and didn’t see anything relevant.
http://download.autodesk.com/us/support/files/maya_2015_assets_checklist/Maya2015_Readme_enu.html

I sent in some CERs to Autodesk and contacted an acquaintance there. Hopefully they’ll figure it out, because it’s a bit of an issue!

can you step through the init and see which exact call is causing the crash? Any script jobs hanging about or threading shenanigans?

[QUOTE=TheMaxx;26803]can you step through the init and see which exact call is causing the crash? Any script jobs hanging about or threading shenanigans?[/QUOTE]

Since in the video you’re closing down your UI, I agree with Maxx… is there a script job telling your UI to update being registered that’s still hanging around? I seem to remember in the ART tools that are currently out, if the animation panel is open there was script job to update a character list when a new scene was created. Maybe you have something similar going on here that’s not being cleaned up when the UI closes?

Is this using Pyside with an external .UI file? I was getting that a lot originally before I converted the .UI to code and stopped using .ui files altogether. Also, I came across a thread somewhere, maybe the beta forums, where they mentioned adding the following environment variable could also get rid of a similar crash.

Variable Name: MAYA_DISABLE_CIP
Variable Value:1

I third the whole stepping through thing. I’ve had issues before with simple things like name conflicts causing fatal crashes rather than just throwing errors when working with PySide.

I figured this out a few days after posting. It ended up being something incredibly dumb, as usual.
There was a section of code that created the menu in Maya’s main menu bar, and there was an indentation error there. Not an error that would raise an exception in Python, just a logic error where it was trying to create that menu whether it existed or not, when it was only supposed to create it if it didn’t exist. Turns out, Maya does not like trying to create something that already exists when it comes to a menu like that! Maya 2015 doesn’t seem to care.
Anyway, that was annoying to find :slight_smile: