 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
| Author |
Message |
coltain
Joined: 20 Mar 2007 Posts: 97 Location: Poland
|
Posted: Thu Oct 11, 2007 4:58 am Post subject: |
|
|
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 |
coltain
Joined: 20 Mar 2007 Posts: 97 Location: Poland
|
Posted: Fri Oct 19, 2007 9:41 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
 |
|