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
allocation ???

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

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Thu Sep 27, 2007 3:55 pm    Post subject: allocation ??? Reply with quote

Code:

Expected packet hook function for msg d6 but was null!
[09/27 20:40:07] Unable to read script 'pkg/skills/cooking/main/fish.ecl'
[09/27 20:40:11] error in create_thread: 12 8 "Not enough space" "Not enough space" 2 5612240 SocketClientThread 5599904 0 1802582304
Expected packet hook function for msg d6 but was null!
Unable to read script 'pkg/skills/cooking/main/fish.ecl'
[09/27 20:40:15] Exception in: scripts/ai/city_guard_default.ecl: bad allocation
 PC < nLines: (d.2950:  2950: get member id 'z' (2)
2951:  2951: Func(6,0): Self
2952:  2952: get member id 'realm' (113)
2953:  2953: 3L
2954:  2954: 40L
2955:  2955: Func(4,42): FindPath
2956: >2956: [] := (1) #
2957:  2957: global #43
2958:  2958: "main"
2959:  2959: [] 1
2960:  2960: !
Exception in: scripts/ai/city_guard_default.ecl: bad allocation
 PC < nLines: (d.2950:  2950: get member id 'z' (2)
2951:  2951: Func(6,0): Self
2952:  2952: get member id 'realm' (113)
2953:  2953: 3L
2954:  2954: 40L
2955:  2955: Func(4,42): FindPath
2956: >2956: [] := (1) #
2957:  2957: global #43
2958:  2958: "main"
2959:  2959: [] 1
2960:  2960: !


can anyone tell me what is wrong???

shard is running well for about 24h, then memory allocation problem is shown on the terminal and nothing else can work (all new scripts cause allocation problem)

If script code will help i`ll put it...

I dont know nothing about windows, memory alloctaing and others

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Thu Oct 11, 2007 2:17 am    Post subject: Reply with quote

bleh... still no reply???

system: Windows 2003 server
is it caused by pol or system???

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Thu Oct 11, 2007 3:23 am    Post subject: Reply with quote

Quote:
Expected packet hook function for msg d6 but was null!
[09/27 20:40:11] error in create_thread: 12 8 "Not enough space" "Not enough space" 2


First, check your packet hook for packet 0xD6.

Second, the create_thread error caused all the others. Looks like you ran out of memory??? If it happens again, check mem usage on pc also. If any crash dumps was created, post them.

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Thu Oct 11, 2007 4:58 am    Post subject: Reply with quote

i rewrited whole 0xd6 packet

Code:

Packet 0xD6
{
  Length variable
  SendFunction rcliloc:HandleMegaClillocSend
}

function: [edited;p]
Code:

use uo;
use os;
use util;
use polsys;
include "include/attributes";

const OFFSET_OBJECT_SERIAL   := 0x05;
const OFFSET_CLILOC_ID       := 0x0F;
const OFFSET_LENGTH_ID       := 0x13;
const OFFSET_UNICODE_TEXT    := 0x14;

program rcliloc()
    Print( "Podlaczam mega cliloc" );
    return 1;
endprogram

exported function HandleMegaClillocSend(kto, byref packet)

  var it := SystemFindObjectBySerial(packet.GetInt32(OFFSET_OBJECT_SERIAL));

   if ( it )
   
      packet.SetSize(15);

      var Object_Name;
      //var Text_Color := "CBA300";

      if( it.IsA(POLCLASS_MOBILE) )
            Object_Name := it.name;

        elseif ( it.IsA(POLCLASS_ITEM) )
            Object_Name := it.desc;
        endif
       
      // Object_Name := CAscZ("<BASEFONT COLOR=#" + Text_Color + "><C>" + Object_Name);
      Object_Name := CAscZ(Object_Name);

      packet.SetInt32(OFFSET_CLILOC_ID, 1042971);
      packet.SetUnicodeString(OFFSET_UNICODE_TEXT, Object_Name, 1);
      packet.SetInt16(OFFSET_LENGTH_ID, Object_Name.Size() * 2);
       
      var Html := "<BASEFONT COLOR=#FFFFFF><C>";
      var xDesc := "";

//-------------------------------------------------------------insert------------------------------------
   
 //edited ;p
//----------------------------------------------------------------------------------------------------------
      xDesc := CAscZ(xDesc);

      if ( xDesc.Size() > 0 )
         packet.SetInt32(packet.GetSize() - 1, 1070722);
         var Length_ID := packet.GetSize();
         packet.SetUnicodeString(packet.GetSize() + 1, xDesc, 1);
         packet.SetInt16(Length_ID, xDesc.Size() * 2);
      endif

      packet.SetInt32(packet.GetSize(), 0);
   endif

   return 0;
 

endfunction



run out of memory?? so is there a leak???

i had one core dump, i dont know if its related

the more players, the shorter time to recive memory allocation info

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Fri Oct 12, 2007 9:53 am    Post subject: Reply with quote

In the crash dump is memory allocation errors involving a string in a script.

First things first, please try using RC4 for a few days, see if the crashes go away (there was a packethook fix in RC5, I want to rule out that affecting you).

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Fri Oct 19, 2007 9:41 pm    Post subject: Reply with quote

After some testing:

1. I tried this: http://forums.polserver.com/ftopic1793.php but it didn`t help

2. I tried POL097RC4. The allocation problem appears much sooner then 097RC5. Here are some cuts from pol.log:
Code:

POL IS WORKING OK
[10/20 01:44:13] Client#4: Switching to queued data mode (1, 32 bytes)
Client#4: Leaving queued mode (41 bytes xmitted)
[10/20 01:44:24] Expected packet hook function for msg d6 but was null!
[10/20 01:44:25] Client#4: Switching to queued data mode (1, 29 bytes)
Expected packet hook function for msg d6 but was null!
Client#4: Leaving queued mode (592 bytes xmitted)
[10/20 01:44:27] Expected packet hook function for msg d6 but was null!
[10/20 01:44:28] Client#120: Switching to queued data mode (1, 9 bytes)
Client#120: Leaving queued mode (154 bytes xmitted)
[10/20 01:44:35] Expected packet hook function for msg d6 but was null!
Expected packet hook function for msg d6 but was null!
[10/20 01:44:37] Client#4: Switching to queued data mode (1, 16 bytes)
[10/20 01:44:38] Client#4: Leaving queued mode (48 bytes xmitted)
[10/20 01:44:47] Client#4: Switching to queued data mode (1, 15 bytes)
[10/20 01:44:48] Expected packet hook function for msg d6 but was null!
Client#4: Leaving queued mode (87 bytes xmitted)
[10/20 01:44:49] Expected packet hook function for msg d6 but was null!
[10/20 01:44:52] sysload=26 (48) cputime=4906250
[10/20 01:44:55] Client#4: Switching to queued data mode (1, 15 bytes)
[10/20 01:44:57] Client#4: Leaving queued mode (47 bytes xmitted)
.
.
.
AND???????????????????????????????????????
[10/20 02:28:01] [pkg/systems/save/main/saves.ecl]: [Zapisano stan swiata w 3906 ms]
[10/20 02:28:12] sysload=20 (3) cputime=7265625
[10/20 02:28:28] Expected packet hook function for msg d6 but was null!
[10/20 02:28:31] Exception in: scripts/ai/city_unmerchant.ecl: bad allocation
 PC < nLines: (cal #1830:  1830: [] 1
1831:  1831: Func(0,0): CInt
1832:  1832: global #47
1833:  1833: <>
1834:  1834: "stock"
1835:  1835: Func(4,1): GetProperty
1836: >1836: !
1837:  1837: ||
1838:  1838: if false goto 1850
1839:  1839: "undata"
1840:  1840: Func(2,10): GetGlobalProperty
Exception in: scripts/ai/city_unmerchant.ecl: bad allocation
 PC < nLines: (cal #1830:  1830: [] 1
1831:  1831: Func(0,0): CInt
1832:  1832: global #47
1833:  1833: <>
1834:  1834: "stock"
1835:  1835: Func(4,1): GetProperty
1836: >1836: !
1837:  1837: ||
1838:  1838: if false goto 1850
1839:  1839: "undata"
1840:  1840: Func(2,10): GetGlobalProperty
Exception in: scripts/ai/city_unmerchant.ecl: bad allocation
 PC < nLines: (cal #1830:  1830: [] 1
.
.
.  MORE OF THIS ERRORS
AND IT COMES TO THIS:
[10/20 02:28:40] Expected packet hook function for msg d6 but was null!
[10/20 02:28:52] Exception in: pkg/skills/tailoring/DShroud/control.eclerror_: bad allocation
 PC < nLines: (e
Exception in: pkg/systems/combat/CLCombat.eclception in: : bad allocation
 PC < nLines: (Lines: (ictionaryTasks Thread exits due to exception: bad allocation
Client#120: Exception in message handler 0x34: bad allocation
0000: 34 ed ed ed ed 04 00 11  81 89                     4....... ........
Client#120: Exception in i/o thread: bad allocation! (checkpoint=4)
Client#120 (87.205.212.210): disconnected (account branholm54)
Client#120: Exception in i/o thread! (checkpoint=4, what=bad allocation)
Client#120: Disconnecting client due to send() error (1): 10038
Client#149: Exception in message handler 0x06: bad allocation
0000: 06 46 e6 3b fb                                     .F.;.... ........
Client#149: Exception in i/o thread: bad allocation! (checkpoint=4)
TILL THE END (I SHUT IT BY X BECOUSE IT HAS TROBLES WITH EXITING)


So that`s it...

By the way. What this kind of error means:
Socket:: nowait.ecl: error 10038
Socket:: nowait.ecl: error 10056

(something may by wrong (numbers or text). If it is important i will put all of this error as it is showing on a console)

Thanks

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Sat Oct 20, 2007 8:32 am    Post subject: Reply with quote

I disabled the 0xd6 packet (by removing directory) but i still recive a message:
Expected packet hook function for msg d6 but was null!

Maby it`s the client??? I use ML5065 client. I dont know what else could do it..

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 522

PostPosted: Sat Oct 20, 2007 8:41 am    Post subject: Reply with quote

When I saw your earlier uopacket.cfg, I didn't see a receive function defined. Maybe you just didn't post the entire cfg file.
The one from the forums and the one I use has it like this:

Code:
Packet 0xD6
{
   Length       variable
   SendFunction   toolTips:MegaCliloc
}


// This subpacket is sent by the client to the server to see if
// 0xD6 needs to be sent.
SubPacket 0xBF
{
   SubCommandID      0x10
   ReceiveFunction      toolTips:MegaCliloc
}

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Sat Oct 20, 2007 8:47 am    Post subject: Reply with quote

I didn`t have this. I don`t know how this works (why the same function is pointed) but ok, I add it. Lets hope it will help.

And I checked this error:

Socket:: send_nowait() error: 10053
Socket:: send_nowait() error: 10038

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Sat Oct 20, 2007 5:52 pm    Post subject: Reply with quote

It didn`t help. Still the same info about packet 0xd6.

I`m completly lost for now...

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 522

PostPosted: Mon Oct 22, 2007 7:02 am    Post subject: Reply with quote

I use the identical megacliloc function that you use except I NEVER have any errors, and the megaclilocs are in heavy use for all manner of things.

In the section you edited out, perhaps lies the clue maybe?

I suggest you try replacing your entire edited out section with a simple tooltip to test:

Code:
if ( it.IsA(POLCLASS_CONTAINER) )
   if ( item.locked )
      xDesc := xDesc + Html + "Locked" + "<br";
   endif
endif


Now nothing should show except when you target a container.

I also use 5.0.9.1 with no problems.

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Tue Oct 23, 2007 1:57 am    Post subject: Reply with quote

But my packet sends name (or desc) even if I have nothing in my EDITED part???

My Game Masters think that memory usage (or some leak) is caused by AI scripts) - I noticed a big (4MB) growth of memory usage when monster is attacking (trying to find a path)

So I`m waiting for a distro scripts of AI

Author Message
coltain



Joined: 20 Mar 2007
Posts: 97
Location: Poland

PostPosted: Tue Oct 23, 2007 11:16 am    Post subject: Reply with quote

I don`t think this is memory problem (I recived "allocation error" message when POL used 500MB and 1100MB)

I`m confused....

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

 




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