View Single Post
Old 23.01.2006, 20:39   #11
tontor
Архивный участник
 
Join Date: May 2005
Posts: 109
Default

Quote:
Originally Posted by vex
Yeh! Tontor! There is really something wrong! or may be i have bad hands...

I'm just now installed back latest dll and after few minutes got many bad message:

couple of __SafeCastUSer and __SafeCastCreature
than follow:
Quote:
[SharedContainer.cpp][93] PopCreature Failed
actor(0,1090701552,0) in AsyncMove, failed to pop from GetContainer!!!
that object already gone to another container!
data link too long!
its reapeted many times but server still alive.... however, another time it would be dead :cry:
Just because you get safecast errors does not relate to this patch, safecast errors are usually caused by users and often end in crashes. deadlock is caused by a timer expiring that is considered critical, usually where a packet to/from cached is so lagged it times out and the server forcefully crashes itself because it is unrecoverable.




Quote:
Originally Posted by testdude
any idea about this error?
Code:
Server Up Time Sat Jan 14 10:25:40 2006

Current Time : Sat Jan 14 10:37:58 2006

Elapsed Time : 0 days 0 hours 12 minutes 18 seconds
IOBufferPool - 13188

[(1792) 2006/01/14 10:37:58]: =======================
an Access Violation in module L2Server.exe at 001b:00443524.
start at 2006/1/14 10:25:37
Read from location 00000000 caused an access violation.

Registers:
EAX=00000000 CS=001b EIP=00443524 EFLGS=00010206
EBX=00000000 SS=0023 ESP=71f2fd68 EBP=71f2fda0
ECX=71f2fd94 DS=0023 ESI=390c0db8 FS=003b
EDX=00000000 ES=0023 EDI=39379cf0 GS=0000
Bytes at CS:EIP:
8b 10 8b c8 ff 52 48 8d 4d d4 e8 1d c5 ff ff 8b 
Stack dump:
71f2fd68: 26edb330 88004924 00000000 00000000 00000000 053629e6 00000000 88004924
71f2fd88: 00000001 88005884 71f2fd68 71f2fdc0 005a4328 ffffffff 71f2fdcc 00439bd3
71f2fda8: 26edb330 88004924 00000000 00000000 88004924 71f2fda8 71f2fdf0 005a3bd0
71f2fdc8: ffffffff 71f2fdfc 004f0bfe 00000000 79a623d4 00000000 00000000 26edb330
71f2fde8: 00024778 71f2fdd4 71f2fe1c 005ac46b ffffffff 71f2fe28 00506648 79a637ac
71f2fe08: 79a623d4 88004924 71f2fdf8 71f2fe58 71f2fe04 71f2fe58 005ad0f0 ffffffff
71f2fe28: 71f2fe94 00514678 00000000 26edfcd0 79a623d4 77e6bb6d 00024778 00053434
71f2fe48: 00514821 79a623d4 26edfcd0 26edfcd0 71f2fe88 005adb78 ffffffff 0051499a
71f2fe68: 79a623d4 00053434 79a623d4 77e6bb6d 71f2fedc 26edfcd0 71c02572 71f2fe6c
71f2fe88: 71f2feb8 005adb9b ffffffff 71f2fec4 00539654 0535dbe8 79a623d4 77e6bb6d


ver = Jun  8 2004____15:38:30 thread id=0

void IOThread_common(void *arglist) <-- 
void CIOSocket::ReadCallback(DWORD dwTransferred) <-- 
void CIOSocket::Close() <-- 
CUserSocket::OnClose <-- 
CUserSocket::SetUser(User* pUser) <-- 
User::Delete() <-- 
void CCreature::Delete() <-- 
CCreature::DeleteAllItemsInInventory()

Thread[0] (ahehe):      Lock Stack  : Creature_server.cpp(58[3a]) -> Inventory WriteLock (835333352[31ca2ce8])
been getting it a few times, to do with ur patch maybe? dunno...
ive also been getting alot of trade crashes, possible new duping method? ill post the linerror when it crashes again...
A user gets disconnect, or forces disconnect, after closing the socket deletes the user, which is a child member of ccreature, and starts to remove the items from the users inventory. L2server checks CObject pointer to make sure its valid before trying to remove it, but doesn't do anything but log it. Below you can see why it crashes.

