Jump to content

Recommended Posts

Posted

I can not start the server with COEP  extender 66\61 ver.
I'm using 746 protocol for interlude. 

When connecting to a game server, server crashes with error

A:I:S:E:PE:DI:DE:BO=1.000000:1.000000:1.000000:1.000000:1.000000:0:0:1
L:Y:X:H=0:0:0:0:0
Crashed Thread[6].
Server Up Time : Mon Jun 30 04:26:21 2014
Current Time : Mon Jun 30 04:27:16 2014
Elapsed Time : 0 days 0 hours 0 minutes 55 seconds
IOBufferPool - 49994 / 50000,  PendingWrite 7 bytes [0] 
=============== object report
user[0/0], npc[0/0], item[0/0], usersocket[1]
=============== npc server connection log 
no connect

[(2596) 2014/06/30 04:27:16]: =======================
an Access Violation in module ntdll.dll at 0033:770c08c5.
start at 2014/6/30 04:26:20
Read from location ffffffff caused an access violation.

Registers:
EAX=a56aefa8 CS=0033 EIP=770c08c5 EFLGS=00010202
EBX=00000002 SS=002b ESP=a56aef98 EBP=ed96dc40
ECX=a56af078 DS=002b ESI=00000020 FS=0053
EDX=a56aefe8 ES=002b EDI=00000000 GS=002b
Bytes at CS:EIP:
0f ae 81 00 01 00 00 0f 29 81 a0 01 00 00 0f 29 
Stack dump:
a56aef98: 00000202 00000000 7707b219 00000000 fffa4000 000007ff 00000001 00000000
a56aefb8: 770c7000 00000001 000002ed 00000000 00000000 00000000 a56a007f 00000000
a56aefd8: a96bb0b0 00000000 a96bb0c0 00000000 a56b0000 00000000 a56ad000 00000000
a56aeff8: 7707a968 00000000 01f15409 00000000 a56af0e0 00000000 00000015 00000000
a56af018: d17c0fba 00000000 00000003 00000000 1afe0158 00000000 a56af430 00000000
a56af038: ffffffff ffffffff a96bb0b0 00000000 00000008 00000000 1afe0158 00000000
a56af058: 770c6486 00000000 00000050 00000000 a56afa50 00000000 000002ed 00000000
a56af078: 0000067c 00000000 a56af091 00000000 00000204 00000000 a56a0001 00000000
a56af098: 00440042 00000000 a56afa50 00000000 000003ff 00000020 002b0033 0053002b
a56af0b8: 002b002b 00000000 000a0008 00000000 77187540 00000000 003a0045 0053005c


ver = Dec 16 2005_22:03:13


GuardInfo : 

IOThread [0][0] (good):  void IOThread_common(void *arglist)
    Lock Stack  : 

IOThread [1][15] (good):  void IOThread_common(void *arglist)
    Lock Stack  : 

IOThread [2][0] (good):  void IOThread_common(void *arglist)
    Lock Stack  : 

IOThread [3][15] (good):  void IOThread_common(void *arglist)
    Lock Stack  : 

IOThread [4][0] (good):  void IOThread_common(void *arglist)
    Lock Stack  : 

IOThread [5][15] (good):  void IOThread_common(void *arglist)
    Lock Stack  : 

IOThread [6][47] (ahehe):  void IOThread_common(void *arglist) -> static bool LoadCharacterPacket(CDBSocket *socket, const unsigned char *packet) -> void CSocket::Send(const char* format, ...) -> CPacketSent::SendData
    Lock Stack  : 

IOThread [7][16] (good):  void IOThread_common(void *arglist)
    Lock Stack  : 

ListenThread [13][31] (good):  void ListenThread_common() -> unsigned __stdcall WaitThread(void *)
    Lock Stack  : 

MainThread [12][858] (good):      Lock Stack  : 

GuardInfo end 



[(2596) 2014/06/30 04:27:16]: *.\ioc.cpp:648(Tue Dec 13 02:52:40 2005) exception

Posted

...well It's not for interlude.

 

 

So there's that - and if you downgraded already you'd probably able to easily debug this error.

 

 

Sooooo...

Posted


#include "CSentPackets.h"

#include "L2ServerFunctions.h"

 

extern "C" int nRevision;

 

// C4 per player : SdSddddddddddffdddddddddd dddddddddd dddddddddd dddddddddd dddddddd ff

 

INT32 nLoadCharacters = 0;

void CSentPackets::LoadCharacters(CSocket *pSocket, const char *format, va_list va)

