KnightOnline icon indicating copy to clipboard operation
KnightOnline copied to clipboard

Errors on loading some fx files

Open d5dl2 opened this issue 7 years ago • 3 comments

There are access violation errors while reading fx binaries. When player use some lightning skills to monsters or when you hit the monster with +8 stiletto, access violation error occurs on bool CN3FXPartBase::Load(HANDLE hFile) method in .\Client\N3Base\N3FXPartBase.cpp file. I encounter this error using both two data.zip that you share before.

m_ppRefTex = new CN3Texture* [m_iNumTex]; on this line of code, m_iNumTex has very big value something over millions and program cant allocate that big memory.

When i debug; it also cant load m_iVersion from file at start of method. We may prevent this issue by adding if(m_iVersion == 0) return false; line, it works nice, game can be continue to play, complete or less effect happens in the screen (i dont know effect really completed on screen). But it is not right way to fix it i think. What i want to understand is:

  • Why code still cant load properly data files although you have been attached to support different versions of files.
  • How i ll learn to how fx files can be read properly. I mean how i may know structure of data files.
  • How i may fix this kind of errors, i can't see the start point. If i change the function, it may be broken reading other files. I dont know that file structure and how it need to be.
  • If you want to just support 1298/9 client, why you want to support also older data files instead of just force update the user who using older files ?

At the and: sorry for my bad english.

d5dl2 avatar Feb 28 '18 08:02 d5dl2

This is likely due to a variation in the FX file format. Reading in incorrect binary information from the file, or uninitialized variables, often result in these very big (unrealistic) values.

srmeier avatar Feb 28 '18 12:02 srmeier

Do you happen to know the name of the lightning FX file that causes this issue? I can load this file manually and see what's happening here.

srmeier avatar Apr 15 '18 14:04 srmeier

Reproduced by attacking with glacier weapon. fx/ice_sword_target0_1.fxb was loaded in this case.

ohad258 avatar Jul 21 '18 12:07 ohad258