Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Last Chaos
You last visited: Today at 18:39

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Common problem EP4 Client when loading Fonts with 'Load_t' function (HEAP Chunks)

Discussion on Common problem EP4 Client when loading Fonts with 'Load_t' function (HEAP Chunks) within the Last Chaos forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2019
Posts: 34
Received Thanks: 2
Question Common problem EP4 Client when loading Fonts with 'Load_t' function (HEAP Chunks)

Hello to everybody.
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.
8) 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 advice?

Thanks in advance.
andrea-titan95 is offline  
Old 05/09/2021, 23:02   #2
 
elite*gold: 13849
Join Date: Oct 2014
Posts: 673
Received Thanks: 219
Did you modified anything in the code?

These errors usually occur because of poor memory mangement, something has not be cleared correctly or something like this..
Lee Ki-Hwan is offline  
Old 05/10/2021, 09:22   #3
 
elite*gold: 0
Join Date: Dec 2019
Posts: 34
Received Thanks: 2
Quote:
Originally Posted by Lee Ki-Hwan View Post
Did you modified anything in the code?

These errors usually occur because of poor memory mangement, something has not be cleared correctly or something like this..
Thanks for your answer.
This is the same thing that I think (infact last chaos engine has a memory tracker management).
Btw I did not touch the stream/serial classes, Infact I started with original last chaos released code.

Wich code are you using?
Is your Standard.font first line like this?
FONN DFNM Fonts\Standard.tex"
andrea-titan95 is offline  
Old 05/10/2021, 13:21   #4
 
elite*gold: 13849
Join Date: Oct 2014
Posts: 673
Received Thanks: 219
I don't think it has something to do with that Stream classes.

As I already mentioned I ran in this kind of problem only, when I had poor memory management, if you have made any changes revert them and try it out again, it doesn't matter if the changes are not related to the stream/font classes.
Lee Ki-Hwan is offline  
Old 05/10/2021, 13:52   #5
 
elite*gold: 0
Join Date: Dec 2019
Posts: 34
Received Thanks: 2
Quote:
Originally Posted by Lee Ki-Hwan View Post
I don't think it has something to do with that Stream classes.

As I already mentioned I ran in this kind of problem only, when I had poor memory management, if you have made any changes revert them and try it out again, it doesn't matter if the changes are not related to the stream/font classes.
With 'poor memory management' what do you mean? Or wich part of Engine?
Engine/Base ?

I did not change any in particoular, is this what scare me

Could you share your preprocessor directive for Engine Project if I've set something wrong?
andrea-titan95 is offline  
Old 05/10/2021, 14:55   #6


 
Veni/Marius's Avatar
 
elite*gold: 36
Join Date: May 2014
Posts: 1,606
Received Thanks: 1,044
Well did it even work at one point in the first place?
Veni/Marius is offline  
Old 05/10/2021, 15:01   #7
 
elite*gold: 13849
Join Date: Oct 2014
Posts: 673
Received Thanks: 219
Quote:
Originally Posted by andrea-titan95 View Post
With 'poor memory management' what do you mean? Or wich part of Engine?
Engine/Base ?

I did not change any in particoular, is this what scare me

Could you share your preprocessor directive for Engine Project if I've set something wrong?
Im using the 2009/2010 Code, so my settings won't be useful for you.

You need to start over, do a reset.

Extract clean files, compile everything again and check if the error still occurs, also try a different client.
Lee Ki-Hwan is offline  
Old 05/10/2021, 22:16   #8
 
elite*gold: 0
Join Date: Dec 2019
Posts: 34
Received Thanks: 2
Quote:
Originally Posted by Veni/Marius View Post
Well did it even work at one point in the first place?
No. This happen also with clean source.

Quote:
Originally Posted by Lee Ki-Hwan View Post
Im using the 2009/2010 Code, so my settings won't be useful for you.

You need to start over, do a reset.

Extract clean files, compile everything again and check if the error still occurs, also try a different client.
I'm using clean files.
At this point could be boost lib wrong version or a windows 10 memory allocation problem?