{

L2SERVER_SHARED_GUARD(nLoadCharacters);

TLS_TRACE_BEGIN;

char *charSelectFormat = (char*)0x9D9270;

 

// Character Selection Info (Character Screen)

va_list vl = va;

 

UINT8 packetid = va_arg(vl, UINT8);

UINT32 chars = va_arg(vl, UINT32);

UINT32 buffersize = va_arg(vl, UINT32);

 

CSPacket InPacket(va_arg(vl, CHAR *), buffersize, buffersize);

 

CSPacket OutPacket;

OutPacket.set(8192);

 

OutPacket << packetid;

OutPacket << chars;

 

if(nRevision > 746)

{

OutPacket << (INT32)0x07;

OutPacket << (BYTE)0x00;

 

int pos = 0;

for ( UINT32 a = 0 ; a < chars ; a++ )

{

UINT32 lastpos = pos;

 

UINT32 cnsize = (InPacket.GetWString(pos).size()+1)*2; // Character Name Size 32 Bytes

UINT32 ansize = (InPacket.GetWString(pos+cnsize+4).size()+1)*2; // Account Size 28 Bytes

 

UINT32 psize = 285 + cnsize + ansize;

UINT32 exppos = 64 + cnsize + ansize;

 

OutPacket.Write(InPacket.GetBytes(pos),exppos); pos += exppos;

OutPacket.Write((INT64)InPacket.GetQWord(pos)); pos += 8;

OutPacket.Write(InPacket.GetBytes(pos), 44); pos += 44 + 64;

OutPacket.Write(InPacket.GetBytes(pos), 64); pos += 64;

OutPacket.Write(InPacket.GetDWord(lastpos+exppos+168));

OutPacket.Write((INT32)0x00);

OutPacket.Write((INT32)0x00);

OutPacket.Write((INT32)0x00);

OutPacket.Write((INT32)0x00);

OutPacket.Write((INT32)0x00);

OutPacket.Write((INT32)0x00);

OutPacket.Write((INT32)0x00);

OutPacket.Write((INT32)0x00);

OutPacket.Write(InPacket.GetBytes(pos),(psize-(pos-lastpos))); pos += (psize-(pos-lastpos));

OutPacket.Write((INT16)0x00);

OutPacket.Write((INT16)0x00);

OutPacket.Write((INT32)0x00);

}

}

else

{

// IL Packet SdSddddddddddffdQddddddddddddddddddddddddddddddddddddddddddddddddffdddchh

 

int pos = 0;

for ( UINT32 a = 0 ; a < chars ; a++ )

{

UINT32 cnsize = (InPacket.GetWString(pos).size()+1)*2; // Character Name Size 32 Bytes

UINT32 ansize = (InPacket.GetWString(pos+cnsize+4).size()+1)*2; // Account Size 28 Bytes

 

UINT32 exppos = 64 + cnsize + ansize;

 

OutPacket.Write(InPacket.GetBytes(pos),exppos); pos += exppos;

OutPacket.Write((INT64)InPacket.GetQWord(pos)); pos += 8;

OutPacket.Write(InPacket.GetBytes(pos), 108); pos += 108;

OutPacket.Write((INT32)0x00);

OutPacket.Write(InPacket.GetBytes(pos), 64); pos += 64;

OutPacket.Write((INT32)0x00);

OutPacket.Write(InPacket.GetBytes(pos), 12); pos += 12;

OutPacket.Write(InPacket.GetBytes(pos), 16); pos += 16;

OutPacket.Write(InPacket.GetBytes(pos), 13); pos += 13;

OutPacket.Write((INT32)0x00);

}

}

 

pSocket->Send(&OutPacket);

TLS_TRACE_END;

}

 

INT32 nLoadSelectedCharacter = 0;

void CSentPackets::LoadSelectedCharacter(CSocket *pSocket, char *pFormat, ...)

