4 registered members (7th_zorro, Quad, VoroneTZ, 1 invisible),
623
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: video memory and d3d_texfree
[Re: Ch40zzC0d3r]
#465242
04/13/17 20:43
04/13/17 20:43
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
OP
Serious User
|
OP
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
x86 processes can only take a maximum of 2gb ram if the app wasnt compiled with a special flag (/LARGEADDRESSAWARE) which allows to address up to 4gb ram. , maybe its possible to enforce that flag?
Last edited by Reconnoiter; 04/13/17 20:43.
|
|
|
Re: video memory and d3d_texfree
[Re: Reconnoiter]
#465245
04/13/17 22:26
04/13/17 22:26
|
Joined: Jul 2004
Posts: 785 Serbia
Iglarion
User
|
User
Joined: Jul 2004
Posts: 785
Serbia
|
x86 processes can only take a maximum of 2gb ram if the app wasnt compiled with a special flag (/LARGEADDRESSAWARE) which allows to address up to 4gb ram. , maybe its possible to enforce that flag? But we here talking about out of memory problem if game use just 1GB, so something is definitely wrong here. I agre with Superku idea about one unofficial relase for us who have this problem. I just hope is possible to put some extra debuging in engine to finally isolate the problem. Jcl what do you think about this did you can help somehow? I really understand it's very difficult without enough information and test project say something more, but do you have any advice on what we should pay attention to find reason of this error. Too many people with a completely different games have this problem, but none of us has any idea why this is happening.
|
|
|
Re: video memory and d3d_texfree
[Re: Reconnoiter]
#465248
04/14/17 09:46
04/14/17 09:46
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
@Superku, could try setting this d3d_texdepth = 16; before level loading? (so e.g. in your main function) Never tried that but I'm not trying to avoid this error message, I'm trying to isolate (and indirectly fix) that bug or error. As I've said the game even gave me the DirectX error on my laptop (8GB RAM) while using less than 300 MB according to the task manager. Trying to avoid that error by various measures is not helping, it's rather counterproductive IMO.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: video memory and d3d_texfree
[Re: jcl]
#465380
04/22/17 01:52
04/22/17 01:52
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
void main()
{
fps_max = 60;
video_mode = 6;
camera.stage = view_create(0);
set(camera.stage,PROCESS_TARGET);
level_load(NULL);
me = ent_create(CUBE_MDL,vector(128,0,0),NULL);
var videoSwitchCounter = 32;
var videoSwitchMode = 8;
while(1)
{
my.pan += 6*time_step;
draw_text(str_printf(NULL,"d3d_texbmaps: %.1f",(double)d3d_texbmaps),20,20,COLOR_WHITE);
videoSwitchCounter = maxv(videoSwitchCounter-time_step,0);
if(!videoSwitchCounter)
{
videoSwitchCounter = 16;
videoSwitchMode++;
if(videoSwitchMode > 12) videoSwitchMode = 8;
video_switch(videoSwitchMode,0,2);
}
wait(1);
}
}
d3d_texbmaps rises continuously (except a small bump going from highest to lowest resolution). Let a similar more resource heavy test run until > 65GB. Does that make sense? Is this just a bug with the variable d3d_texbmaps (like that one nexus variable bug) or something else with the memory allocation for the post processing stage (target)?
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: video memory and d3d_texfree
[Re: jcl]
#465397
04/24/17 15:01
04/24/17 15:01
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
But can't you just check and print the d3d_tex... variables in several steps during initialization of your game? This should tell you where the problem is. Maybe some particularly large textures. [...] But you should still be able to find the problem this way when you don't change the resolution.
I'm sorry but I don't really understand how. Here's the IMO relevant part of the acklog just created:
Video memory found: 4094 MB
main_event() at frame 4... (nexus: 31.7/ 150.0) (sys_memory: 219.3) (d3d_texfree: 4072.0) (d3d_texbmaps: 1.0) (d3d_texskins: 0.0) (d3d_texsmaps: 0.0) (d3d_texsurfs: 0.0).
create_rendertargets() START at frame 17... (nexus: 35.8/ 150.0) (sys_memory: 219.3) (d3d_texfree: 4071.0) (d3d_texlimit: 8192.0) (d3d_texbmaps: 1.0) (d3d_texskins: 0.0) (d3d_texsmaps: 0.0) (d3d_texsurfs: 0.0)
bmap_createblackDEBUG(1920,1080,24)...DONE. (CAMTARG1, d3d_texbmaps: 1.0)
bmap_createblackDEBUG(1920,1080,24)...DONE. (KUREF, d3d_texbmaps: 1.0)
bmap_createblackDEBUG(1920,1080,24)...DONE. (REFRAC, d3d_texbmaps: 1.0)
bmap_createblackDEBUG(1920,1080,24)...DONE. (CAMBMAP, d3d_texbmaps: 1.0)
bmap_createblackDEBUG(960,540,24)...DONE. (COMBINE, d3d_texbmaps: 1.0)
bmap_createblackDEBUG(480,270,24)...DONE. (BLOOM2, d3d_texbmaps: 1.0)
bmap_createblackDEBUG(1920,1080,24)...DONE. (COMBINE2, d3d_texbmaps: 1.0)
bmap_createblackDEBUG(1920,1080,24)...DONE. (LOADDISPLAY, d3d_texbmaps: 1.0)DONE
MEMORY NOW (after all bmap creations): (nexus: 35.8/ 150.0) (sys_memory: 219.3) (d3d_texfree: 4071.0) (d3d_texlimit: 8192.0) (d3d_texbmaps: 1.0) (d3d_texskins: 0.0) (d3d_texsmaps: 0.0) (d3d_texsurfs: 0.0) (sum: 1.0MB)
level_load(NULL)
main_event() at frame 20... (nexus: 42.8/ 150.0) (sys_memory: 219.4) (d3d_texfree: 4071.0) (d3d_texbmaps: 26.0) (d3d_texskins: 0.0) (d3d_texsmaps: 0.0) (d3d_texsurfs: 0.0)
main_event() at frame 21... (nexus: 42.8/ 150.0) (sys_memory: 219.4) (d3d_texfree: 4045.0) (d3d_texbmaps: 111.3) (d3d_texskins: 0.0) (d3d_texsmaps: 0.0) (d3d_texsurfs: 0.0)
main_event() at frame 22... (nexus: 42.8/ 150.0) (sys_memory: 219.4) (d3d_texfree: 3993.0) (d3d_texbmaps: 111.3) (d3d_texskins: 0.0) (d3d_texsmaps: 0.0) (d3d_texsurfs: 0.0)
level_load(...)
main_event() at frame 57... (nexus: 61.2/ 150.0) (sys_memory: 219.4) (d3d_texfree: 3993.0) (d3d_texbmaps: 111.3) (d3d_texskins: 0.0) (d3d_texsmaps: 0.4) (d3d_texsurfs: 0.1)
// now playing the game normally, task manager RAM usage at 1060MB
main_event() at frame 394... (nexus: 64.0/ 150.0) (sys_memory: 219.4) (d3d_texfree: 3962.0) (d3d_texbmaps: 127.5) (d3d_texskins: 4.5) (d3d_texsmaps: 0.4) (d3d_texsurfs: 0.1)
All values are the same as they used to be, right now it doesn't crash though. I had the d3d_... stuff in place before when it was crashing every time, did not see anything unusual there. I don't think I've even added a single new texture or changed an old one (in size), just stuff in the code. This cannot be "another" compiler related issue like in some past bug hunts where changing stuff in the code lead to crashes (mostly on MDL loading I think), right?
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: video memory and d3d_texfree
[Re: jcl]
#465399
04/24/17 16:32
04/24/17 16:32
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
Yes, sorry, I meant the old "Error E2005: Can't create DirectX texture unnamed D3D_TexCreate: 8007000e - E_OUTOFMEMORY" message. Got this message again 15min ago after switching resolutions a couple of times. However, I noticed I can continue playing after closing all of these messages. In fact, depending on the size of the resolution I get 0, 1 (just once) or 8 E_OUTOFMEMORY errors which is the number of newly (re-)allocated render targets. The error messages appear at the end of the frame (esp. after all bmap_createblack(DEBUG) calls in the log above and after MEMORY NOW). I had added a GetAvailableTextureMem() call after my previous post. It returned (GetAvailableTextureMem: 4278190080) before the D3D messages. What can I do or try next? EDIT: The ninja edit! -> However, I've meanwhile looked through some developer forums and it seems that E_OUTOFMEMORY can also happen when in fact memory is still available. [...] After closing all of the E_OUTOFMEMORY errors it seems like I can continue playing normally with my render chain still in tact. The bitmap pointers all have received new and non-zero addresses, too.
Last edited by Superku; 04/24/17 16:35.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
|