Ventuz Technology Group Forum  

Ventuz Forums » Ventuz » Bug Reports » VENTUZ OutOfMemoryException

VENTUZ OutOfMemoryException
Started by franc14529 at 03-13-2008 1:04. Topic has 2 replies.

Print Search « Previous Thread Next Thread »
  03-13-2008, 1:04
franc14529 is not online. Last active: 7/23/2008 4:05:25 AM franc14529

Top 50 Posts
Joined on 12-27-2007
Posts 18
VENTUZ OutOfMemoryException
hello to all my freinds.




yesterday my ventuz application crashes.i started looking for the reason.finaly i got this exception:OutOfMemoryException

-----------------------from MSDN--------------------------
An OutOfMemoryException exception is thrown when an attempt to allocate memory fails.

Associated Tips
If you are creating an array, make sure the size is correct.
For more information, Visual Basic users can see Arrays in Visual Basic.

For more information, C# users can see Arrays (C# Programming Guide).

Be sure you have enough memory for internal purposes and new managed objects.
If you are programming on the .NET Compact Framework, the common language runtime throws this exception when there is not enough memory for internal purposes or new managed objects. To prevent the exception, avoid programming large methods that consume 64 or more kilobytes of memory.

Remarks
Excessive managed memory usage is commonly caused by:

Reading large data sets into memory.

Creating excessive cache entries.

Uploading or downloading large files.

Excessive use of regular expressions or strings while parsing files.

Excessive view state.

Too much data in session state or too many sessions.

This exception may be thrown with an additional message, "Not enough storage is available to complete this operation," when invoking a method on a COM object that returns a user-defined type that contains a safe array (an array of non-fixed size). This is because the .NET Framework cannot marshal a structure field with a safe array type.
-----------------------------------------------
MY QUESTION IS:
I AM USING A DATASET .I HAVE FIXED THE MAXIMUM ROWS TO 99999999.D YOU THINK THAT THIS WILLALLOCATE 999999999ROWS EACH TIME?

ALSO I AM PUTTING LARGE TEXTS IN A STRING.COULD YOU GIVE ME THE MAXIMUM SIZE OF A STRING.


THANKS ALOT.





   Report 
  03-14-2008, 4:38
Ralf Stanke is not online. Last active: 11/21/2008 10:09:37 AM Ralf Stanke



Top 10 Posts
Joined on 05-15-2005
Dubai, U.A.E.
Posts 337
Re: VENTUZ OutOfMemoryException
Hi franc14529

as you can see in your post, there is no general answer for "out of memory" exceptions. It could be everything.
Do you use excessive large textures or other huge resources? The current version of Ventuz (2006, R4.8) can address about 1.7 GB of managed memory.
If you exceed this, the .Net runtime will throw an "out of memory" exception. Some COM servers (DirectShow Codecs) uses this error code to notify a general error - even if it's not really a memory problem. So check movie clips as welll!
You could try to delete parts of you scene and try to figure out what exactly is consuming that much memory.

We inserted the Max-Rows property to avoid that a entire DB is read out. Some client uses the DB nodes to read message from a SMS database with hundreds of thousands of messages - this will definetly kill the machine. ADO.net (used in Ventuz) always reads the entire dataset into memory - the only way to avoid it, is to limit the rows or write a proper SQL script to filter the returned rows.
I would recommend to set the max-rows property never higher that 1000, but it depends on the number and type of the SQL columns you have.

Open the taskmanager and watch the growth of memory usage (ventuz.exe) if you activate (insert/delete) certain parts of your scene.

Good luck!

Ralf


Btw, Ventuz 2008 will have a Resource-Monitor to determine which resource or node is consuming how much memory (system, managed, gfx)

   Report 
  03-14-2008, 4:47
Ralf Stanke is not online. Last active: 11/21/2008 10:09:37 AM Ralf Stanke



Top 10 Posts
Joined on 05-15-2005
Dubai, U.A.E.
Posts 337
Re: VENTUZ OutOfMemoryException

I'm not realy sure, but as the Length property of a string is a signed integer in .Net, the max length of a string can't exceed about 2.1 billion characters, which would consume 4GB of RAM.
So I think, you don't have this sized strings :)

Ralf

   Report