View Full Version : #filePostOpen callback fires when max shuts down
06-08-2008, 01:54 AM
Seems like I've had endless headaches getting the #filePostOpen callback to work correctly over the years... and here's the latest incarnation of that fact.
Looks like my #filePostOpen callback is firing when max shuts down... and in doing so, is crashing max. Granted, since the user is closing max anyway, it may not be a big deal that Max is crashing. But I was hoping to release this useful script publicly, and I'm not gong to do that if it crashes everyone's Max session upon exiting.
Anyone else ever have this issue, or know of any workarounds? Thanks.
06-08-2008, 02:14 AM
what max version? and do you know what file it attempts to open? ( should be in callbacks.notificationParam, I think? )
06-08-2008, 02:39 AM
Thanks for the questions... they forced me to probe in directions I hadn't thought of, and I discovered the source of my problem is NOT the callback being fired, and as far as I know, it is working correctly in that it does not fire when Max shuts down.
06-08-2008, 03:13 AM
( but what -was- the problem, then? :D )
06-08-2008, 03:51 AM
Well, basically my callback function was calling another function that was modifying some data stored in a custom attribute in a scene node, and I thought it was the process of performing that modification that was causing the crash, because when I commented out that procedure, the crash didn't happen. And because I believed it was that process that was causing the crash, it was logical to believe that the process was occuring at shutdown, which is why I thought the callback was firing.
As it turns out, it wasn't the ACT of performing that modification that caused the crash, it was the RESULT of having performed the modification that caused the crash upon exit. If that makes sense?
And incidently, the procedure I was performing was clearing a floatTab parameter by setting it equal to #(). Evidently if you do this while that parameter is holding controllers (the floats are converted into controllers when you animate the floats), it causes a crash upon exiting Max.
To work around this I simply deleted the custom attribute from the scene node, and rebuilt it, effectively resetting the floatTab parameters back to #().
Whew. Hope that sort of made sense.
06-08-2008, 12:36 PM
makes sense to me :D
except for the crashing part, of course; I hate on-exit crashes. Might have spent the better part of a day working on a script that works perfectly inside max then you close it and *boom*. Aaaaaaaargh.
06-08-2008, 12:36 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.