fatal error C1076: compiler limit : internal heap limit...

Problems building or running the engine, queries about how to use features etc.
Oxygen
Gnoblar
Posts: 2
Joined: Wed Dec 15, 2004 10:39 pm

fatal error C1076: compiler limit : internal heap limit...

Post by Oxygen »

hi,

when i try to build the demo project or the tutorial in debug mode, i got those errors ...STLport\stlport\stl\type_traits.h(361) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit. I changed the /Zm value but this doesnt works, the option "_STLP_DEBUG" doesnt works too. I use VC 6.0 with stlport 4.6.2 and i tried stlport version 4.5.3 too, both with the same error. The Ogre Version is 0.15.1. Without the "Additional Include Directories" i can compile the tutorial with skyplane code as debug version, but the programm crahes with the failure:

"Debug Assertion Failed!
Program:....
File: dbgheap.c
Line: 1163

Expression: _BLOCK_TYPE_IS_VALID (pHead->nBlockUse)
"

My Project Setting:
"
/nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\src\win32" /I "..\..\..\OgreMain\include" /I "..\..\..\Dependencies\include" /I "..\src\nvparse" /I "..\src\atifs\include" /I "..\src\glsl\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "RENDERSYSTEM_GL_EXPORTS" /D "OGRE_GL_USE_MULTITEXTURING" /Fp"..\obj\Debug/RenderSystem_GL.pch" /YX /Fo"..\obj\Debug/" /Fd"..\obj\Debug/" /FD /Zm400 /GZ /c
"

I am still a noob ;) so dont blame me :P

Greetings Oxygen
User avatar
dennis
Gremlin
Posts: 157
Joined: Mon Nov 11, 2002 4:21 pm
x 3

Post by dennis »

http://sourceforge.net/tracker/index.ph ... tid=302997

You need to change compiler settings for all debug configurations.
lomburger
Gnoblar
Posts: 1
Joined: Mon Dec 20, 2004 2:23 am

Post by lomburger »

dennis wrote:http://sourceforge.net/tracker/index.ph ... tid=302997

You need to change compiler settings for all debug configurations.
I have the same problem but I am wondering how to apply this patch.
Is there a specific tool to download ?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post by sinbad »

Either you can get cygwin and use the 'patch' tool supplied with that, or simply add /Zm500 to the compiler command line options in your project settings in debug mode.
Oxygen
Gnoblar
Posts: 2
Joined: Wed Dec 15, 2004 10:39 pm

Post by Oxygen »

ok it works ;)

thx and
Merry Christmas and a Happy New Year
WanabeCoder
Kobold
Posts: 26
Joined: Sun Jan 09, 2005 11:04 pm

Post by WanabeCoder »

Er..
Ok.. cygwin is an OS.
Where do I put the .patch file.. and how do I link to it
And how do I type in the debug window?
Eeh? Can you explain HOW to enter the /Zm800 plz?
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8

Post by haffax »

Cygwin is not an OS. It's a DLL that lets you run linux programs (after recompilation) on Windows. Anyway you can just take the patch.exe from this unix tool compilation: unxutils.

Alternativly you can modify all projects per hand (only 41 ;) )
I only have a (german) VC.Net 2003, so your milage may vary.
Right click a project. Choose properties. C/C++->Command Line -> Additional Options. In this Textbox you can add

Code: Select all

/Zm800
team-pantheon programmer
creators of Rastullahs Lockenpracht
WanabeCoder
Kobold
Posts: 26
Joined: Sun Jan 09, 2005 11:04 pm

Post by WanabeCoder »

Thanks <3 Helps a lot
User avatar
crazyman5000
Gnoblar
Posts: 9
Joined: Tue Jan 11, 2005 4:30 am
Location: parent's basement

Post by crazyman5000 »

i've set the /Zm800 flag, but I still get the same error.
i even tried 100 thru 1000!

using VC++ 6, and thats the only error i get.

everything would be great without that b*tch! :cry:
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

have you set the flag for all debug configurations?
User avatar
crazyman5000
Gnoblar
Posts: 9
Joined: Tue Jan 11, 2005 4:30 am
Location: parent's basement

Post by crazyman5000 »

OK /Zm800 is working now for some reason.
monster wrote:have you set the flag for all debug configurations?
don't know what you mean?


i get the " cannot find OGREMain.LIB " error now.

im still working on that, but any tips would be appreciated.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

it needs to be set on all the ogre projects (ogremain, scene managers, plugins, etc) check the patch for details

either you haven't built ogremain.lib, or you haven't set your library path correctly for the project you're building
User avatar
crazyman5000
Gnoblar
Posts: 9
Joined: Tue Jan 11, 2005 4:30 am
Location: parent's basement

Post by crazyman5000 »

i compiled Ogre.dsw

this is what i get:

--------------------Configuration: Plugin_CgProgramManager - Win32 Debug--------------------
Compiling...
OgreCgProgram.cpp
f:\stlport-4.5.3\stlport\stl\type_traits.h(360) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
OgreCgProgramFactory.cpp
f:\stlport-4.5.3\stlport\stl\type_traits.h(360) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
OgreCgProgramManagerDll.cpp
f:\stlport-4.5.3\stlport\stl\type_traits.h(360) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
Error executing cl.exe.

Demo_Shadows.exe - 3 error(s), 0 warning(s)

if /Zm800 will work, where should i add it?
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

in the same place you set it for your other project, but for all the ogre projects, in the project options
User avatar
crazyman5000
Gnoblar
Posts: 9
Joined: Tue Jan 11, 2005 4:30 am
Location: parent's basement

Post by crazyman5000 »

wait... wrong project!

how can i batch build all projects?
Last edited by crazyman5000 on Tue Jan 11, 2005 5:55 am, edited 1 time in total.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

or apply the patch, i think that sets it on all of them, but if just ogre main works then that's fine

yes batch building ogre takes a long time, it's big, but you don't have to do it very often
User avatar
crazyman5000
Gnoblar
Posts: 9
Joined: Tue Jan 11, 2005 4:30 am
Location: parent's basement

Post by crazyman5000 »

Ok im getting confused. which project do i build first?
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

open up ogre.dsw, make any /Zm changes you need and do a batch build, this will build all the ogre libraries, plugins and examples - do that first

when you got the "cannot find ogremain.lib" error you were compiling another project (the demo/tutorial referred to in the first post in this thread?) that was linking to the ogre core libraries - you can't do that until you've built the core libraries
User avatar
crazyman5000
Gnoblar
Posts: 9
Joined: Tue Jan 11, 2005 4:30 am
Location: parent's basement

Post by crazyman5000 »

i get it now. i never worked with multiple projects in one workspace before. it was kind of confusing.

how would i batch build the Ogre workspace?
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

right click the workspace in the project navigator and click batch build? look around on the menus for it? dunno, I don't use VC6
User avatar
crazyman5000
Gnoblar
Posts: 9
Joined: Tue Jan 11, 2005 4:30 am
Location: parent's basement

Post by crazyman5000 »

ok, ill keep reading up on batch building in the help files.
ill get it eventually.

Thank you for all your help, monster! :D

EDIT: just found Batch Build... in the menu. DUH!