Jump to content
  • 0

Compiled binary crashes after loading screen


Vanilla

Question

hello dear metin2dev,

 

I'm currently working on compiling the metin2 binary.

 

Well. Maybe it's too damn easy for me to find the solution but everytime I compile the metin2client.exe (mainline_released) it'll crash right after finishing the loading process.

 

It doesn't matter if I start it with older or newer granny. I also replaced the python-library but it seems like it doesn't have any effect.

 

The following error occurs in syserr.txt:

 

 

0515 13:07:16391 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR
0515 13:07:26775 :: ui:3091: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0515 13:07:26777 ::
uiCharacter.py(line:399) __LoadWindow
uiCharacter.py(line:152) __LoadScript
ui.py(line:2818) LoadScriptFile
ui.py(line:3008) LoadChildren
ui.py(line:3008) LoadChildren
ui.py(line:3008) LoadChildren
ui.py(line:2864) LoadChildren
ui.py(line:3091) LoadElementButton

CharacterWindow.__LoadWindow - <type 'exceptions.OverflowError'>:Python int too large to convert to C long

0515 13:07:26777 :: ============================================================================================================
0515 13:07:26777 :: Abort!!!!
 

 

I hope someone can help me. In the whole source-directory there's no tp_compare function (not in the client and also not in the binary source). I've found it only the python includes.

 

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment

17 answers to this question

Recommended Posts

  • 0

It is binary specific. With other binaries I can start, but when I compile my own it won't.

 

Also I've now tried to compile novaline and it did work though the same error persists. I've also upgraded to python 2.7 but still nothing changed.

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
  • 0
  • Developer

You encounter this error because you don't use CTOA, so, the client will not be able to convert integer numbers to C long, goint into an error.

 

 

Solution:

 

Add this to system.py:

def StringColorToInt(colorstring):
    import grp
 
    colorstring = colorstring.strip()
 
    if len(colorstring) != 8:
        raise ValueError, "input #%s is not in #AARRGGBB format" % colorstring
 
    a, r, g, b = colorstring[:2], colorstring[2:4], colorstring[4:6],colorstring[6:8]
    a, r, g, b = [int(n, 16) for n in (a, r, g, ]
 
    return grp.GenerateColor(float® / 255.0, float(g) / 255.0, float( / 255.0, float(a) / 255.0)
 
__builtin__.CTOA = StringColorToInt
 
Search for 0xff codes in the client root/locale/uiscript and change them like this:
 

0xffFFB96D = CTOA("ffFFB96D")

 

  • Love 1

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0

I tried that.

 

Now I've got a new error:

networkModule.SetSelectCharacterPhase - <type 'exceptions.NameError'>:name 'CTOA' is not defined

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
  • 0
  • Developer

Add also in system.py this one:

__builtin__.CTOA = StringColorToInt

and it should be ok

Look closely, it's in my code, anyway vanilla, you forgot this part.

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0

 

Add also in system.py this one:

__builtin__.CTOA = StringColorToInt

and it should be ok

Look closely, it's in my code, anyway vanilla, you forgot this part.

 

 

Oh sorry I didn't see it ^^

 

Link to comment
  • 0
  • VIP

PythonUtils.cpp

// Python int too large to convert to C long#define PyLong_AsLong PyLong_AsLongLong#define PyLong_AsUnsignedLong PyLong_AsUnsignedLongLong
um. That's OK but when we work on large numbers we can have badly suprises
Link to comment
  • 0

 

You encounter this error because you don't use CTOA, so, the client will not be able to convert integer numbers to C long, goint into an error.

 

 

Solution:

 

Add this to system.py:

def StringColorToInt(colorstring):
    import grp
 
    colorstring = colorstring.strip()
 
    if len(colorstring) != 8:
        raise ValueError, "input #%s is not in #AARRGGBB format" % colorstring
 
    a, r, g, b = colorstring[:2], colorstring[2:4], colorstring[4:6],colorstring[6:8]
    a, r, g, b = [int(n, 16) for n in (a, r, g, ]
 
    return grp.GenerateColor(float® / 255.0, float(g) / 255.0, float( / 255.0, float(a) / 255.0)
 
__builtin__.CTOA = StringColorToInt
 
Search for 0xff codes in the client root/locale/uiscript and change them like this:
 

0xffFFB96D = CTOA("ffFFB96D")

 

 

Put it in all files?

In all 400 lines?

Link to comment
  • 0

now debug client say:

the eterpack doesn't exist[pack/]

 

##Network - Offline phase ##

##Network - Offline phase ##

 

And in syserr (runtime error) 

.....

i ve changed all 0xff in CTOA("ff...")

 

wtf............

Link to comment
  • 0

update *1

no load my player ............

 

 
0502 22:44:21340 :: CPythonNonPlayer::LoadNonPlayerData: invalid size 338895 check data format.
0502 22:44:21340 :: LoadLocaleData - LoadMobProto(locale/es/mob_proto) Error
 
 
 
 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.