Notifications
Clear all

[Closed] Random Unexpected Errors

Hi guys! That is bizzare. I’m under max 2012sp2 64x. Sometime my script works fine for a long time. And then, suddenly, max 2012 decides to throw unexpected system error when I run script all the time and crash. If I restart application, it does not help. Somehow later on it decides to work again. OMG. I need to run that script on productional server later on, remotely, is there really nothing I can to… erhhh protect myself from 3ds max?

6 Replies
3 Replies
(@denist)
Joined: 11 months ago

Posts: 0

it’s hard to say why your scripts crashes but it must be a reason. the only way to protect yourself from an unexpected crash is to fix the problem.
most likely the problem is related to memory leak and garbage collection.

(@ryumaster)
Joined: 11 months ago

Posts: 0

I thought so too, but then why restarting application is not fixing it? Is there a 100% way to check that at current state memory is fine, not corrupted in some way? I wish I could track my problem this way

(@denist)
Joined: 11 months ago

Posts: 0

you can check heapfree and heapsize… i don’t know how much your script needs. try to change in max preference setting default initial memory allocation for scripts from whatever you have to 200 Mb. reload max, and try the script again. By the way how much initial allocation you have now?

 lo1

Sometimes it’s CAT. :banghead:

Thank you, I’m trying to track it down.
It is 250 mb size.
Problem 1 was with 3rd party modifier, before script, I needed to add it, then remove, probably it initialized something this way.

Still, madness continues. CAT, other parts… But I guess you are right, I just need to re-write my code somehow and it will end up working fine eventually I remove some code parts, re-test many times, to find culprits and then avoid using them directly and e.t.c

 lo1

One random thing I’ve discovered about CAT this week is that this:

delete someBone

will raise a SYSTEM EXCEPTION
while this:

select someBone
max delete

will not :shrug: