Assert: "Error alloc too large, increase frame size!"
by Brian Batchelor · in Torque Game Engine · 08/23/2004 (8:35 am) · 15 replies
In frameallocator.h line 72
AssertFatal(smWaterMark + allocSize <= smHighWaterMark, "Error alloc too large, increase frame size!");
is failing when i load a mission... any ideas? Thanks.
AssertFatal(smWaterMark + allocSize <= smHighWaterMark, "Error alloc too large, increase frame size!");
is failing when i load a mission... any ideas? Thanks.
About the author
#2
08/23/2004 (6:16 pm)
One thing that can cause this is a too high view distance on terrain.
#3
08/24/2004 (3:55 am)
Aha! that was it; too big a view distance. Thanks both of you for your quick answers.
#4
08/28/2004 (11:20 am)
Interesting fact: The TSE terrain is much less susceptible to that problem. :)
#5
I'm still using the same .mis and .ter files that I was using with the stock RTS stuff. Do I need to modify these files in some way for TSE?
The "visibleDistance" parameter in the Sky object is set to 600, in case that matters.
Here's the stack trace:
TSE_DEBUG.exe!FrameAllocator::alloc(const unsigned int allocSize=96) TSE_DEBUG.exe!TerrainRender::allocRenderEdges(unsigned int edgeCount=2, EdgeParent * * dest=0x0146d620, bool renderEdge=true)
TSE_DEBUG.exe!TerrainRender::subdivideChunkEdge(ChunkScanEdge * e=0x0146d614, Point2I pos={...}, bool chunkEdge=true)
TSE_DEBUG.exe!TerrainRender::processBlock(SceneState * __formal=0x05366240, EdgeParent * topEdge=0x013c14cc, EdgeParent * rightEdge=0x013c1498, EdgeParent * bottomEdge=0x01150a34, EdgeParent * leftEdge=0x012f6108)
TSE_DEBUG.exe!TerrainRender::renderBlock(TerrainBlock * block=0x02fe6780, SceneState * state=0x05366240, MatInstance * m=0x0012e748, SceneGraphData & sgData={...})
TSE_DEBUG.exe!TerrainBlock::renderObject(SceneState * state=0x05366240, SceneRenderImage * img=0x05393dc0)
03/21/2005 (4:47 pm)
I'm getting this same problem with TSE when I tried to port the RTS stuff over to it. The game comes up fine at first because the initial view angle causes only a fairly small amount of terrain to be in view, but when I try to tilt the camera up to see the horizon, I get this error. I tried increasing the max alloc size from 3 megs to 4 megs but no dice.I'm still using the same .mis and .ter files that I was using with the stock RTS stuff. Do I need to modify these files in some way for TSE?
The "visibleDistance" parameter in the Sky object is set to 600, in case that matters.
Here's the stack trace:
TSE_DEBUG.exe!FrameAllocator::alloc(const unsigned int allocSize=96) TSE_DEBUG.exe!TerrainRender::allocRenderEdges(unsigned int edgeCount=2, EdgeParent * * dest=0x0146d620, bool renderEdge=true)
TSE_DEBUG.exe!TerrainRender::subdivideChunkEdge(ChunkScanEdge * e=0x0146d614, Point2I pos={...}, bool chunkEdge=true)
TSE_DEBUG.exe!TerrainRender::processBlock(SceneState * __formal=0x05366240, EdgeParent * topEdge=0x013c14cc, EdgeParent * rightEdge=0x013c1498, EdgeParent * bottomEdge=0x01150a34, EdgeParent * leftEdge=0x012f6108)
TSE_DEBUG.exe!TerrainRender::renderBlock(TerrainBlock * block=0x02fe6780, SceneState * state=0x05366240, MatInstance * m=0x0012e748, SceneGraphData & sgData={...})
TSE_DEBUG.exe!TerrainBlock::renderObject(SceneState * state=0x05366240, SceneRenderImage * img=0x05393dc0)
#6
Can anyone shed some light on why this happens in TSE but not in TGE/RTS? Any tips on debugging it? For that matter, since it's really a TSE question now (for me) would it be better if I posted it in the TSE forums?
Thanks!
04/01/2005 (9:18 am)
*bump* (not to be a pest or anything) :-)Can anyone shed some light on why this happens in TSE but not in TGE/RTS? Any tips on debugging it? For that matter, since it's really a TSE question now (for me) would it be better if I posted it in the TSE forums?
Thanks!
#7
Did you change the blockSize or anything?
In general things like the terrain will have their usage go up exponentially with higher view distances. Try doubling or tripling the frame allocator size.
04/02/2005 (1:49 pm)
Yes, TSE forums are place to go.Did you change the blockSize or anything?
In general things like the terrain will have their usage go up exponentially with higher view distances. Try doubling or tripling the frame allocator size.
#8
04/04/2005 (1:39 pm)
Hi Ben. I'm using the frenzy.ter and frenzy.mis that came with the RTS kit, but I changed the terrain to use a completely flat heightmap. I also changed the squareSize from 5 to 8, but I don't think I changed anything else. I'll try bumping up the allocator size and if that doesn't work I'll post this over in the TSE forum. Thanks!
#9
04/04/2005 (8:20 pm)
Have you tried sticking a tiny little bump somewhere on the terrain?
#10
04/04/2005 (8:24 pm)
Ummm why would that make any difference Ben?
#11
(On another thread, it seems the problem might be a borked terrain renderer codebase...)
04/06/2005 (12:41 pm)
Because of certain calculations done using the height range of the terrain, of course.(On another thread, it seems the problem might be a borked terrain renderer codebase...)
#12
and for me, its a similar problem..i didnt change the height of the camera, but the square size of the terrain block, so i ll have more details on it.
it crashes. not immediatly, but after some moving around.
also, another thing which occurs is, that im unable to paint anymore, the brushes have blue color and no effect while painting textures. but that's for another thread.
greetings
ka
05/06/2005 (7:47 am)
I got the same error, and for me, its a similar problem..i didnt change the height of the camera, but the square size of the terrain block, so i ll have more details on it.
it crashes. not immediatly, but after some moving around.
also, another thing which occurs is, that im unable to paint anymore, the brushes have blue color and no effect while painting textures. but that's for another thread.
greetings
ka
#13
05/06/2005 (11:31 pm)
What is your square size, and whwat is your view distance?
#14
greetings
ka
05/07/2005 (6:41 am)
It appears at all squaresizes smaller then 6 und my view distance is the standard one, i didnt alter it.greetings
ka
#15
12/05/2012 (5:31 am)
For the iPhone I increase it to 4096 * 1024 in the lines just above that to overcome the error.#ifdef TORQUE_OS_IPHONE //3MB default is way too big for iPhone!!! #ifdef TORQUE_SHIPPING FrameAllocator::init(512 * 1024); //256KB for now... but let's test and see! #else FrameAllocator::init(4096 * 1024); //512KB for now... but let's test and see! #endif //TORQUE_SHIPPING #else FrameAllocator::init(3 << 20); // 3 meg frame allocator buffer #endif //TORQUE_OS_IPHONE
Torque 3D Owner Pat Wilson
To increase the frame size, look in main.cc, there should be a FrameAllocater call, the argument is ( 3 << 20 ), IE 3 megs. Increase it.