{

L2SERVER_SHARED_GUARD(nLoadSelectedCharacter);

TLS_TRACE_BEGIN;

va_list tag;

va_start(tag, pFormat);

 

CSPacket Packet;

Packet.set(350);

 

BYTE nPacketID = va_arg(tag, BYTE); // PACKET ID

 

Packet << (wstring)va_arg(tag, WCHAR *); // Character Name

Packet << va_arg(tag, DWORD); // Character Object ID

Packet << (wstring)va_arg(tag, WCHAR *); // Character Title

Packet << va_arg(tag, DWORD); // Session ID

Packet << va_arg(tag, DWORD); // Pledge ID

Packet << va_arg(tag, DWORD); // Builder

Packet << va_arg(tag, DWORD); // Sex

Packet << va_arg(tag, DWORD); // Race

INT32 nClassID = va_arg(tag, DWORD); // Class ID

Packet << nClassID; // Class

Packet << va_arg(tag, DWORD); // WorldId

Packet << va_arg(tag, DWORD); // X

Packet << va_arg(tag, DWORD); // Y

Packet << va_arg(tag, DWORD); // Z

Packet << va_arg(tag, DOUBLE); // Current HP

Packet << va_arg(tag, DOUBLE); // Current MP

Packet << va_arg(tag, DWORD); // SP

va_arg(tag, DWORD);

Packet << pSocket->user->SD->nExp64; // EXP

Packet << va_arg(tag, DWORD); // Level

Packet << va_arg(tag, DWORD); // Align

Packet << va_arg(tag, DWORD); // Karma

Packet << va_arg(tag, DWORD); // INT

Packet << va_arg(tag, DWORD); // STR

Packet << va_arg(tag, DWORD); // MEN

Packet << va_arg(tag, DWORD); // DEX

Packet << va_arg(tag, DWORD); // WIT

 

Packet << (INT32)0x00;

Packet << (INT32)0x00;

Packet << nClassID;

for (int i=0; i<20; i++) { Packet << (INT32)0x00; }

 

va_end(tag);

 

// Sending UserInfo

pSocket->Send("cb", nPacketID, Packet.size(), Packet.buffer(false));

TLS_TRACE_END;

 

Guest
This topic is now closed to further replies.


  • Posts

    • First, don't really follow the "main voice", moreover if you consider it an hobby. Simply do what you want, you got only one life so use it as you want. If you make it an hobby, it's exactly like piano, or velo - only practice makes you better.   Secondly, how do you learn things ? It's actually a really important question, since some can simply be scholar, read books (theory) then practice ; and some simply can't read books. I'm the second type, I hated school, I find it boring - my knowledge in Java comes from try-and-fail. You improve your coding style every year or so, I can myself rewrite my own code (which I already considered top-notched) after a while. You always learn something new - even if Java barely evolves. L2J is a fun way to learn programming, it's a giant sandbox where you can edit anything, and I believe it should be taken as it.   My own way of learning was as follow : Add existing customs, no matter what they are : the point is to know main classes used by L2J / customs. L2J is barely Java knowledge ; the true knowledge is to know WHAT to search in WHICH location (what I call, organization). You have to understand than EVERYTHING you think already exists, in a form on another, in the source code. A custom is only the association of the different mechanisms you found "here and there", glued together in a proper goal. Once you know main classes to edit, and the customs you added are compiling fine, the main point is to know WHAT exactly you DID. Try to understand WHY and WHERE you actually copied the code. Third point would be to MANIPULATE the customs you added in order to fit your wish. First edit little values, then logic conditions ; eventually add a new Config, or a new functionality to the custom. Fourth point would be to begin to craft your own ideas. Once again, EVERYTHING already exists, in a form or another. You want a cycled event ? You got Seven Signs main task as exemple. Npc ? Search any type of Npc and figure out what it does. Fifth point would be to understand Java - mostly containers (WHAT and WHERE to use them), variables types and main Java mechanisms (inheritance, static modifier, etc). You should also begin to cut your code into maintainable classes or methods. Java can actually run without optimization, but bigger your ideas, more optimized and well-thought it should be. It's direct saved time in the future, and you would thank yourself doing so. Main tips : ALWAYS use any type of versioning system - GIT or SVN. It allows to save your work, step by step and eventually revert back anytime you want if you terribly messed up. L2J is 80% organization knowledge, and 20% Java knowledge. Basically, if you know WHAT and WHERE to search, if you aren't dumb, it's easy to replicate and re-use things. Cherry on top is to use a already good coded pack to avoid copy-paste crap and get bad habits. Avoid any type of russian or brazilian packs, for exemple - their best ability is to leak someone's else code. Obviously you need some default sense of logic, but Java and programming in general help you to improve it.   Finally, most of your questions could be solved joining related Discord (at least for aCis, I can't speak for others) - from the moment your question was correctly asked (and you seemed to search for the answer). My community (and myself) welcomes newbies, but got some issues with noobies.   The simpliest is to try, fail and repeat until you succeed - it sounds stupid, but that's basically how life works.   PS : about Java ressources, before ChatGPT, it was mostly about stackoverflow website, and site like Baeldung's one. With ChatGPT and alike, you generally double-cross AI output to avoid fucked up answers. Also, care about AI, they are often hallucinating really hard, even today. They can give you complete wrong answer, you tell them they are wrong, and they say "indeed, I suck, sorry - here's a new fucked up answer". You shouldn't 100% rely over AI answer, even if that can give sometimes legit answers, full code or just skeletons of ideas.   PPS : I don't think there are reliable ressources regarding L2J itself, also most of the proposed code decays pretty fast if the source code is actually maintained (at least for aCis). Still, old coded customs for old aCis sources are actually a good beginner challenge to apply on latest source.
    • WTS: - AQ - Baium - Zaken  - Frintezza - Vesper Fighter Focus Fire Element   pm for detalis
    • We have the best price! L2Reborn.org Signature x1 Franz NEW!! 1KK = $20 HURRY TO BUY AT THE TOP PRICE discord - adver745645
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock