Notifications
Clear all

[Closed] CustAttributs on rootnode throw system exception

Hey there,
in one of my scripts I am adding a bunch of Custom Attributes to the rootnode. Usually it works fine but once in a while it gives a nasty “– Unknown system exception”. Closing max and re-opening the file always fixes the problem. Does anyone know what might cause the system exception?

I am adding three different CA definition sets to the rootnode based on this code:
testdataCaDef = attributes testdataCA
    attribID:#(0x6c0dbc3a, 0x23c71ad2)
    version:1 (
    	parameters main (
    		sTest type:#string
    		sTestPath type:#string
    	)
    )
    
    fn checkOnCAs = (
    
    	testCA = rootNode.custAttributes["testdataCA"]
    	if ( testCA == undefined ) then (
    		format "adding custom attributes
"
    		try (
    			custattributes.add rootnode testdataCA 
    			true
    		) catch (			   
    			errMsg = "Critical error : Failed to add custom attributes to scene root node"
    			MessageBox errMsg title:"Internal system error"
    			false
    		) 
    	) 
    	else (
    		format "custom attributes exists in scene
"
    		true
    	)
    	
    )
    
    checkOnCAs()
Then, sometimes, it throws the system exception if I try to access some of the CAs (e.g. rootnode.testdataCA.sTestPath) while others still work fine.


Any ideas?
18 Replies

hi lena,

are you on max 2009? if so, it’s a bug, the service pack should fix it.

nope, Max2008 64bit

I’d guess the same bug exists in 2008. Perhaps it’s safe to set something up on a trackviewnode instead? It has the added advantage that any animatable parameters are automatically exposed in trackview… if they’re something you’d want people to be able to interact with that way, at least.

custAttributes.add trackviewnodes <MSCustAttribDef>

hmmm, that’s bad news.

And no, there is no need for the parameter to bee seen by the user in the trackview and the parameter won’t ever be animated.

Could you give me some more specific information about this bug? What is causing it? Where could I find more information about it?

thanks!

if you check the service packs/hotfixes for max 2009 it is mentioned in the readme for one of them – i think its SP1

Ok, I will check that. Thanks.

Lena, do you have this issue if you apply the CAdef to an attribute holder modifier?

No, I didn’t use any attribute holder modifier. No modifier at all.
I checked the service packs/hotfixes readme for max 2009 but couldn’t find any information about my problem either.

ok, i didnt know if it was a problem when you were assigning to the root node, that’s all. Maybe you could try this to see if it a blanket CA bug.

in the readme here for max 2009 SP1 there is a short part that reads –

custom attributes –
Newly created custom attributes work without restarting 3dsMax/3dsMax Design 2009

not really heplful, i know. However, I had this exact problem with 2009 until I installed this patch so perhaps it was there with 2008 like richard said.

Page 1 / 2