Gamestudio Links
Zorro Links
Newest Posts
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
folder management functions
by 7th_zorro. 04/15/24 10:10
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, rki, 7th_zorro, Volkovstudio, Aku_Aku), 346 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Unfreed memory: TFX #464539
02/24/17 12:55
02/24/17 12:55
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Hello!
I have a bunch of unfreed memory warnings in my acklog.txt after a regular exit, with the tag "TFX".
Click to reveal..
Quote:
Unfreed: 1507, TFX, 8 bytes
Unfreed: 1510, TFX, 8 bytes
Unfreed: 1601, TFX, 8 bytes
Unfreed: 1604, TFX, 8 bytes
Unfreed: 1762, TFX, 8 bytes
Unfreed: 1767, TFX, 8 bytes
Unfreed: 1779, TFX, 8 bytes
Unfreed: 1782, TFX, 8 bytes
Unfreed: 1787, TFX, 8 bytes
Unfreed: 1790, TFX, 8 bytes
Unfreed: 1795, TFX, 8 bytes
Unfreed: 1798, TFX, 8 bytes
Unfreed: 1806, TFX, 8 bytes
Unfreed: 1809, TFX, 8 bytes
Unfreed: 1813, TFX, 8 bytes
Unfreed: 1816, TFX, 8 bytes
Unfreed: 1824, TFX, 8 bytes
Unfreed: 1827, TFX, 8 bytes
Unfreed: 1900, TFX, 8 bytes
Unfreed: 1903, TFX, 8 bytes
Unfreed: 2133, TFX, 8 bytes
Unfreed: 2136, TFX, 8 bytes
Unfreed: 2285, TFX, 8 bytes
Unfreed: 2288, TFX, 8 bytes
Unfreed: 2294, TFX, 8 bytes
Unfreed: 2297, TFX, 8 bytes
Unfreed: 2336, TFX, 8 bytes
Unfreed: 2339, TFX, 8 bytes
Unfreed: 2406, TFX, 8 bytes
Unfreed: 2409, TFX, 8 bytes
Unfreed: 2414, TFX, 8 bytes
Unfreed: 2417, TFX, 8 bytes
Unfreed: 2425, TFX, 8 bytes
Unfreed: 2428, TFX, 8 bytes
Unfreed: 2474, TFX, 8 bytes
Unfreed: 2477, TFX, 8 bytes
Unfreed: 2523, TFX, 8 bytes
Unfreed: 2526, TFX, 8 bytes
Unfreed: 2529, TFX, 8 bytes
Unfreed: 2532, TFX, 8 bytes
Unfreed: 2538, TFX, 8 bytes
Unfreed: 2541, TFX, 8 bytes
Unfreed: 2545, TFX, 12 bytes
Unfreed: 2548, TFX, 12 bytes
Unfreed: 2552, TFX, 8 bytes
Unfreed: 2555, TFX, 8 bytes

As I cannot find this tag anywhere in my files (and it does not follow my tag scheme) I assume it's something in the engine. Maybe some unicode (truetype font) issue?
It would be great if you could tell me its meaning as well as optionally give a hint where to look for memory issues.
Thanks!


"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: Unfreed memory: TFX [Re: Superku] #464545
02/24/17 16:58
02/24/17 16:58
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
TFX is memory allocated for material techniques.

Re: Unfreed memory: TFX [Re: jcl] #464547
02/24/17 18:45
02/24/17 18:45
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I see!
For a bunch of materials I use the same file but with two techniques (camera + refraction/ special view), like this:

Click to reveal..
Code:
MATERIAL* mat_water_camera =
{
	technique = "camera";
	effect = "water_crcombo.fx";
	flags = AUTORELOAD;
}

MATERIAL* mat_water_refrac =
{
	technique = "refrac";
	effect = "water_crcombo.fx";
	flags = AUTORELOAD;
}

var mat_water_event()
{
	if(render_view == camera) mtl = mat_water_camera;
	else mtl = mat_water_refrac;
	return 0;	
}

MATERIAL* mat_water =
{
	event = mat_water_event;
	flags = AUTORELOAD | ENABLE_RENDER;
}


When I comment out all "technique =" lines in the material definitions there are no TFX memory leaks. Could this be an issue in the engine?
=> seems like it:

Click to reveal..
Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

MATERIAL* my_technique_mat1 =
{
	technique = "first";
	effect = "technique.fx";
	flags = AUTORELOAD;
}

MATERIAL* my_technique_mat2 =
{
	technique = "second";
	effect = "technique.fx";
	flags = AUTORELOAD;
}

void main()
{
	fps_max = 60;
	level_load(NULL);
	you = ent_create(SPHERE_MDL,vector(128,0,32),NULL);
	your.material = my_technique_mat1;
	me = ent_create(CUBE_MDL,vector(128,0,-32),NULL);
	my.material = my_technique_mat2;
	while(1)
	{
		my.pan += 5*time_step;
		my.tilt += 5*time_step;
		wait(1);
	}
}

// technique.fx

const float4x4 matWorldViewProj;
const float4x4 matWorld;
const float fAmbient;
const float4 vecSunDir;

texture entSkin1;

sampler ColorMapSampler = sampler_state 
{ 
   Texture = <entSkin1>; 
   AddressU  = Clamp; 
   AddressV  = Clamp; 
}; 
    
void DiffuseVS( 
   in float4 InPos: POSITION, 
   in float3 InNormal: NORMAL, 
   in float2 InTex: TEXCOORD0, 
   out float4 OutPos: POSITION, 
   out float2 OutTex: TEXCOORD0, 
   out float3 OutNormal: TEXCOORD1) 
{ 
   OutPos = mul(InPos, matWorldViewProj); 
   OutNormal = normalize(mul(InNormal, matWorld));
   OutTex = InTex; 
} 
    
float4 DiffusePS( 
   in float2 InTex: TEXCOORD0, 
   in float3 InNormal: TEXCOORD1): COLOR 
{ 
	InNormal = normalize(InNormal);
   float4 Diffuse = saturate(dot(-vecSunDir, InNormal)*2); 
   float4 Color = tex2D(ColorMapSampler, InTex); 
   float4 final = Color*Diffuse;
  
   return (1+fAmbient) * final; 
} 

float4 SecondPS( 
   in float2 InTex: TEXCOORD0, 
   in float3 InNormal: TEXCOORD1): COLOR 
{ 
	InNormal = normalize(InNormal);
   float4 Diffuse = saturate(dot(-vecSunDir, InNormal)*2); 
   float4 Color = tex2D(ColorMapSampler, InTex); 
   float4 final = Color*Diffuse;
  
   return (1+fAmbient) * final*float4(1,0,0,1); 
} 
 

technique first 
{ 
   pass P0 
   { 
      VertexShader = compile vs_3_0 DiffuseVS(); 
      PixelShader  = compile ps_3_0 DiffusePS(); 
   } 
}

technique second 
{ 
   pass P0 
   { 
      VertexShader = compile vs_3_0 DiffuseVS(); 
      PixelShader  = compile ps_3_0 SecondPS(); 
   } 
}



"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: Unfreed memory: TFX [Re: Superku] #464724
03/07/17 10:09
03/07/17 10:09
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I can confirm that. The techniques are released, but at the wrong place, after the memory leak check. This is a bug and will be fixed in the next update. Until then it can be safely ignored, aside from the message it is not harmful.

Re: Unfreed memory: TFX [Re: jcl] #464729
03/07/17 10:33
03/07/17 10:33
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Oh right, okay and thanks!
I already split all the files but good to know for the future.


"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

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1