For 'different client' what do you mean?
The problem that I get is on loading fonts/standard.fnt so I should try another font... (correct me if I'm wrong)
Maybe you mean a ps.dat shell variable setting?

This is a output log in debug:

First-chance exception at 0x574fcac4 (msvcr100d.dll) in Nksp.exe: 0xC0000005: Access violation reading location 0x07490000.
HEAP[Nksp.exe]: Invalid address specified to RtlValidateHeap( 02550000, 006C8B88 )
Windows has triggered a breakpoint in Nksp.exe.

This may be due to a corruption of the heap, which indicates a bug in Nksp.exe or any of the DLLs it has loaded.
andrea-titan95 is offline  
Old 05/11/2021, 14:34   #9
 
elite*gold: 13849
Join Date: Oct 2014
Posts: 673
Received Thanks: 219
Quote:
Originally Posted by andrea-titan95 View Post
No. This happen also with clean source.



I'm using clean files.
At this point could be boost lib wrong version or a windows 10 memory allocation problem?

For 'different client' what do you mean?
The problem that I get is on loading fonts/standard.fnt so I should try another font... (correct me if I'm wrong)
Maybe you mean a ps.dat shell variable setting?

This is a output log in debug:

First-chance exception at 0x574fcac4 (msvcr100d.dll) in Nksp.exe: 0xC0000005: Access violation reading location 0x07490000.
HEAP[Nksp.exe]: Invalid address specified to RtlValidateHeap( 02550000, 006C8B88 )
Windows has triggered a breakpoint in Nksp.exe.

This may be due to a corruption of the heap, which indicates a bug in Nksp.exe or any of the DLLs it has loaded.
The client is missing some files.

Try to use a different client, not just the bin folder.
Lee Ki-Hwan is offline  
Old 05/11/2021, 15:12   #10
 
elite*gold: 104
Join Date: Sep 2012
Posts: 1,364
Received Thanks: 573
Did you compile for usa? (try USALIVE)
Desarija is offline  
Old 05/12/2021, 22:36   #11
 
elite*gold: 0
Join Date: Dec 2019
Posts: 34
Received Thanks: 2
Quote:
Originally Posted by Desarija View Post
Did you compile for usa? (try USALIVE)
I'm building with my own property that was a copy of Usalive, this is my preprocessor directives:

G_USA;
_CLIENT_;
_USE_32BIT_TIME_T;
WIN32;
_WINDOWS;
_USRDLL;
ENGINE_EXPORTS;
NDEBUG;

Debuggable assembly, with no optimization.

To summarize: in Release mode this error is skipped (in Build_2010 Solution), or also in Debug Mode if I skip the exception with visual studio or pressing F5.
but in SkaEditor Project this crashes the program (also in release mode).
andrea-titan95 is offline  
Old 05/24/2021, 23:32   #12
 
elite*gold: 0
Join Date: Dec 2019
Posts: 34
Received Thanks: 2
Quote:
Originally Posted by Lee Ki-Hwan View Post
Im using the 2009/2010 Code, so my settings won't be useful for you.

You need to start over, do a reset.

Extract clean files, compile everything again and check if the error still occurs, also try a different client.
I started iover with clean file.
I think that something is missing or corrupted purposely in june release.
andrea-titan95 is offline  
Old 05/25/2021, 15:12   #13
 
elite*gold: 13849
Join Date: Oct 2014
Posts: 673
Received Thanks: 219
Quote:
Originally Posted by andrea-titan95 View Post
I started iover with clean file.
I think that something is missing or corrupted purposely in june release.
Take the June release from Reza, its an almost one click compile setup with a working client, i tried it out and it works, takes like 30 minuts till you can login.
Lee Ki-Hwan is offline  
Old 03/31/2022, 15:07   #14
 
Benjamin Arnold's Avatar
 
elite*gold: 0
Join Date: Jun 2021
Posts: 5
Received Thanks: 0
I had trouble loading fonts, too. But I was able to solve them by using and applying different font options. I am happy with the result.
Benjamin Arnold is offline  
Old 04/06/2022, 11:08   #15
 
universal-lc's Avatar
 
elite*gold: 46
Join Date: Sep 2018
Posts: 80
Received Thanks: 33
Quote:
Originally Posted by Lee Ki-Hwan View Post
Take the June release from Reza, its an almost one click compile setup with a working client, i tried it out and it works, takes like 30 minuts till you can login.
Not worth ... i spent more than 1 year on that source in order to fix all the little jokes left by reza and random bugs.

Those source are only worth if you are setting up it for a little private project or for develop system to sell
universal-lc is offline  
Reply

Tags
debugging, develeopment, engine.dll


Similar Threads Similar Threads
[Release] Herovans Website+Launcher+Loading Banner // html + psd + fonts
08/06/2019 - SRO PServer Guides & Releases - 20 Replies
http://i.epvpimg.com/R9vhh.jpg http://i.epvpimg.com/ApTlg.jpg http://i.epvpimg.com/Fqjsd.jpg
std::function of a function returning an std::function
11/11/2013 - C/C++ - 19 Replies
Nun muss ich nach langer Zeit auch mal wieder einen Thread erstellen, weil mir Google nicht mehr weiterhelfen kann. Ich verzweifle an Folgendem Vorhaben: #include <Windows.h> #include <string> #include <iostream> using namespace std;
Fonts per Script in Windows Fonts Ordner installieren
09/09/2013 - AutoIt - 2 Replies
Huhu Leute, wie der Titel schon sagt möchte ich in meinem Programm Fonts verwenden, welche keine standard Fonts sind. Gibt es eine Möglichkeit wie FileInstall oder per InetGet oder irgendwas die Fonts in den Windows Fonts Ordner zu installen ? Wäre über Hilfe dankbar... Per Google und SuFu nur Sachen von 2008 gefunden nix hilfreiches bei. Grüße
[FONTS] über 1000 Fonts für euren PC
09/08/2011 - Tutorials - 15 Replies
Ich habe mir mal die mühe gemacht, viele Fonts zu Downloaden, und daraus ein riesen Paket zu machen. Ihr habt nun 70MB .rar als Fonts. Das entspricht über 1000 Schriftarten! http://img7.imagebanana.com/img/1eyyh8xp/thumb/Un benannt2.gif Was sind Fonts? Fonts sind Schriftarten die man bei Windows in einen bestimmten Ordner einfügt. Diese Schriftarten sind dann anwendbar bei den Programmen, die man hat. Zum Beispiel WordPad, Gimp, Photoshop und so weiter. Wo füge ich Fonts ein?



All times are GMT +1. The time now is 18:40.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.