Unable to load Fonts with 'Load_t' function (HEAP Chunks) - strm_pubCurrentPos is unable to read
#1

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



Messages In This Thread
[No subject] - by Andrein95 - 05-10-2021, 11:33 AM
[No subject] - by Desarija - 05-10-2021, 02:36 PM
[No subject] - by Andrein95 - 05-10-2021, 08:14 PM
[No subject] - by Scura - 05-11-2021, 12:16 AM
[No subject] - by Andrein95 - 05-11-2021, 06:49 AM
[No subject] - by Scura - 05-11-2021, 08:53 AM
[No subject] - by Andrein95 - 05-11-2021, 11:38 AM
[No subject] - by Andrein95 - 05-11-2021, 12:13 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)