Code:
.text:0044351F                 call    template_deref
.text:00443524                 mov     edx, [eax]
.text:00443526                 mov     ecx, eax
.text:00443528                 call    dword ptr [edx+48h]
Code:
.text:0043FA50 template_deref  proc near               ; CODE XREF: CCreature__DeleteAllItemsInInventory+1BFp
.text:0043FA50                                         ; CCreature__DeleteAllItemsInInventory+1CEp ...
.text:0043FA50
.text:0043FA50 var_10          = dword ptr -10h
.text:0043FA50 var_C           = dword ptr -0Ch
.text:0043FA50 var_4           = dword ptr -4
.text:0043FA50
.text:0043FA50                 push    ebp
.text:0043FA51                 mov     ebp, esp
.text:0043FA53                 push    0FFFFFFFFh
.text:0043FA55                 push    offset unknown_libname_706 ; Microsoft VisualC 2-7/net runtime
.text:0043FA5A                 mov     eax, large fs:0
.text:0043FA60                 push    eax
.text:0043FA61                 mov     large fs:0, esp
.text:0043FA68                 sub     esp, 0Ch
.text:0043FA6B                 push    ebx
.text:0043FA6C                 push    esi
.text:0043FA6D                 mov     esi, ecx
.text:0043FA6F                 cmp     dword ptr [esi], 0
.text:0043FA72                 push    edi
.text:0043FA73                 mov     [ebp+var_10], esp
.text:0043FA76                 mov     [ebp+var_4], 0
.text:0043FA7D                 jnz     short loc_43FA9A
.text:0043FA7F                 push    64h
.text:0043FA81                 push    offset aCServerservice ; "c:\\serverservice\\l2server\\ThreadSafeLib"...
.text:0043FA86                 push    offset aSDReferencingN ; "[%s][%d] referencing NULL object."
.text:0043FA8B                 push    2               ; int
.text:0043FA8D                 push    offset unk_18AA81D8 ; int
.text:0043FA92                 call    CLog__Add
.text:0043FA97                 add     esp, 14h
.text:0043FA9A
.text:0043FA9A loc_43FA9A:                             ; CODE XREF: template_deref+2Dj
.text:0043FA9A                 mov     eax, [esi]
.text:0043FA9C                 mov     ecx, [ebp+var_C]
.text:0043FA9F                 pop     edi
.text:0043FAA0                 pop     esi
.text:0043FAA1                 mov     large fs:0, ecx
.text:0043FAA8                 pop     ebx
.text:0043FAA9                 mov     esp, ebp
.text:0043FAAB                 pop     ebp
.text:0043FAAC                 retn
.text:0043FAAC template_deref  endp
.text:0043FA6F cmp dword ptr [esi], 0

.text:0043FA9A mov eax, [esi]

Even though [esi] (our object) is null, it is logged and moved into eax anyways and returned, would imagine if you checked your server logs, if they were wrote the last thing you would see is "[%s][%d] referencing NULL object.". You can see that there is no error handling past this for the object being null as it trys to use it as a pointer it crashes reading from 0.

.text:00443524 mov edx, [eax]

Just need to check in CCreature:eleteAllItemsInInventory for it being null.
.text:004433F0 push 44h
returning here if null would probably work fine and with appropriate error msg. I have no server to test so makes adding simple things such as these kind of difficult to test for simple errors.



Quote:
Originally Posted by a-dru
Tontor
Why you don't add in patch HEX for visual EFFECT - SLEEP and other abnormal effect.

It include will be very need for more admins of l2 server.
for me exzample.
Although the private release of my patch has included AVE (abnormal visual effects) since about may of 2005, I beleive torune or some others have posted fixes for AVE here on the forum so you could simply use their fixes, mine would in most cases conflict with theirs and I think theirs is public so i'm sure alot of people use it. Including mine would probably just cause problems for most people.
tontor is offline