![]() |
|
Unable to load Fonts with 'Load_t' function (HEAP Chunks) - strm_pubCurrentPos is unable to read - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193) +---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157) +----- Forum: Ep4 Support (https://lckb.dev/forum/forumdisplay.php?fid=128) +----- Thread: Unable to load Fonts with 'Load_t' function (HEAP Chunks) - strm_pubCurrentPos is unable to read (/showthread.php?tid=4732) |
- Andrein95 - 05-10-2021 Hello to everybody. I'm blocked with this problem. I've tryed many source code and this thing happen every time, so I would like to share my problem if i'm doing something wrong or I'm using a bad source code. First of all I've not modified any particoular code to have this behaviour. I'm using different version of code (March and June for now) and I noticed that everytime there is a Heap memory problem reading chunks (correct me if i'm wrong). What's going on? I'll try to explain: 1)Nkps starts 2) Call engine and initialize fonts with SE_LoadDefaultFonts() 3) Here its opened Fonts/Standard.fnt 4) Using CFontData::Read_t we read the file decrypting the header 5) In every version crashes inFile->PeekID_t()==CChunkID("FTTF") 6) This function call Read_t( &cidToReturn.cid_ID[0], CID_LENGTH); where actually &cidToReturn.cid_ID[0] is ' ' (32 Ascii) 7) Read_t is an inline function of stream.h header. Setting in Engine projects (C/C++ -> Optimization -> Disabling Inline function expansion) I can debug the function but I can't resolve. ? In Read_t inline functions the instruction that crashes is: memcpy( (char *)pvBuffer, strm_pubCurrentPos, slSize); where strm_pubCurrentPos is every time this : strm_pubCurrentPos = 0x06400000 <Error reading characters of string.> Disabling 'break when this exception is thrown' will cause problem. Using vs try/except does not make sense . enable Yes with SEH Exceptions (/EHa) to catch this exception does not solve the problem too. To summarize, how do you turn around to this problem? The real problem is in World Editor, infact i can't skip this exception. Any help / tips/ comment will be appreciated. Thanks in advance. 2 2 - Desarija - 05-10-2021 Which client are you using with these sources? - Andrein95 - 05-10-2021 5 hours ago, Desarija said: Which client are you using with these sources? I'm using reza release with 1776 client. I get this with clean files, no modification. I also used Reco_Csrc client but I got the same error. - Scura - 05-11-2021 In which profile have you compiled the client? Have you followed the reza's guide? Have you disabled the isdebugpresent function? - Andrein95 - 05-11-2021 6 hours ago, Scura said: In which profile have you compiled the client? Have you followed the reza's guide? Have you disabled the isdebugpresent function? I've compiled in 'Debug' mode, copying USALIVE configs, in preprocessors I have: G_USA _CLIENT_ _USE_32BIT_TIME_T WIN32 _WINDOWS _USRDLL ENGINE_EXPORTS I missed the 'isdebugpresent' function, what is it? - Scura - 05-11-2021 2 hours ago, Andrein95 said: I've compiled in 'Debug' mode, copying USALIVE configs, in preprocessors I have: G_USA _CLIENT_ _USE_32BIT_TIME_T WIN32 _WINDOWS _USRDLL ENGINE_EXPORTS I missed the 'isdebugpresent' function, what is it? a function for avoid reverse. Is a simple Windows api, you can find it under "void CNetworkLibrary::MainLoop(void)" function. You should find a bool "bIsDebuggerPresent" - Andrein95 - 05-11-2021 2 hours ago, Scura said: a function for avoid reverse. Is a simple Windows api, you can find it under "void CNetworkLibrary::MainLoop(void)" function. You should find a bool "bIsDebuggerPresent" Thanks for this tips, since it was under a preprocessor if ( ! LC_USA) it is skipped. Btw I can see that in release mode ( where is not defined #define DEBUG 1 ) the program does not crash but in debug this keep crash. Should I build WorldEditor in Release mode? - Andrein95 - 05-11-2021 As you can see in this case I can't skip this error. (Debug Mode of World Editor using Engine in Debug Mode) 2 |