Jump to content
Einlander

Memory Allocation Error

Recommended Posts

I was trying to run my game from the exe, but I keet running into memory allocation errors.

It reaches around 290mb ram in the windows task manager, then quits.

 

If I load the Leadwerks editor and start it, it runs, but it will not run from the exe.

 

Initializing Lua...
Executing file "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Scripts/Error.lua"
Executing file "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Scripts/App.lua"
Initializing OpenGL4 graphics driver...
OpenGL version 431
GLSL version 430
Device: AMD Radeon R7 200 Series
Loading map "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Maps/Hotel_Holdout v2.map"...
Loading model "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/characters/generic/generic.mdl"
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/bricks/bricklargebare0168_7_small.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/bricks/BrickLargeBare0168_7_Small.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/bricks/BrickLargeBare0168_7_Small_dot3.tex..."
Loading shader "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Shaders/Model/diffuse+normal.shader"...
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/developer/bluegrid.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/developer/BlueGrid.tex..."
Loading shader "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Shaders/Model/diffuse.shader"...
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/bricks/brickround0044_5_small.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/bricks/brickround0044_5_small.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/bricks/brickround0044_5_small_dot3.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/metal/metalplateszinc0014_3_small.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/metal/metalplateszinc0014_3_small.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/metal/metalplateszinc0014_3_small_dot3.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/concrete/concrete_dirty.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/concrete/concrete_dirty_diff.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/concrete/concrete_dirty_dot3.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/concrete/concrete_dirty_spec.tex..."
Loading shader "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Shaders/Model/diffuse+normal+specular.shader"...
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/developer/orangegrid.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/developer/orangegrid.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/developer/greygrid.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/developer/greygrid.tex..."
Loading prefab "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/prefabs/vehicles/pickuptruck.pfb"...
Loading model "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/pickuptruck.mdl"
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/truck_black.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/truck_black_diff.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/truck_nmap.tex..."
Loading shape "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/pickuptruck.phy..."
Loading model "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/tiretruck.mdl"
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/trucktire.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/trucktire_diff.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/trucktire_nmap.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/vehicles/trucktire_spec.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/floors/floorsregular0301_2_medium.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/floors/floorsregular0301_2_medium.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/floors/floorsregular0301_2_small_dot3.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/metal/metalplatesnew0009_1_medium.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/metal/metalplatesnew0009_1_medium.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/metal/metalplatesnew0009_1_medium_dot3.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/developer/greengrid.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/developer/greengrid.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/wallpaper/wallpaperseventies0048_medium.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/wallpaper/WallpaperSeventies0048_Medium.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/carpets/carpetstextureno7620_1600x1200.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/carpets/carpetstextureno7620_1600x1200.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/carpets/carpetstextureno7620_1600x1200_dot3.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/wallpaper/wallpaperforties0033_medium.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/wallpaper/WallpaperForties0033_Medium.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/wood/woodplanksclean0036_1_small.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/wood/woodplanksclean0036_1_small.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/wood/woodplanksclean0036_1_small_dot3.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/plaster/concretestucco0179_12_medium.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/plaster/ConcreteStucco0179_12_Medium.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/wallpaper/wallpaperstextureno8618_1600x1200.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/wallpaper/wallpapersTextureNo8618_1600x1200.tex..."
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/floortiles/tilesbroken0013_2.mat..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/floortiles/tilesbroken0013_2.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/materials/floortiles/tilesbroken0013_2_dot3.tex..."
Loading component "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/scripts/objects/player/fpsplayer.lua..."
Executing file "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/scripts/objects/player/fpsplayer.lua"
Executing file "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Scripts/Functions/ReleaseTableObjects.lua"
Loading component "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/scripts/objects/triggers/simpledestruction.lua..."
Executing file "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/scripts/objects/triggers/simpledestruction.lua"
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Materials/Common/NavMesh.mat..."
Loading shader "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/shaders/model/flat/default.shader"...
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Materials/HUD/crosshair.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Materials/HUD/use.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Materials/HUD/blood1.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Materials/HUD/blood2.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Materials/HUD/blood3.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Materials/HUD/blood4.tex..."
Loading sound "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Sound/Player/flashlight_02_on.wav..."
Loading sound "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Sound/Impact/body_punch_03.wav..."
Loading sound "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Sound/Impact/body_punch_04.wav..."
Loading sound "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Sound/Footsteps/Concrete/step1.wav..."
Loading sound "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Sound/Footsteps/Concrete/step2.wav..."
Loading sound "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Sound/Footsteps/Concrete/step3.wav..."
Loading sound "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Sound/Footsteps/Concrete/step4.wav..."
Loading sound "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Sound/Footsteps/Concrete/jump.wav..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/Materials/Common/bfn.tex..."
Loading prefab "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/prefabs/weapons/autopistol.pfb"...
Loading model "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/weapons/autopistol/fpsautopistol.mdl"
Loading material "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/weapons/autopistol/45_.mat..."
Loading shader "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/shaders/model/animated/diffuse+normal+specular.shader"...
Loading shader "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/shaders/model/shadow/shadow+animation.shader"...
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/weapons/autopistol/45__color.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/weapons/autopistol/45_dot3.tex..."
Loading texture "C:/Users/Einlander/Documents/Leadwerks/Projects/Holdout/models/weapons/autopistol/45_spec.tex..."
Error: Memory allocation error.

 

I have 2 AMD Radeon R7 200's in crossfire, but leadwerks runs in a manner that the crossfire does not enable itself.

 

My specs:

Windows 7 Pro

DirectX 11

8GB Ram

AMD FX™-8350 Eight-Core Processor, 4000 Mhz, 4 Core(s), 8 Logical Processor(s)

2 X (AMD Radeon R7 200 2GB) CrossfireX Enabled

AMD Catalyst 13.12 WHQL

dual 1080p monitors (game runs in one screen anyway)

Share this post


Link to post

Please post your game so that I can produce the issue on my own computer. Thank you.

Share this post


Link to post

Your application only consumes 135 mb of memory when I run it. The memory allocation error is occuring because a malloc call is returning NULL. However, I can't produce the problem so I don't know where this is occurring.

 

When run in debug mode, it should at least open the script editor on the call this occurred on.

 

Is there one particular map this occurs in, and does this happen in debug, release, or both modes?

Share this post


Link to post

This is another one of those works in the editor, but not when I click on the exe situations. It could be the steam grabbing all the gpu ram as you said (I delete the steamapp txt so it technically shouldn't load), it could be the huge textures, but we have compression now,.and I shrunk the texture sizes. So my current map is completely different and without the issues. It may start causing problems when making large detailed worlds though.

 

Is there any debug tools I can run to give you more details? A video of it happening, Skype/go to my PC, session so you can directly test it?

Share this post


Link to post

Video ram won't cause a memory allocation error. It would cause a GL_OUT_OF_MEMORY error.

 

If you had the standard edition you could build the project in Visual Studio and that might provide more info, but it might not work.

 

I wonder if that memory allocation was occurring on a large texture? It doesn't really make sense to me how that could happen though since your app only uses about 130 mb RAM.

Share this post


Link to post

I have standard so ill make a build and see what happens. You'll have to wait about 16h (healthcare industry hours are brutal).

Share this post


Link to post

If it's not giving you problems anymore then maybe it was the textures. Here's the code for the Lua interpreter:

App.h

App.cpp

Share this post


Link to post

I will assume this is fixed unless you say otherwise.

Share this post


Link to post
Guest
This topic is now closed to further replies.
×
×
  • Create New...