PDA

View Full Version : Random Unexpected Errors


RyuMaster
02-19-2012, 05:17 PM
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?

denisT
02-19-2012, 06:07 PM
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?

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
02-19-2012, 06:26 PM
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.

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
02-19-2012, 06:55 PM
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
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?

lo
02-19-2012, 07:09 PM
Sometimes it's CAT. :banghead:

RyuMaster
02-20-2012, 12:32 PM
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

lo
02-20-2012, 12:37 PM
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:

CGTalk Moderation
02-20-2012, 12:37 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.