Visual C++ Runtime Error

Started by Mohawk20, December 03, 2008, 04:37:08 PM

Previous topic - Next topic

Mohawk20

I started rendering a 4096x3072 version of my Hanging Valley scene, like I have with 2 other images that rendered just fine.
I opened the main window a few times, checking the settings of certain nodes during the fist quarter of the rendering. After about 4 times I got the Visual C++ Runtime Error window.
I have had that error a few times before with the beta at random times (or at least seemingly random). I then click the [OK] button and the program shuts down.
But since there was a render running I didn't click [OK] this time. The render is halfway now, about 250 hours after the error, still rendering like nothing's wrong.

My question is: what would happen when the render finishes, or if I stop it to save halfway? Would the save window show up, and would it actually save, or is that part of the main window that is affected by the runtime error? So would I be able to save or not?
Howgh!

reck

Yes it would be useful to know this. I to have had the dreaded "Visual C++ Runtime Error" window on more than one occasion. It will be good to see the back of that particular problem once sorted.

Cyber-Angel

Hi Mohawk,

I too have had the same error occur with the beta but for a slightly different reason. I was testing the ability of the Beta to render ultra high resolution images (70000 x 10000) and got the same kind of error, I posted the necessary files to the Planetside support email: I post part of the reply email if it will help, though your circumstances maybe different:

"As I believe you are aware, any rendered image must currently be kept entirely in memory in order to be rendered. An image of this size will exceed available memory and cause a memory-related crash very quickly, no matter how much RAM you have, because of the limitations of 32 bit applications like TG2. Once TG2 is upgraded to be 64 bit it may theoretically be able to handle an image of this size, assuming you had enough RAM, but this is a very unlikely scenario, and the render time would be so high as to be practically impossible."

Hope that helps, if not it maybe some thing else. If you like PM me you details and I'll see if I could render your image at the required resolution if you like, but if this is to complicated due to plant models and related file paths then I understand.

Regards to you.

Cyber-Angel   

Regards to you           

PG

Doesn't running TG2 in command line help to get round this a bit? Not to the tens of thousands but should at least cover 4096x3072. Cos I think you can split up the render without having to crop it....or something.
Figured out how to do clicky signatures

Mohawk20

Guys, the problem is not that I can't render it... I used a preallocated sub div cache of 200, and it is still rendering. The problem is a visual C++ component that has caused an error, and my question is if that would prevent me from saving as soon as the render is finished.
Howgh!

jo

Hi,

To be honest, I'm not sure if you will be able to save the image or not. If you can still interact with the render window you might be ok, but I don't know. If it's getting close to the end I would say leave it and try, but if you still have a long way to go I would cut your losses, restart TG2 and the render. This time just leave it to render without messing with the nodes.

I think it's fair to say it isn't the greatest idea to be doing anything like checking out nodes while something is rendering. This was fairly safe before the rendering was multithreaded, but now I think it's probably a bit risky. It's something we need to address.

Just a background to what this error is about, the C++ runtime is essentially code which provides support for the C++ language and standard C++ facilities which TG2 uses on Windows. Something has gone wrong, it might be a failed memory allocation or a number of other things, and the C++ runtime has caught that error and brought it to your attention. I seem to recall that dialog doesn't provide much context for the problem, so it's hard to tell what it might be.

Regards,

Jo

Mohawk20

So I cut my losses and stopped the render (after first making a screen grab just in case).

I was able to save, both as bmp and exr!
It's good to know that's still possible when getting this error!
Howgh!

PG

Was it just one of these?
Figured out how to do clicky signatures

Mohawk20

Yep, the very same... they don't come in many flavors though.
Howgh!

PG

No they just come in multiples ;D I only get them when rendering large images (over 7000x4000) but it's only ever using about 1.3GB of RAM. Below the 2GB limit of 32bit and way below my 8GB ram. I didn't know it kept rendering despite the error though. I closed it as soon as I got that.
Figured out how to do clicky signatures

latego

To Jo: it's the kind of message box I get when developing C++ programs in which there is an uncaught C++ exception. Memory allocation does throw std::bad_alloc exceptions; if memory becomes fragmented enough, you could be unable to allocate even small amounts of memory (don't know whether this might happen in TG). Another cause is casting pointers a-la "Indiana Jones" ending dereferencing the wrong kind of object (e.g. using an std::string as if it was an std::vector<void*>  ;D).

Bye!!!

jo

Hi latego,

Quote from: latego on December 04, 2008, 01:45:28 PM
To Jo: it's the kind of message box I get when developing C++ programs in which there is an uncaught C++ exception. Memory allocation does throw std::bad_alloc exceptions; if memory becomes fragmented enough, you could be unable to allocate even small amounts of memory (don't know whether this might happen in TG). Another cause is casting pointers a-la "Indiana Jones" ending dereferencing the wrong kind of object (e.g. using an std::string as if it was an std::vector<void*>  ;D).

Yes, that's pretty much what I was saying :-). It could be one of those things, but it's hard to tell which unfortunately.

Regards,

Jo

PG

You guys know if there's a way to extend the JIT debugger to catch specific errors? This is the only crash (except CTDs with no error message) that doesn't get caught.
Figured out how to do clicky signatures

JimB

I get this and a crash when memory's overloaded. Lowering the cache to 800 or less cures it.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.