Posted: Thu Aug 24, 2006 9:42 am Post subject: bug: pol crash if removed an ai
I have found a little bug in pol.
If I remove an ai, pol load npcs.txt cna't load npc and abort that npc, and it is ok.
But after it find backpack it crashes with:
deferred inserts:Item 0x635f3861 is supposed to be on Character 0x1091dc6, bu
that character cannot be found.
Server Shutdown: reading data
Leftover objects in objecthash: 1520483
Leaking a copy of the objecthash in order to avoid a crash.
Execution aborted due to: Data file integrity error
This isn't so much a bug with POL, as it's a bug with the user
You need to CHANGE the AI - not delete it. A mob can't load if it's AI doesn't exist. So instead, have the AI in question kill the mob, so the mobs will simply kill themselves on startup or restart of the mob.
Once all the existing mobs that use this AI are gone, you can safely delete it, assuming you don't have any npcdesc entries which refer to it, still.
Author
Message
MuadDib POL Developer
Joined: 13 Feb 2006 Posts: 830 Location: Indiana, USA
Posted: Fri Aug 25, 2006 4:39 pm Post subject:
That's not a bug per say. You removed something, so naturally it causes problem when things that use it, still remain.
The question is however, should the core destroy items in this situation. The root container "does not exist". With it being a backpack (npc or player), moving it to the ground at it's location might cause issues (especially since the pack doesn't truly exist, so we can't get it's coordinates anyway).
We'll discuss this, and see if it would be pheasable to simply destroy items in question like this.
it could be useful have the possibility to choose, like an option in a .cfg, to destroy the item or just don't load POL
Sometimes you need to have the item to find out what was the problem, sometimes you just want POL to load
Author
Message
MuadDib POL Developer
Joined: 13 Feb 2006 Posts: 830 Location: Indiana, USA
Posted: Sat Aug 26, 2006 3:11 pm Post subject:
Quote:
08-12 Austin
Changed: pol.cfg IgnoreLoadErrors=1 (enabled) changes
Instead of stopping the startup, the following will occur:
* If an item belongs in a container or on a character and neither
are present, the item will be destroyed.
* If an item has an undefined objtype greather than 0x3FFF, it will not be loaded.
Author
Message
Austin POL Developer
Joined: 30 Jan 2006 Posts: 354 Location: San Diego, California
Posted: Sat Aug 26, 2006 9:16 pm Post subject:
The best solution to fix this would be to hardcode NPC AI into the core
Yeah in 097 its a little more forgiving of errors if you enable IgnoreLoadErrors.