PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Server crash (and little connection) problem

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 096
Display posts from previous:   

Author Message
nevalon



Joined: 07 Mar 2006
Posts: 39
Location: Poland

PostPosted: Tue Mar 07, 2006 11:38 am    Post subject: Server crash (and little connection) problem Reply with quote

Newest (18.01.06) POL96, tested on WinXP.
1. Connecting. When I try to connect client from same computer as
server, there is (nearly... look point 2) everything ok. When I try to
connect client from LAN computer (via global-IP or LAN-IP, the same
problem) the client is hanging on veryfying account (after sending
login/pass, before choosing game server). On server: "Client connected
(...) (1 connections)"... some time... "Client disconnected (...) (0
connections)". I don't know why it is, because there was everything ok
some time ago. I tried to find what I broke and i don't know... Any idea?
2. Hooking SendAscii packet. Problem is so strange, because in one
case it crashes POL, in other it works properly. The case is... Which
account I log in first, which next. Hmm maybe another way - here is
the code of hook function:

Code:
exported function HandleAsciiText( who, byref packet )
   who := who;
   var textlen := packet.GetInt16(PACKETLEN) - TEXT;
   var thetext := packet.GetString((TEXT-1), textlen);
   if(thetext["[invulnerable]"])
     return 1;
   endif
   if(thetext["is attacking you"])
     return 1;
   endif
   var theserial := packet.GetInt32(ITEMID);
   var theobject := SystemFindObjectBySerial(theserial);
   var STAFF_SET := 0;
   if(theobject.isA(POLCLASS_MOBILE))
     if(INVUL_COLOR)
       if((theobject.enabled("invul"))&&(!theobject.acct))
         if(thetext == theobject.name || thetext == theobject.title_guild )
           if(INVUL_COLOR > 255)
             COLOR_BYTE := 10;
             packet.SetInt16(COLOR_BYTE, INVUL_COLOR);
           else
             packet.SetInt8(COLOR_BYTE, INVUL_COLOR);
           endif
         endif
       endif
     endif
   endif
   if ((theobject.acct)&&(thetext == theobject.name))
     var imie := pobierz_imie(who, theobject);
     packet.SetString((TEXT-1), imie,0);
     var pakiet2 := CreatePacket(0xd6,25);
     pakiet2.setint8(0,0xd6);
     pakiet2.setint16(1,25);
     pakiet2.setint16(3,1);
     pakiet2.setint32(5,theserial);
     pakiet2.setint16(9,0);
     pakiet2.setint32(11,theserial);
     pakiet2.setint32(15,1050045);
     var asci := CAscz(imie);
     pakiet2.SetInt8(21, 0x20); // spacja
     pakiet2.SetInt8(22, 0);
     pakiet2.SetInt8(23, 0x09); // spacja
     pakiet2.SetInt8(24, 0);
     var i;
     var j := 25;
     for (i:=1; i <= len(asci); i := i+1)
       pakiet2.SetInt8(j, asci[i]);
       j := j+1;
       pakiet2.SetInt8(j, 0);
       j := j+1;
     endfor
     pakiet2.SetInt8(j, 0x09); // spacja
     j := j+1;
     pakiet2.SetInt8(j, 0);
     j := j+1;
     pakiet2.SetInt8(j, 0x20); // spacja
     j := j+1;
     pakiet2.SetInt8(j, 0);
     j := j+1;
     pakiet2.SetInt32(j, 0);
     var dlugosc := 25 + (len(asci)*2) + 8;
     pakiet2.SetInt16(1, dlugosc);
     dlugosc := dlugosc - 25;
     pakiet2.SetInt16(19, dlugosc);
     pakiet2.SendPacket(who);
   endif
   return 0;
endfunction


Some cases and what's going on with POL (everything from one computer,
double client via Razor)
a) log in character at acct test2; log in character at acct admin ->
ok, script works properly
b) log in character at acct admin; log in character at acct test2 (one
character on position near second) -> POL crashes, minidump...
c) log in character at acct admin; log in character at acct test2 (one
character in far position from second) -> ok, but -> getting
characters closer (executing script) -> POL crash...
I found that it is because of pakiet2 sending (if I hook it without
this packet POL doesn't crash).

What's going on?? I don't understand why character - login - sequence
is important... Any idea?

3. According to 1. and 2. - maybe point 2 is a result of connecting 2
clients from one computer? I don't know how and where UO client cashes
cliloc information... And I cannot check for it from 2 different
computers because of point 1... Could anybody help??

Author Message
nevalon



Joined: 07 Mar 2006
Posts: 39
Location: Poland

PostPosted: Tue Mar 07, 2006 3:06 pm    Post subject: Reply with quote

OK, I found for point 2: pakiet2.sendpacket(who) :O Very Happy

I have had that, but with debugging something else I removed one line more than i should Very Happy

But connection problem still exists...

Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 096 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty