Notifications
Clear all

[Closed] Problem with Render – Unknown System Exception

I apologize I can’t paste the entire code, my quest is a bit general as to why this line would crash.

I have created an advanced batch render script, that will go through many max files and render them very specifically. The script works wonderfully on all but just a few files. When Max loads a problem file, which renders fine by opening the file itself, and execute the line of code


 render progressbar:true outputWidth:(edtWidth.text as integer) outputHeight:(edtHeight.text as integer) frame:1 renderType:#normal outputfile:theOutputFile
 

I get this messagebox on my screen

“MAXscript Rollout Handler Exception: – Unknown system exception”

is this one and max completely freezes up.

  • when this line is disabled the batch runs fine but does not render
  • the file ONLY crashes on a few files when it executes that line

Alternatively if I disable the progressBar:true, max does not freeze, but still won’t render (and throws an exception).

If someone wants to take a look at file I will be happy to email it to them for their own testing. It is baffling me.

Any ideas why that render line would crash max?
Thanks!,
Colin

13 Replies

Yes, that happens.

Max gets messy with the memory after multiple file loads and gets unstable. I always start in the fresh session when working. Went loading multiple files, I have a ini and stores the last successful file I’ve edited or rendered. Then the next time it runns it starts at the last file it did not finish…

Good luck

Restarting Max does not solve this, and it occurs at the same file everytime.

So I’m not sure it’s a memory issue. Any other ideas? I can replicate it in a zip file if you want to try it yourself.

i would try to output the variables to a file and check if they are ok for the “crash-files”

  • edtWidth.text as integer
  • edtHeight.text as integer
  • and esp. theOutputFile

Already tried it, the variables look just fine when it crashes.

More findings reported here:

the file still crashes the same way with:
-no textures
-no textures, no material editor mats
-no material editor mats

Something very interesting also happened. I went through and (painfully) line-by-line executed everything in the script on the file, and it renders fine no problems.

Is there another way to render out a frame of an animation besides using “render()”?

yeah yeah… post the file… I love a good crash story…

Thanks for all the responses Kramsurfer and everyone else. I am slowly figuring this out. The file doesn’t crash when I use a different template file…Let me see if I can narrow down the problem with my template file.

It definitely has a problem with these two lines

local lightDummy = getNodeByName “Dummy_Light_Setup”
local lightDummyLookAt = getNodeByName “Dummy_Light_Setup_LookAt”

with just these lines commented out, it renders fine…very strange.

Alright got it squared away to the problem here is the deal.


try (
		print "Aligning start"
		$Dummy_Light_Setup_LookAt.pos.x = theCamera.pos.x
		$Dummy_Light_Setup_LookAt.pos.y = theCamera.pos.y
		print "Aligning done"
	) catch
		print "Couldn't find the Dummy_Light_Setup_LookAt"

NOTE: when it crashes both “Aligning start” and “Aligning done” are displayed in the listener, it just errors out on the render() line.

I’ll explain the setup

In the template file there is a Dummy Object (“Dummy_Light_Setup”) with a LookAt constraint on it’s rotation pointing to another Dummy Object (“Dummy_Light_Setup_LookAt”)
. All the script has to do is align the X and Y pos of the lookat constraint to the camera’s position so it aligns the light_rig (linked to the Dummy_Light_Setup) to the camera.

if I comment out the lines:


		$Dummy_Light_Setup_LookAt.pos.x = theCamera.pos.x
 		$Dummy_Light_Setup_LookAt.pos.y = theCamera.pos.y

it renders fine. In fact attempting to access any thing on the $Dummy_Light_Setup_LookAt makes it crash…I’m completely baffled. Is there another way to line-up the camera and the light_rig?

-Thanks!

Page 1 / 2