Thanks for looking into it. I'm rather certain that the crash happens in bmap_process though. Here's my on_level event:

Code:
void level_load_progress(var percent)
{
	cprintf1("nLLPM(%d)",(int)percent);
	if(percent < 5) pp_renderchain_debug(0);
	int hresult = material_update_float(pp_levelload_mat, "loadpercent", percent);
	cprintf1(" MUF(%d) ",hresult);

	cprintf4("m(ll %p, rc %p, mat %p, effect %p)",levelload_bmap,renderchain_bmap,pp_levelload_mat, pp_levelload_mat->d3deffect);
	bmap_process(levelload_bmap,renderchain_bmap,pp_levelload_mat);
	cprintf0("b");

	draw_quad(levelload_bmap,nullvector,NULL,NULL,NULL,NULL,100,0);
	cprintf0("d");
	material_update_float(emotesTransition_mat, "loadpercent", percent);
	cprintf0("f");
	draw_obj(entEmotesTransition);
	cprintf0("e");
	level_load_percent = percent;
}



Click to reveal..
Code:
// made by Rackscha, adapted by Superku

//#define DEVTRUE

#ifndef Console_h
	#define Console_h
	#include<windows.h>;

	long WINAPI WriteConsole(int Handle, char* Buffer, int CharsToWrite, int* CharsWritten, int reserved);
	long WINAPI CreateConsoleScreenBuffer(long dwDesiredAccess, long dwShareMode, long *lpSecurityAttributes, long dwFlags, long lpScreenBufferData);
	long WINAPI SetConsoleActiveScreenBuffer(long hConsoleOutput);
	long GConsoleBuffer;
	int consoleInitialized = 0;
	#ifdef DEVTRUE
		int consolePrintTrue = 1;
		#else
		int consolePrintTrue = 0;
	#endif
	int consolePrintTarget = 2; // 2

	void consoleInit()
	{
		if(consoleInitialized) return;
		consoleInitialized = 1;
		AllocConsole();
		GConsoleBuffer = CreateConsoleScreenBuffer(GENERIC_WRITE, FILE_SHARE_READ, 0, CONSOLE_TEXTMODE_BUFFER, 0);
		SetConsoleActiveScreenBuffer(GConsoleBuffer);	
		//SetWindowPos( GConsoleBuffer, 0, -800, -100, 0, 0, SWP_NOSIZE | SWP_NOZORDER );
		//MoveWindow( GConsoleBuffer, -600, -100, 0, 0, TRUE);
	}

	void cdiag(char* AText)
	{
		if(!consolePrintTrue) return;
		if(consolePrintTarget) diag(AText);
		if(consolePrintTarget == 0 || consolePrintTarget == 2)
		{
			if(!consoleInitialized) consoleInit();
			WriteConsole(GConsoleBuffer, AText, str_len(AText), NULL, 0);
		}
	}
	
	#define cprintf0(str) cdiag(_chr(str)) // time to redo this with var args...
	#define cprintf1(str,arg1) cdiag(_chr(str_printf(NULL,str,arg1)))
	#define cprintf2(str,arg1,arg2) cdiag(_chr(str_printf(NULL,str,arg1,arg2)))
	#define cprintf3(str,arg1,arg2,arg3) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3)))
	#define cprintf4(str,arg1,arg2,arg3,arg4) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4)))
	#define cprintf5(str,arg1,arg2,arg3,arg4,arg5) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4,arg5)))
	#define cprintf6(str,arg1,arg2,arg3,arg4,arg5,arg6) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4,arg5,arg6)))
	#define cprintf7(str,arg1,arg2,arg3,arg4,arg5,arg6,arg7) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4,arg5,arg6,arg7)))
	#define cprintf8(str,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)))
	#define cprintf9(str,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)))
	#define cprintf10(str,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10)))
#endif



It's crashing after "[...]effect %p" and before "b". Usually the console is on point (and the acklog).

Btw. bmap_process crashes when you call it each (/ the same) frame, have the material's AUTORELOAD flag set and save the *.fx file. I never really questioned it as I've thought some d3d pointer got invalid that frame at least but maybe... it actually shouldn't and there's something else going on?


"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