Bad allocation

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.

Moderator: POL Developer

Locked
Keryan
New User
Posts: 11
Joined: Fri Aug 10, 2007 3:30 pm

Bad allocation

Post by Keryan »

Hello,

We are trying to convert our shard(095 core) to current 097, so we updated scripts, convert polhook to packethooks, and so on.
Now when we copied data from 095 to 097, logged in and after few minutes this happened:

Code: Select all

Exception in: scripts/control/iconbookcontrol.ecl!done: bad allocation
 PC < nLines: (k_ = false
Client#3: Exception in message handler 0x02: bad allocation
Client#5: Exception in message handler 0x02: bad allocation
Client disconnected (2 connections)
Client disconnected (1 connections)
Thread exception: bad allocation
after this we have been disconnected although server has been running on and we can connect again, but when we connected we cannot use any command or skill, just walking or writing.

So we restarted server and this happened:

Code: Select all

[08/11 00:04:16] Account Keryan selecting character Keryan
[08/11 00:05:18] Exception in: pkg/npcs/animals/ai_animal_barker.ecl: bad allocation
 PC < nLines: (ferencepe 1792:  1792: global #13
1793:  1793: get member 'z'
1794:  1794: 20L
1795:  1795: 7L
1796:  1796: "britannia"
1797:  1797: Func(3,41): ListMobilesNearLocationEx
1798: >1798: initforeach @1804
1799:  1799: local #0
1800:  1800: get member 'npctemplate'
1801:  1801: if true goto 1804
1802:  1802: 0L
Exception in: pkg/npcs/animals/ai_animal_barker.ecl: bad allocation
 PC < nLines: (ferencepe 1792:  1792: global #13
1793:  1793: get member 'z'
1794:  1794: 20L
1795:  1795: 7L
1796:  1796: "britannia"
1797:  1797: Func(3,41): ListMobilesNearLocationEx
1798: >1798: initforeach @1804
1799:  1799: local #0
1800:  1800: get member 'npctemplate'
1801:  1801: if true goto 1804
1802:  1802: 0L
Exception in: pkg/npcs/animals/ai_animal_barker.ecl: bad allocation
 PC < nLines: (ferencepe 1792:  1792: global #13
1793:  1793: get member 'z'
1794:  1794: 20L
1795:  1795: 7L
1796:  1796: "britannia"
1797:  1797: Func(3,41): ListMobilesNearLocationEx
1798: >1798: initforeach @1804
1799:  1799: local #0
1800:  1800: get member 'npctemplate'
1801:  1801: if true goto 1804
1802:  1802: 0L
Exception in: pkg/npcs/animals/ai_animal_barker.ecl: bad allocation
 PC < nLines: (ferencepe 1792:  1792: global #13
1793:  1793: get member 'z'
1794:  1794: 20L
1795:  1795: 7L
1796:  1796: "britannia"
1797:  1797: Func(3,41): ListMobilesNearLocationEx
1798: >1798: initforeach @1804
1799:  1799: local #0
1800:  1800: get member 'npctemplate'
1801:  1801: if true goto 1804
1802:  1802: 0L
Exception in: pkg/npcs/animals/ai_animal_barker.ecl: bad allocation
 PC < nLines: (ferencepe 1792:  1792: global #13
1793:  1793: get member 'z'
1794:  1794: 20L
1795:  1795: 7L
1796:  1796: "britannia"
1797:  1797: Func(3,41): ListMobilesNearLocationEx
1798: >1798: initforeach @1804
1799:  1799: local #0
1800:  1800: get member 'npctemplate'
1801:  1801: if true goto 1804
1802:  1802: 0L
[08/11 00:05:19] Unhandled Exception! Writing Minidump file. 
This file with explanation and last lines from log files should be given to the development team.
Saved dump file to 'POL097-2007-07-15 RC4 Coregina-20070810235238-0.dmp'
Last Script: pkg/npcs/animals/ai_animal_barker.ecl PC: 1797
[08/11 00:05:26] Logfile opened.
POL097-2007-07-15 RC4 Coregina (VS.NET 2003) compiled on Jul 15 2007 17:20:26 running.
I dont think there is problem with this AI, becouse without data from 095 its run just fine, so do you know what it can be ?

Our shard has something around 200 players on peeks, and memory usage is about 1,7GB.
Attachments
POL097-2007-07-15 RC4 Coregina-20070810235238-0.dmp
(34.47 KiB) Downloaded 209 times
Justae
Expert Poster
Posts: 79
Joined: Thu May 24, 2007 2:12 pm
Location: South Africa

Post by Justae »

Check your NPC scripts, especially the creation of NPC's. If you are using array {} you will need to convert that to struct. Check the changelog.txt.

Regards
Justae
Keryan
New User
Posts: 11
Joined: Fri Aug 10, 2007 3:30 pm

Post by Keryan »

Justae wrote:Check your NPC scripts, especially the creation of NPC's. If you are using array {} you will need to convert that to struct. Check the changelog.txt.

Regards
Justae
Thank you for idea, but we converted arrays to struct in npc creation long time ago ( about one month ), so there is no problem, and i dont think that problem is in scripts at all.

I tryed to run server without npcs - so I deleted npcs.txt/.bak and npcequip.txt/.bak from data. After that server runs fine, without any problem. So I thought problem is in npc data, but then I tried to put only npcs.txt and npcequip.txt to data ( and some accounts ), without items and server runs fine too.

So where can be problem? Can it be that we are having just too large data - its about 1,7GB in memory, so maybe its too large for POL to handle? ( but then - why it works on pol095 and on 097 not? )
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles »

I get bad allocation too. Doesn't crash mine, just freezes it basically :P Either get this or a crash referencing a hook. In my case both are from the same cause, the 097 pol memory leak problem.
Justae
Expert Poster
Posts: 79
Joined: Thu May 24, 2007 2:12 pm
Location: South Africa

Post by Justae »

My shard uses POL 096.7 now and does not have the issue you describe. However, it does still have to be restarted at least once every two days due to memory leak issue.
Shinigami
Former Developer
Posts: 308
Joined: Mon Jan 30, 2006 9:28 am
Location: Germany, Bavaria
Contact:

Post by Shinigami »

bad allocation sounds like not enough memory. the memory leak was fixed - a new core will be available asap.

Shinigami
Locked