OutOfMemoryException

Feb 27, 2008 at 10:58 AM
Edited Feb 27, 2008 at 11:01 AM
Hi all,
I'm trying the library with diferent avi videos, and getting two different exceptions at compile time. The first is:

Error 1 Building content threw OutOfMemoryException: Se produjo una excepción de tipo 'System.OutOfMemoryException'.
en System.IO.MemoryStream.set_Capacity(Int32 value)
en System.IO.MemoryStream.EnsureCapacity(Int32 value)
en System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
en System.IO.BinaryWriter.Write(Byte[] buffer)
en Scurvy.Media.Pipeline.Video.VidContentWriter`1.Write(ContentWriter output, T value) en C:\Dev\codeplex\ScurvyMedia\Scurvy.Media\Scurvy.Media.Pipeline\Video\VidContentWriter.cs:línea 41
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentTypeWriter`1.Write(ContentWriter output, Object value)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentWriter.InvokeWriterT(T value, ContentTypeWriter writer)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentWriter.WriteObjectT(T value)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentCompiler.Compile(Stream output, Object value, TargetPlatform targetPlatform, String rootDirectory, String referenceRelocationPath)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.SerializeOutputAsset(BuildItem item, Object assetData, String outputFilename)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.SerializeAsset(BuildItem item, Object assetData)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
en Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings) C:\PROJECTES\VISUAL STUDIO\VJPlayer\VJPlayer\Content\Pillados - Borracha Follando.avi VJPlayer


Does it mean video is to large? It's about 18 MB...

(I'll post the other issue on a different thread)
Coordinator
Apr 11, 2008 at 6:50 PM
Hi Didac, yes, this is currently a known issue playing videos of a certain size. It is due to the way that the content pipeline reads everything into a memory stream before writing it to the XNB file. I'm working on a way to work around that, but don't have an ETA on the fix just now.


Didac wrote:
Hi all,
I'm trying the library with diferent avi videos, and getting two different exceptions at compile time. The first is:

Error 1 Building content threw OutOfMemoryException: Se produjo una excepción de tipo 'System.OutOfMemoryException'.
en System.IO.MemoryStream.set_Capacity(Int32 value)
en System.IO.MemoryStream.EnsureCapacity(Int32 value)
en System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
en System.IO.BinaryWriter.Write(Byte[] buffer)
en Scurvy.Media.Pipeline.Video.VidContentWriter`1.Write(ContentWriter output, T value) en C:\Dev\codeplex\ScurvyMedia\Scurvy.Media\Scurvy.Media.Pipeline\Video\VidContentWriter.cs:línea 41
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentTypeWriter`1.Write(ContentWriter output, Object value)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentWriter.InvokeWriterT(T value, ContentTypeWriter writer)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentWriter.WriteObjectT(T value)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler.ContentCompiler.Compile(Stream output, Object value, TargetPlatform targetPlatform, String rootDirectory, String referenceRelocationPath)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.SerializeOutputAsset(BuildItem item, Object assetData, String outputFilename)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.SerializeAsset(BuildItem item, Object assetData)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
en Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings) C:\PROJECTES\VISUAL STUDIO\VJPlayer\VJPlayer\Content\Pillados - Borracha Follando.avi VJPlayer


Does it mean video is to large? It's about 18 MB...

(I'll post the other issue on a different thread)

Oct 31, 2008 at 2:49 PM
Hi,

I've got the same error, though my video is only 3.9 MB.
Is Scurvy dependend on the PC-Architecture too?




Jan 18, 2009 at 11:38 PM
I am also getting this error. My video was 9mb. I am going to want to use larger video files. Is there a fix for this?

thanks,

Wes
Feb 3, 2009 at 2:11 PM
Edited Feb 3, 2009 at 2:12 PM
I'm having the same error, but I've noticed that my XNA game is loading song files which are bigger than 20mb and go through the content importer. This means there must be a way to get passed that limit if we get it done the same way audio is imported.

I realize this thread is pretty old but i haven't found any fixes anywhere so i'll assume and hope that people are still working on it :p
Feb 27, 2009 at 12:54 PM
There seems to be still problem with bigger video files - is there any workaround?
What is maximum size supported?
Feb 27, 2009 at 2:53 PM
i noticed the max filesize is about 1.2mb... but it's weird because I've had songs in my game bigger than that, so there must be a workaround for the limit.
Feb 27, 2009 at 4:14 PM

Joel?
 
Is the same problem in XBox version as well or only x86?
My opinion is that this should be in the issues list as a top priority?

According to first post in a list it has been problem for a long time... has anyone got this code working properly?