Hi guys,

D3D Device failure during screen lock and also failure during UAC. it's not a big problem for game engine but i made a desktop program with acknex. it's running always. so if i run any setup program, my application crashes by uac. if i locked the windows screen, it's crashes again.

Want to share two videos about problem:
crash after screen lock
crash by uac

it crashes randomly especially if project contain a view.stage. My opinion is the problem is related with render target. Just guessing, still not sure.

i wonder is there anything i can do. i really need to solve this problem. is there any way? Please share your idea and information with me.

Here is the test code which i use in first video:

Code
#include <acknex.h>
#include <default.c>

MATERIAL* test_mat1 = 
{
	effect="Texture TargetMap;
	sampler2D g_samSrcColor = sampler_state { texture = <TargetMap>; MipFilter = Linear;	};
	float4 postprocessing_negative( float2 Tex : TEXCOORD0 ) : COLOR0 
	{
		float3 Color = 1. - tex2D( g_samSrcColor, Tex.xy).xyz;
		return float4(Color,1.);
	}
	technique PostProcess 
	{
		pass p1 
		{
			AlphaBlendEnable = false;
			VertexShader = null;
			PixelShader = compile ps_2_0 postprocessing_negative();
		}
	}";
}

VIEW* post_view1 ={layer = 0; flags = PROCESS_TARGET; material=test_mat1;}
function d3dreset()
{
	diag("\n\nD3D DEVICE RESET!\n");
}
function d3dlost()
{
	diag("\n\nD3D DEVICE LOST!\n");
}
function main()
{
	on_d3d_reset=d3dreset;
	on_d3d_lost=d3dlost;
	wait(3);
	level_load("");
	camera.stage = post_view1;  
}




You can test it. i have A7. if you have A8 you will probably get different message like: "3D Hardware Reset Failure."

Last edited by Emre; 09/09/19 20:42. Reason: videos are no longer available