PDA

View Full Version : Garbage Collection Bug?


Moosley
02-27-2009, 12:01 PM
I've noticed a rather annoying bug when running garbage collection after wiring parameters... It seems to be removing animation sub-controllers!

Try this... Create 2 boxes and set up a 2 way wire on the z rotations... Set some keys then run gc(). After the garbage collection the sub-controller on the master object is gone, along with the key data and the ability to set new key frames.

Is there anyway around this aside from not running gc() (which may automatically get called anyway)?

ZeBoxx2
02-27-2009, 05:47 PM
you're lucky... when I try, once in a while, it just right-out crashes (Max 9 and Max 2009, 32bit). whoops?

Moosley
02-27-2009, 06:33 PM
Oh yeah, that too :rolleyes:

ZeBoxx2
02-27-2009, 07:58 PM
hrm.. That whole two-way wiring seems horribly crashy in general.

Anyway... here's a workaround to your specific problem, but you're not going to like it.

After you set up the two-way, get the subcontroller through <wirecontroller>.slaveAnimation and assign that to a variable, and do a gc() . The subcontroller now remains. Hooray.

Now set that variable to 'undefined' and call gc() again. byebye-subcontroller.

So apparently that controller doesn't actually 'exist' anywhere except in memory and is subject to garbage collection? Total guesswork there, but the above would indicate such.

So to fix this more long-term, create a custom attribute on your scene with a maxobjecttab parameter, and stick the subcontrollers for your two-way wirings in that array parameter. The subcontrollers should then continue to be referenced in the scene (via that custom attribute) and not get removed upon gc().

Still seems odd, though

JHN
03-01-2009, 12:41 PM
So apparently that controller doesn't actually 'exist' anywhere except in memory and is subject to garbage collection? Total guesswork there, but the above would indicate such.


This makes sense that after merging on some occasions the wires brake, and why they broke constantly in older version of max, don't know exactly when that started, but we lost a lot of wires after it first got out and stopped using it until recently where things are going a bit better now, except for this problem then. I would log it! At least sent in the CER after the crash.

-Johan

ZeBoxx2
03-01-2009, 02:21 PM
haven't the foggiest if / to what extent it would be related, really. This seems like a rather odd thing to have gone unnoticed for this long so either...
A. we're just seeing things / doing something wrong
B. nobody's been using 2-way wirings (which, granted, are weird)
C. they have been, noticed crashes/odd behavior, and simply discarded it and moved on without a peep %)

Where -did- that bug report form go...
(then again, maybe it's fixed in 2010)

eek
03-01-2009, 04:57 PM
Isnt there a patch for max 9 on the area or autodesk site, im sure i saw something up there.

Moosley
03-02-2009, 09:30 AM
Thanks for the work around idea, i'll give it a shot!

ZeBoxx2
05-23-2009, 03:01 PM
Isnt there a patch for max 9 on the area or autodesk site, im sure i saw something up there.

Not sure about that, but a hotfix for 2010 - http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=13326570&linkID=9241178 - seems to include something that might be related.
Parameter Wiring
When Resetting a Scene Parameter, Wire Sub-Controllers would be removed due to the Maxscript Garbage Collection clean-up process. This only occurred when the scene was Reset or an XRef tree was deleted. It did not occur when exiting with a scene Open. This clean-up procedure was fixed for all instances of scene change states.

Hopefully that fixes some of these problems; although you'll need 2010 for it, of course.

CGTalk Moderation
05-23-2009, 03:01 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.