Website Youtube GitHub

mGear Framework Forum

Running into odd crash when trying to load a built rig

I was running into a very odd crash yesterday every time I tried to load my rig. Maya would just crash with zero feedback. After pulling apart the file piece by piece (like finding a needle in a haystack… literally) I discovered that some of the controlBuffer curves were causing the issue.

When maya saves curves in a maya ascii file, they are saved as at least two commands - createNode transform and createNode nurbsCurve.

With these particular curves, the createNode transform command was working correctly, but the createNode nurbsCurve was failing when trying to execute them at the same time (i.e. load the file).

However, if you execute them one at a time in the script editor, they work as expected.

You can try this for yourself… take the following code and execute it in the script editor as a chunk. You should see the controllers_org node and underneath it two controlBuffer nodes - but the second one has no shape.

Then try just executing the second createNode nurbsCurve chunk - the shape will appear.

 createNode transform -n "spine_C0_ik2_ctl_0_Shape_controlBuffer" -p "controllers_org";
    	rename -uid "DA1A6102-4CF2-C9EF-1D07-82A60FA22506";
    	addAttr -ci true -sn "isCtl" -ln "isCtl" -min 0 -max 1 -at "bool";
    	addAttr -ci true -sn "uiHost" -ln "uiHost" -dt "string";
    	addAttr -ci true -sn "invTx" -ln "invTx" -nn "Invert Mirror TX" -min 0 -max 1 -at "bool";
    	addAttr -ci true -sn "invTy" -ln "invTy" -nn "Invert Mirror TY" -min 0 -max 1 -at "bool";
    	addAttr -ci true -sn "invTz" -ln "invTz" -nn "Invert Mirror TZ" -min 0 -max 1 -at "bool";
    	addAttr -ci true -sn "invRx" -ln "invRx" -nn "Invert Mirror RX" -min 0 -max 1 -at "bool";
    	addAttr -ci true -sn "invRy" -ln "invRy" -nn "Invert Mirror RY" -min 0 -max 1 -at "bool";
    	addAttr -ci true -sn "invRz" -ln "invRz" -nn "Invert Mirror RZ" -min 0 -max 1 -at "bool";
    	addAttr -ci true -sn "invSx" -ln "invSx" -nn "Invert Mirror SX" -min 0 -max 1 -at "bool";
    	addAttr -ci true -sn "invSy" -ln "invSy" -nn "Invert Mirror SY" -min 0 -max 1 -at "bool";
    	addAttr -ci true -sn "invSz" -ln "invSz" -nn "Invert Mirror SZ" -min 0 -max 1 -at "bool";
    	setAttr -l on -k off ".v";
    	setAttr ".t" -type "double3" 0 128.65876136592337 -2.2202918430419962 ;
    	setAttr -k on ".ro";
    	setAttr -l on -k off ".sx";
    	setAttr -l on -k off ".sy";
    	setAttr -l on -k off ".sz";
    	setAttr ".uiHost" -type "string" "world_ctl";

createNode nurbsCurve -n "spine_C0_ik2_ctl_0_Shape_controlBuffer_0_Shape" -p "spine_C0_ik2_ctl_0_Shape_controlBuffer";
	rename -uid "DEE001B1-4D97-96AF-70D9-3DA2296AFA34";
	setAttr ".ihi" 0;
	setAttr -k off ".v";
	setAttr ".ove" yes;
	setAttr ".ovc" 13;
	setAttr ".cc" -type "nurbsCurve" 
		1 27 0 no 3
		28 0 1 1.4796672040000001 2 2.482906571 3 3.5148800850000002 4 4.55714197 5
		 6 7 7.5608636779999996 8 8.4246197469999995 9 9.6107606949999997 10 10.45726114 11
		 11.532407020000001 12 12.49113097 13 13.498487730000001 14 14.525624280000001 15
		
		28
		0.8512218634224199 0.47487410174431327 0.51156102318129426
		1.0982145506052423 0.63077452574549275 -0.64900975537508698
		0.074137971036387432 0.72726967657061792 -0.74353620980201629
		-1.0982145506052423 0.63077452574549275 -0.64900975537508698
		-0.84541506549061729 -0.40785683500823422 -0.70195387218641492
		-0.76374991484678045 -1.6233434228292081 -0.21266260403019063
		-0.98306332123968365 -1.6233434228292007 0.26541195224097242
		-0.86564368503981892 -1.4918452474060029 1.0352576258591666
		-1.0384482175070433 -0.72818241625432312 1.120678735594635
		-0.8512218634224199 0.47487410174431327 0.51156102318129426
		-1.0982145506052423 0.63077452574549275 -0.64900975537508698
		-0.8512218634224199 0.47487410174431327 0.51156102318129426
		0.074138560610792131 0.41716208015011552 0.72813805885233018
		0.8512218634224199 0.47487410174431327 0.51156102318129426
		1.0350172791209131 -0.6891122937933869 1.1190989506343765
		0.86564368503981892 -1.4918452474060029 1.0352576258591666
		0 -1.3133822916894535 1.4068889532539639
		-0.86564368503981892 -1.4918452474060029 1.0352576258591666
		0 -1.3133816844014075 1.4068889017719814
		0.86564368503981892 -1.4918452474060029 1.0352576258591666
		0.98306332123968365 -1.6233434228292014 0.19037117968852013
		0.76374991484678045 -1.6233434228292081 -0.21266260403019063
		0.84388651827198946 -0.46888453122626422 -0.70195379478341335
		1.0982145506052423 0.63077452574549275 -0.64900975537508698
		0.84388648726997117 -0.4688842977879415 -0.70195374626490814
		0.76374991484678045 -1.6233434228292081 -0.21266260403019063
		0 -1.6233434228292225 -0.45931295002027545
		-0.76374991484678045 -1.6233434228292081 -0.21266260403019063
		;
