#filePostOpen callback fires when max shuts down

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  06 June 2008
#filePostOpen callback fires when max shuts down

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.
__________________
Jon Huhn
www.jonhuhn.com
www.jonhuhnmedical.com
 
  06 June 2008
what max version? and do you know what file it attempts to open? ( should be in callbacks.notificationParam, I think? )
 
  06 June 2008
Richard,

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.

Thanks!
__________________
Jon Huhn
www.jonhuhn.com
www.jonhuhnmedical.com
 
  06 June 2008
excellent!

( but what -was- the problem, then? )
 
  06 June 2008
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.
__________________
Jon Huhn
www.jonhuhn.com
www.jonhuhnmedical.com

Last edited by Jon-Huhn : 06 June 2008 at 02:55 AM.
 
  06 June 2008
makes sense to me

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 June 2008
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:41 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.