Render freezing
wsxc
Posts: 19
I have a new problem.
Sometimes Carrara show the "Memory allocation error". I restart Carrara and change some setting, and the render starts.
But when it reaches 60-70%, it freezes. The progress stops and Carrara doesn't react to any clicks, so I have to restart it and do the render anew. I've never had this problem before.
Comments
Ah! The super-helpful error messages in Carrara!
Can you give us some specs on your machine? Mac? PC? Amount of RAM? 32-bit?
Also, are you doing anything else on this machine while Carrara renders? I would suggest rebooting, launch only Carrara and see what happens with the render.
PC
No. I shut down all applications and processes (except system) and leave my computer alone. Carrara is very capricious...OS: Windows XP SP3
Proc: AMD Athlon 64 X2 Dual 5000+
RAM: 2GB
Graphic card: GeForce 8600GT
The system is in the very good condition.
You have not mentioned if it is 32-bit or 64-bit. Most new stuff is 64-bit. Do Start -> Run -> MSINFO32.exe
You'll see a line like: System Type x64-based PC
If you see "x86" then it is 32-bit.
Here's the hard truth...2 GB of RAM is not very much. Most machines today are starting at about 8 GB or even more. I run 64 GB on this server. So for a 3D to experience memory pressure with 2 GB of RAM...I am unsurprised.
I can show you how to get more information about what is going on by using Performance Monitor once we establish the "bit-ness" of your machine.
When it's happened to me in the past it's because I did not name the file being rendered (32-bit and 64-bit Windows XP) or there was a memory issue because of a really large scene in 32-bit Windows XP.
Does it render OK at a much smaller final image or with less quality in render settings? If so you may be memory limited....but if still no go, then maybe you have a bad object construct or texture? Try hiding one object at a time from rendering until you find a bad item?
As was suggested, go down to the Taskbar at the bottom of the screen, right click, and you'll get the Task Manager. Select the Performance tab and you will see how much memory is being used when that error occurs. If you are running out of memory, or getting close, it will show you.
And 2GB is really small memory for doing 3D work. Especially if you aren't doing any memory management with your scenes.
The Performance Tab in Task Manager is okay for a quick-and-dirty look. But I have never been a fan of it for "real" troubleshooting; it usually doesn't provide enough detail to know where the problem is coming from.
The Processes tab is a bit better. Make sure you click the "Show processes from all users" and if need be add the "Memory (Private Working Set)" and "Working Set (Memory)" columns (see why I don't like Task Manager? ;-P ).
Click on the column header for "Memory (Private Working Set)" and find the carrara.exe process. Watch it during your render. What behaviour does it exhibit and what sort of numbers do you see? If Carrara itself doesn't account for nearly all of your 2 GB of RAM, then what other processes have high Private Working Sets? Can you stop these processes (Internet Explorer can be a pig, Outlook too...)?
I clicked Fast Reply so I cannot post an image...BRB...
EDIT: The forums posted my screen shots in backward order. Rephrasing my post to clarify.
In the second screen shot; I simply started Carrara and have an empty scene -- I've done no other work in Carrara and it is now essentially idle on this computer.
We see that Carrara has the largest Private Working Set and Working Set. So what does this mean?
Windows' "memory" is both the RAM on your motherboard and the paging file(s) on your hard drive. The Memory Manager is actually very good and it can allow different processes to share common bits of code - thus that code is only loaded once. So "Working Set (Memory)" is how much RAM (the working set) a process is using. The "Memory (Private Working Set)" is also how much RAM a process is using but it shows the code/data that is specific to the process that cannot be shared with other processes.
So "Memory (Private Working Set)" is usually what you want to watch.
In the first screen shot, I opened a small scene and started it rendering. It was still rendering when I snapped the Task Manager; so these are not final numbers. Note that Carrara acquired more RAM and threads to render.
Let us know what behaviours you observe during your "freezes" (my guess is; you are not actually frozen, rather Windows is swapping data between your RAM and paging file(s) constantly...and that is slow going...). As we've already pointed out though, 2 GB of RAM is really tiny for nearly anything these days. If you can get that upgraded, you'll be a happier artist.
But if Carrara is the only app running that takes much memory, and you have 2GB of RAM, and the performance manager shows the RAM usage creeping up towards 2GB when you're rendering a scene, isn't that pretty clear evidence that you probably have a memory issue? Or am I missing something.
And this raises another issue I'd like to discuss on the topic. I've been using computers for decades. And I still can't figure out most of the horrendously written OS features and terminology. Personally, i think anyone who has a hand in writing any code for MS Windows over the years should be absolutely ashamed. I am absolutely unable to figure out Windows networking and all of the arcane crap that passes for user information and features. Who the hell cares about IPV4 or IPV6? Just tell me what the hell it means in real terms, not some ridiculous techno-geek speak. And the same thing goes for RAM terminology. JUST TELL ME IF I HAVE A FREAKIN' RAM PROBLEM, don't make me wander thru the ridiculous techno-babble that these guys write solely to make them feel smarter than everyone else.
Sorry...off topic rant...dont' mind me....
And another thing...
Tell me, who wrote that absolutely ridiculous "Windows Troubleshooter" or whatever it's called? What a fiasco !!! Every single time I use it to identify a networking problem or anything else for that matter, the ONLY response I've ever gotten is "windows was unable to find the problem". NOT ONCE in all of these years did it say "Oh, the reason you can't connect is because your internet provider is screwed up, it has nothing to do with your computer, so don't worry."
Are they incapable of writing stuff in human terms? Is it that difficult? But all I get is "hell, windows has no clue why you can't connect. You should spend the rest of the day trying stuff until you stumble on something that works, because we're just clueless".
And by the way, Garstor, just look at the images you posted...
There are two columns:
Working Set (Memory) and Memory (Private working Set).
Now, are human beings supposed to understand that? Does that make sense to anyone in this universe? Could they not have come up with stuff that makes a LITTLE more sense to a normal, rational person?
Okay, I'm done....sorry.
True again; most lay-people cannot understand the terminology and what is going on under the covers. Memory management is especially tricky - took me a few years to completely get it.
Even the "simple stuff" is complicated. To most people like my parents, a web browser is "the internet." Do you know everything that goes on from typing "www.daz3d.com" in the address bar to actually seeing the DAZ website on your screen? It's insane...and fortunately, the typical user doesn't have to know this stuff.
But it is incumbent on a technical person who is trying to help to be able to detect the person's technical level and adjust their language appropriately. That is very difficult over forums like these because you do not have the sound of the person's voice to guide you (are they understanding? angry? etc.). Many times I have dumbed-down my technical replies only to have the OP reply "Hey Garstor, I actually write code for a living; I know exactly what you meant..." So there is a bit of a tightrope to walk.
Joe, in past versions Task Manager was far worse than this! It was actually downright misleading... I think the idea here is that an average user isn't supposed to be looking here - a "pay no attention to the man behind the curtain" sort of thing.
Sorry to hear about your experiences with the Windows Troubleshooter. Sometimes it does help (no, really!). I agree, with networking it usually trips over itself...but many times the networking problem can be outside your computer and the tool really has few ways of detecting that. Networking is something of an Achilles Heel for me; but some of my friends and former colleagues can knock these problems out of the park.
I've said before, if Windows offers to send information about a crash to Microsoft -- please do it. I can promise you that the data is examined and sorted. When patterns emerge, appropriate vendors (sometimes users too) are notified (say, a bug in a particular video driver).
And you've hit on the exact problem...
I know a lot of code guys and techie guys. And without exception, as much as I like them and they are good friends, they ALL take pride and get an ego boost from feeling smarter than everyone else because they understand this insanely ridiculous and arcane code crap. That is the problem. It continues because the code guys understand it, it makes them feel smart, and they have no clue, nor do they give a rip about the users. You yourself described it as "dumbing down". How completely ridiculous and condescending to have that attitude.
But that's a common sentiment among you guys. I know, I have good friends like that. And I kid with them, and they agree that's how they are. It's too bad when people think that caring about those who use your product is dumbing something down. But that is Microsoft, and a lot of other software developers. Just look at the incredibly useless error messages you get in 99% of all the software every written. Totally useless.
Anyway, it'll never change, so there's no use complaining about it.
You pride yourself on seeing the apparently obvious. Here it is -- there is jargon in any industry. Start talking about global illumination, translucency and colour theory and watch the coder's eyes glaze over...
Wow...so my attempt to make a technical concept approachable is condescending? Thanks!
Let's take a vote...
How many people think "dumbing down" is condescending?
Geez, Garstor, get real. You don't think it's condescending to say you're dumbing something down for others to understand??
Oh wait, let me take that back. Those in the "Happy Friends Network" will side with you, but in the real world I think it's pretty clear.
Hi, Garstor
I seem to remember being a little short with you in the past when you gave an explanation to a question that I had asked.
Sorry about that.
Please continue to explain things as you see fit, you are always informative, often educational and usually interesting.
Thanks! I don't recall the specifics of that encounter but that was what I was refering to in my earlier post.
Joe's paranoia to the contrary; the phrase "dumbing down" in no way implies a mental deficit about the other person. It simply means that a good trainer/support person will detect that jargon is not being understood and adjust his/her vocabulary appropriately. This is especially difficult in text-only forums; essential visual or audible signals are gone and you only have silent words as a guide.
Okay, so Garstor, if in the future I explain some stuff about visual effects that you are unfamiliar with, and qualify my statements by saying that I am dumbing them down for Garstor, you won't be upset? Okay, good to know.
Not the slightest bit! In fact; I would love to hear some useful advice from you.
Now was that your snarky way of saying that you're still waiting to hear useful advice from me since nothing I've said in the past is of any use?
Now was that your snarky way of saying that you're still waiting to hear useful advice from me since nothing I've said in the past is of any use?
If anybody should know snarky.... ;-) <---Snarky wink</p>
Maybe it's more akin to heaping coals?
The infamous »memory allocation error« does struck me a lot in the past . I am using Carrara from version 5.1 upwards to now 7.20. I am at the point where I really do not want to spend more money for features in 8.5 I do not use (»Genesis« integration as nice as it maybe is). But I would be happy to spend money for corrected bugs. The »memory allocation error« is one of the beastliest bug.
It appears to me Carrara has serious internal problems which do not come from Windows or the Windows version or the memory management inside Windows. It's something inside of Carrara. Simply because the »memory allocation error« is present since version 5.1.
Two thoughts about this:
a) short of memory
Yes, this could be. Every application needs memory and rendering applications are memory hungry like hell. But other applications do not crash while rendering for an hour. This could only mean Carrara is allocating memory WHLE it's rendering. Well, the resolution is set BEFORE rendering so Carrara could easily calculate the needed memory before start rendering and probably wasting hours of user time. I can not think of any other reason why Carrara needs more memory WHILE rendering.
Did I mention a »render continue« feature would be a nice addition? Still not present in 8.5? Oh, yeah!
b) internal programming flaws in Carrara
The »memory allocation error« comes to me when I re-arrange, delete, copy and re-arrange shaders and textures like crazy. Simply because I try the best settings of a scene. And I am some sort of a shader-fetishist (I deeply hope no-one's going to tell me »Don't do this in Carrara«).
The error does not go away when saving the scene, quitting Carrara (no need to reboot Windows), starting Carrara and loading the scene again. And when the error arises there is PLENTY of memory free on my system. Which does mean the bug is nailed into the internal structure of a saved file.
Why? Because when I build the exactly the same scene from ground up - now knowing which shaders I need - the saved scene file is not only smaller than the faulty one, no, it's also working. Better: I can start a browser, an eMail program, Yahoo Instant Messanger and my word processor and Carrara is HAPPILY rendering in the background.
So, sorry folks: My best guess would be some sort of a »garbage collection« routine in Carrara which simply is faulty. And the Carrara-programmers have never touched it.
Again: I would LOVE to spend some hundred of bucks for a new version if those bugs are gone. I fear I am the only one so this will probably never happen.
Kind regards,
The Inflater
See above. It sounds like a it may be as much poor shader management as flaws in Carrara. The old forums had a few threads that offered really good memory and scene management tips for C7. With the advent of C8 and it's 64 bit version a lot of the memory management issues have lessened. It's still a good idea to lower you texture spooling. I think DAZ_Spooky recently said it should be set to at least half your system memory and ideally lower than that.
Again: I would LOVE to spend some hundred of bucks for a new version if those bugs are gone. I fear I am the only one so this will probably never happen.
Kind regards,
The Inflater
DAZ may have a free trial and if not, DAZ does have a 30 day money back guarantee. You could try it and see how it works for you. If you're not happy return it fo your money back.
That is much easier said than done. Most garbage collection features come from managed code (Java, .NET) rather than native code (C++) and they are very difficult to write correctly. Carrara is written in C++ because it is easier to port over to the Macintosh platform. Also, native code tends to execute much faster than managed code.
Bugs in software are a fact of life. What I fear is that you have confused the memory allocation issue you are having with a bug. It is almost certainly not a bug - a bug is a software defect. What you are more likely experiencing is a resource limitation on your system -- in which case, even a 100% bug-free piece of software would still have problems.
Hello Gars! In this thread, the poster gives his specs:
http://www.daz3d.com/forums/discussion/29323/#435271
Alright Inflator, this is most definitely the cause of your memory allocation problem. This is not a bug in Carrara but rather a limit on Windows' memory handling. My first guess would be Carrara uses up the 2GB of virtual memory that a 32-bit application is given - as you already noted, you have plenty of RAM available.
You scene is simply too complex for these specs.
I realize that not everybody can drop the coin for a new system, but 64-bits and at least 8 GB of RAM (more if you can swing it) is very strongly recommended if you want play with big scenes and lots of shaders. Every 32-bit Windows program from Notepad and Solitaire up through Office and Carrara will be given just 2 GB of virtual memory (this is different from physical RAM). You tweak Windows to increase this to 3 GB but you do so at the risk of running Windows itself in an unstable state (Pre-Emptive Snark: Windows is already unstable!).
Upgrade and Carrara will chew happily on your scene and no memory allocation error will occur.
And they all lived happily ever after!
@Garstor & evilproducer:
Thank you for taking the time to explain things and suggest workarounds for my problem.
Again: This complexity is not due to complex (polygon count) or too many objects in the scene. It's because I've added shaders, deleted them, added them again, deleted them again, changed textures, deleted them, added them again and so on.
Read on, it's getting better!
I do not have too many textures in my scene or too many objects or complex objects in my scene. Again: I do not! Why? Because when I build exactly the same scene again - now knowing how to program the shaders - the error does NOT occur. That clearly points to a bug into the memory management of Carrara.
I've already told this fact in my post.
Oh, and I only have two V4s and one David 3 in my scene and a few simple props. Sorry, if this is too complex and Carrara can not handle these few polygons and some textures ... well ... that would simply be ridiculous.
I appreciate your efforts in trying to tell me workarounds about what to do and what not to do. Believe me: I already know most of them. Because I am working with Carrara for five years on a nearly daily basis now.
But, sorry, a bug is a bug. A software should NEVER under NO CIRCUMSTANCES corrupt the work a user have put in. And therefore corrupt the precious time a user have put into it. A program MOST ALWAYS assure the integrity of it's internal data. If it does not, it's simply called a bug.
My real concern would be: Is this behavior still present in Carrara 8.5?
Kind regards,
The Inflater
Are all these textures saved internally? Have cleaned out unused and duplicate shaders? The fact that you build a scene from scratch and don't have these issues suggests that the original scene file has lots of data that's being retained. This could be a bug with Carrara or a scene management issue. Have you tried turning down the number of undos in the preferences. This can also be an issue. If you have it set too high, Carrara is forced to hold onto that data. It should be flushed when you quit Carrara.
I know you said you've been using Carrara fro five years, but it's obvious that there are some areas that you're not fluent in, just from the posts in your other thread. As an example, not knowing about being able to pause and resume a render. This is why I'm suggesting some things that maybe you know- because I don't know what you know.
The other example is the number of figures. You may not think that three Millenium figures has that high of a geometry, but they do. I seem to recall a V4 alone has over 60,000 polys. Add another and then an M4 or David and you're already pushing 200,000 polys. Not to mention the polys in their clothes or any other props you have in the scene. They can add up quickly. Add to that the image maps. I know C7.2 can handle it, as I've built scenes like that before, but it is making Carrara work and pushing its 32 bit memory limits.
This image has M4, the Mill-Horse and the Mill-Dragon, plus the clothes and armour, dynamic hair, a pretty complex terrain, atmosphere, volumetric clouds, three different Carrara trees, several surface replicators, a stone fence with displacement and a butt-load of procedural shaders and image maps. The Assembly room view was pretty sluggish navigating around in, but I never had a memory allocation error.
My system was a single processor PPC G5 (64 bit) Mac (late 2003), with 4.5 GB RAM and C7.2 Pro which is 32 bit. I network rendered and used a dual processor PPC G4 (32 bit) to help.
I'm not saying this as a brag. I'm saying this because I think if you have a 64 bit system, then I think upgrading to C8.5 Pro 64 bit will fix your memory allocation errors. If you don't have a 64 bit system, then I think it won't help, because the underlying issue is the 32 bit system and the 32 bit version of Carrara you would be forced to use.
May I suggest something to help prove otherwise? Run the Performance Monitor tool in Windows. Find the Memory object and add the Available MBytes counter. Then find the Process object and add the Private Bytes and Virtual Bytes and Working Set counters. When you click on these counters, you will see a list of all the processes (applications and services) running on your machine. Find the Carrara.exe process (obviously Carrara needs to be running first) so that you only get the 3 counters for Carrara.
Now open your scene and render. Watch the live graph of PerfMon while Carrara works. You should see Private Bytes climb ever higher until it nears the 2 GB mark. Then you'll get a memory allocation problem. The aforementioned Process Explorer could also help here, though you won't have the granular level of detail that PerfMon gives.
I can't sugarcoat this one. That's just naïve.
There are, most definitely, certain situations at resource limits that lead to instability and process crashes. Carrara asks for some memory (again, virtual address space, not physical RAM) and Windows has no choice but to reply, "No. Sorry, there is no more to give."
As mentioned; I wish Carrara handled this situation more gracefully but the root issue is not Carrara itself.
If I had access to Carrara source code and debugging symbols; I could help you further by analyzing a crash dump taken just before Windows is forced to dismantle the Carrara process.
Just an additional FYI about Windows memory management here. If you run a 32-bit process on 64-bit Windows, the virtual address space will increase to 4 GB -- double what you would have on 32-bit. However, you could experience additional crashes if Carrara was not compiled with the LARGEADDRESSAWARE flag -- because this extra virtual address space could be perceived as "illegal" at the >2 GB ranges.
Why go to 64-bit processes on 64-bit hardware? Because then your process space increases to 8 TB - and that is an artificial limit imposed by Microsoft...64-bit address space can be far bigger than that still. So memory allocation errors on 64-bit is almost guaranteed to be exhaustion of physical RAM rather than exhaustion of virtual address space.