createNode transform -n "leg_R0_mid_ctl_controlBuffer" -p "controllers_org";
	rename -uid "0D3E9320-4D06-B253-A36B-A2A1A2C8C6D8";
	addAttr -ci true -sn "isCtl" -ln "isCtl" -min 0 -max 1 -at "bool";
	addAttr -ci true -sn "uiHost" -ln "uiHost" -dt "string";
	addAttr -ci true -sn "invTx" -ln "invTx" -nn "Invert Mirror TX" -min 0 -max 1 -at "bool";
	addAttr -ci true -sn "invTy" -ln "invTy" -nn "Invert Mirror TY" -min 0 -max 1 -at "bool";
	addAttr -ci true -sn "invTz" -ln "invTz" -nn "Invert Mirror TZ" -min 0 -max 1 -at "bool";
	addAttr -ci true -sn "invRx" -ln "invRx" -nn "Invert Mirror RX" -min 0 -max 1 -at "bool";
	addAttr -ci true -sn "invRy" -ln "invRy" -nn "Invert Mirror RY" -min 0 -max 1 -at "bool";
	addAttr -ci true -sn "invRz" -ln "invRz" -nn "Invert Mirror RZ" -min 0 -max 1 -at "bool";
	addAttr -ci true -sn "invSx" -ln "invSx" -nn "Invert Mirror SX" -min 0 -max 1 -at "bool";
	addAttr -ci true -sn "invSy" -ln "invSy" -nn "Invert Mirror SY" -min 0 -max 1 -at "bool";
	addAttr -ci true -sn "invSz" -ln "invSz" -nn "Invert Mirror SZ" -min 0 -max 1 -at "bool";
	addAttr -uap -ci true -k true -sn "leg_blend" -ln "leg_blend" -nn "Fk/Ik Blend" 
		-dv 1 -min 0 -max 1 -at "double";
	addAttr -uap -ci true -k true -sn "leg_roundness" -ln "leg_roundness" -nn "Roundness" 
		-min 0 -max 82.077957046126031 -at "double";
	addAttr -uap -ci true -k true -sn "leg_Tweak_vis" -ln "leg_Tweak_vis" -nn "Tweak Vis" 
		-min 0 -max 1 -at "bool";
	setAttr -l on -k off ".v";
	setAttr ".t" -type "double3" -12.462397550992963 49.2131460474302 -0.10332239347712577 ;
	setAttr ".r" -type "double3" -103.06857809955946 -4.9252581643034352 81.931661690953916 ;
	setAttr -k on ".ro";
	setAttr ".s" -type "double3" 0.99999999999999989 1 1 ;
	setAttr -l on -k off ".sy";
	setAttr -l on -k off ".sz";
	setAttr ".uiHost" -type "string" "world_ctl";
	setAttr ".invTx" yes;
	setAttr ".invTy" yes;
	setAttr ".invTz" yes;
	setAttr -k on ".leg_blend" 0;
	setAttr -k on ".leg_roundness" 0;
	setAttr -k on ".leg_Tweak_vis" no;

createNode nurbsCurve -n "leg_R0_mid_ctlShape" -p "leg_R0_mid_ctl_controlBuffer";
	rename -uid "1CF8DADB-4E8C-6740-4920-59A86003A29A";
	setAttr ".ihi" 0;
	setAttr -k off ".v";
	setAttr ".ove" yes;
	setAttr ".ovc" 14;
	setAttr ".cc" -type "nurbsCurve" 
		1 8 2 no 3
		9 0 1 2 3 4 5 6 7 8
		9
		0.45246708509652245 -4.5046436829128975 3.0859956556717956
		-2.1074454008480612 -4.5046436829128975 2.0095196359412526
		-3.1839214205786028 -4.5046436829128975 -0.55039285000333127
		-2.1074454008480612 -4.5046436829128975 -3.1103053359479147
		0.45246708509652245 -4.5046436829128975 -4.1867813556784581
		3.0123795710411034 -4.5046436829128975 -3.1103053359479147
		4.0888555907716464 -4.5046436829128984 -0.55039285000333127
		3.0123795710411034 -4.5046436829128975 2.0095196359412526
		0.45246708509652245 -4.5046436829128975 3.0859956556717956
		;

Anyone have any suggestions as to how to get around this, or why these particular curves might be freaking out?

This is in Maya 2020.1 on windows, btw.

cheers,
Jason

@Jason_Schleifer I never heard about this particular issue. But I will try tonight

Thanks Miquel!

After some more research, I wonder if it may be related to the proxy attributes? If I remove the addAttr -uap from a test file it seems to work…

Interesting! To be honest I didn’t use the proxy attrs yet in production, since we are stuck in 2018 and there is a known issue with proxy attrs and animation layers in that Maya version.

I will do some test on that

Hah! I figured it out - it’s the proxy attributes! they are breaking the file on load.
I commented out the addAttr -uap lines from the maya file, and was able to load it.

I turned off proxy attributes and was able to re-generate the rig and reload files. yay!

5 Likes

Hi guys I am currently having this same issue when i reopen a scene and it crashes, I even commented out the addAttr -uap lines and the scene opened, except the scene is empty and doesnt include the rig nor the guide files.

I was just wondering Jason how you managed to regenerate the rig and reload once you had the file open?

I just removed the use of proxy attributes when building the rig and it worked perfectly for me…

1 Like