Bug: Possible start to "disappearing objects" problem?

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Leo213

Bug: Possible start to "disappearing objects" problem?

Post by Leo213 »

I used to be an alpha tester at 2K games so I decided to put my skills to use in an attempt to find the root of my most pressing concern with this engine, the "disappearing objects" bug, which I believe goes hand in hand with the sporadic crashes.

I have found that the Exult engine currently does NOT properly unload walls and foliage from a chunk/cell when the avatar moves away and/or teleports away from said chunk/cell. Upon returning the chunk/cell IS reloaded, causing a doppelganger effect where two of the same wall/foliage are stacked upon each other. As far as I can tell, only these two object types are affected, but I have only invested about an hour into this test and I am sure there are other types affected as well.

This can be reproduced quite easily. Create a new game or load an existing game. Enable cheats, and enable the hack mover. Find a tree or building to use as a landmark. Now either walk away from it for about a minute or teleport to a different part of the world using the F3 map. Return to the landmark object and use the hack move to move the tree/wall to a different location. As you can see, there are now two of these objects.

This does NOT occur in the original game as I have tested it. It only occurs in the Exult engine. I have continually teleported from Trinsic to Britain over and over and apparently there is no limit to the amount of duplicates it will create.

Loading a game, or restarting Exult, does properly reload the chunk/cell though, which leads me to believe that it is not the duplicate trees/walls piling up that are causing the crashes or objects from disappearing. This in turn leads me to think that there must be another type of object that I have not found yet, which DOES cause the bug to occur, if it happened to be duplicated via the above issue.

Ultimately instead of trying to find out which item this is, I'd like to ask the developers to fix the duplication problem first, which would hopefully create a chain reaction and fix other bugs in turn.

TLDR: Make sure the engine properly unloads and/or loads every object and item upon leaving and/or entering a chunk/cell. Thanks in advance and sorry for all the slashes, it is how I've been trained to type bug reports.
Leo213

Re: Bug: Possible start to "disappearing objects" problem?

Post by Leo213 »

I'd like to add boulders, rocks, and mountains to the list of things that get duplicated.
Crysta the Elf
Posts: 573
Joined: Thu May 14, 2020 1:34 pm

Re: Bug: Possible start to "disappearing objects" problem?

Post by Crysta the Elf »

So then.. is it possible the overboard number of items I saw the NPCs making in Moonshade in part because of this as well? Check if this happens with NPC created items too, please.

It would make sense, so i'm hopeful... if something like this were artificially multiplying the number of NPC created items, it would increase the chances of that bug they were talking about happening.. fixing this might not be a permanent fix for the issue, but it could reduce the chances of it happening back to what it was.
Crysta the Elf
Posts: 573
Joined: Thu May 14, 2020 1:34 pm

Re: Bug: Possible start to "disappearing objects" problem?

Post by Crysta the Elf »

Er.. specifically food items and shears. Sorry for the double post.
Leo213

Re: Bug: Possible start to "disappearing objects" problem?

Post by Leo213 »

It does not occur on those items. Honestly I'm not too sure if the "double deletion" theory is the actual cause of the "disappearing objects" bug, but it could be the reason behind the random crashes.

In regards to the "doppelganger" bug I listed, it could very well be causing an object overflow in the engine, and as a result delete objects elsewhere to make room for all the new duplicates.

The simplest solution would be to fix the walls, foliage and rocks from duplicating and from there we can see if it makes any difference in regards to the other, more severe bugs.

Any devs available for comment? Also could someone please post this on the bugtracker, I just can't be arsed.
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: Bug: Possible start to "disappearing objects" problem?

Post by Colourless »

If that is happening there is probably issue involving 'static' object being removed and cache out. I don't think its likely to cause the 'disappearing objects' problem. Exult doesn't use any sort of object ID system, it just uses pointers to objects so it can keep allocating new objects until you run out of virtual address space. This issue though is likely to slow down things like pathfinding and rendering.
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: Bug: Possible start to "disappearing objects" problem?

Post by marzo »

Don't bother with the bug tracker, I fixed it; but next time, please be "arsed" to do it yourself.

For what is worth, I would give a million to one odds of this being the cause of the disappearing objects bug: this is a memory leak, nothing else, and the game would be more likely to crash than anything else if enough duplicates were generated to fill up the RAM and prevent more objects from being created.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
TDI

Re: Bug: Possible start to "disappearing objects" problem?

Post by TDI »

Funny, I think I may have stumbled on this bug years ago when I implemented a "lumberjack" feature in usecode. I wrote a script that allowed you to chop down trees and it would replace the tree with a tree stump and place some wooden planks below the stump. Upon leaving the area and returning, the tree would be there again, as well as the stump.

I thought about reporting this, but I figured it was probably a problem with my script or a side-effect due to an U7-chunk being reused throughout the map, making it actually impossible to fell just one tree without affecting all the other trees of the same chunk on the map.
TDI

Re: Bug: Possible start to "disappearing objects" problem?

Post by TDI »

And what I forgot to mention... when removing the tree with hackmover, there would be a second tree below the first one, which certainly seemed very fishy.
TDI

Re: Bug: Possible start to "disappearing objects" problem?

Post by TDI »

Well, seems I actually did mention this bug on the forum, 5 (!) years ago:

http://exult.info/forum/viewtopic.php?p=149475#p149475
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Bug: Possible start to "disappearing objects" problem?

Post by Dominus »

He he, see, that's why I always tell people it's best to log a real bug report in the bug tracker. Forum posts get "lost".
I do remember that I found this one too at some point but forgot to log it ;)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: Bug: Possible start to "disappearing objects" problem?

Post by marzo »

For what is worth, I would give a million to one odds of this being the cause of the disappearing objects bug: this is a memory leak, nothing else, and the game would be more likely to crash than anything else if enough duplicates were generated to fill up the RAM and prevent more objects from being created.
While I stand by that statement, I have something else to add, now that I think about it: it is possible that the memory leak increased the odds of the disappearing objects bug to happen. Since the leak caused more memory to e used for objects, this could increase the chance of a freed block being recycled in time for the new object to be incorrectly freed.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Locked