1 registered members (SBGuy),
652
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: bmap_process crashes
[Re: jcl]
#475531
12/19/18 12:43
12/19/18 12:43
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
Thanks for looking into it. I'm rather certain that the crash happens in bmap_process though. Here's my on_level event:
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;
}
// 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
|
|
|
Re: bmap_process crashes
[Re: Superku]
#476487
03/04/19 16:12
03/04/19 16:12
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
I've released my game on February 28th and sadly bmap_process causes issues on a bunch of machines, either just crashing the game or spewing file not found messages (regarding fxo files) - game installed in regular full ASCII paths. It was showing the 255 WRS control byte in file names on some machines: https://i.imgur.com/STsNIQ4.pngSo I thought maybe it would go away when I put shaders not into the WRS, no difference though: https://cdn.discordapp.com/attachments/430428194517155861/552159630982119424/unknown.pnghttps://i.imgur.com/mU4u3uu.pngMy custom bmap_process had some issues as well, which I forgot sadly. I will have to look into it. As I expected that that function may cause some trouble I had included a menu settings variable with which you can disable all bmap_process calls. That affects the main menu, in-level leaderboard and name display though. And people have to contact me first or find that info somewhere. Saw a bunch of refunds because of those issues. Can you please look into bmap_process again? Something is not right about it. Maybe the fact that it crashes when you edit an fx file live could be a good starting point. Thank you!!
"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
|
|
|
|