Page 1 of 3
The infamous 'objects disappearing bug'
Posted: Sun Jun 05, 2011 2:52 am
by Gadget2006
I've been following the changes in Exult for quite a while and a couple months ago I saw the announcement on the front page saying that there's a serious game-breaking bug with objects disappearing that is very difficult to track in the code and fix. I've been regularly looking into CVS changelog since then but the last modification to the code was made in early March 2011 (and so was the latest binary snapshot) - I hope the code base is still being worked on and three months of no CVS activity relevant to Exult modifications and snapshots doesn't mean Exult is going to die away...
At any rate, since Exult currently contains a serious, potentially game-breaking bug that might just appear for no apparent reason and screw up my game, I'd like to ask if you have information on which earlier CVS snapshots have been known not to have this bug. I have earlier pre-1.4.9rc1 snapshot downloads since early February 2010 until March 2011 (pretty much monthly or so) and I'm wondering what would be a rather safe bet to just play through Ultima 7 with Exult without having to downgrade all the way to 1.2 - so that perhaps I'll play without the latest 1.4.9rc1 changes but will not get the 'objects disappearing' bug either. Does anyone know?.. Thank you very much in advance for your response.
And by the way, were there any advances in tracking down the objects disappearing bug (assuming that it was being worked on since March 2011)?.. That's one thing that I'd indeed love to see fixed, as otherwise Exult is just the perfect engine to play through U7.
Re: The infamous 'objects disappearing bug'
Posted: Sun Jun 05, 2011 4:01 am
by Dominus
We have no idea what broke the engine and when. Since there is no sure way to reproduce the problem we can't pinpoint it.
We have some idea what the general problem might be, but right now, people need a break before getting back into fixing Exult.
Re: The infamous 'objects disappearing bug'
Posted: Sun Jun 05, 2011 4:27 am
by Gadget2006
OK, thanks for your response, I'm glad to hear you guys didn't give up on Exult! Have a nice rest from coding and good luck in your future endeavors in fixing the game when you get back to it! I guess I'll give a random old mid-2010 snapshot a try and see if I can beat the game with that.
Re: The infamous 'objects disappearing bug'
Posted: Sun Jun 05, 2011 4:37 am
by Dominus
I wouldn't recommend that, actually. The bug is most likely not a recent one, the first report in the bug tracker was from 2009, so the bug is probably even from 2008 or earlier.
AND we made other changes and fixed stuff as well, so running the latest snapshot and saving often is what I'd recommend.
Re: The infamous 'objects disappearing bug'
Posted: Sun Jun 05, 2011 6:59 am
by Gadget2006
Oh OK, that's strange - I'm pretty much I beat the game back in 2008 and 2009 using SVN snapshots and never experienced such an error, guess I was lucky then.
OK, then I'll try it with the latest snapshot and will just make lots of saves just in case.
Is there any way to pinpoint this bug early on when it happened before it gets "too late"? (I mean, is it apparent immediately that something is up? Or can it be just a random thing disappearing somewhere without me noticing it only to bite me in the butt some 2-3 hours later when I realize that all the saves I made since then went bye-bye?)
Re: The infamous 'objects disappearing bug'
Posted: Sun Jun 05, 2011 12:39 pm
by Dominus
I'm not sure
The one time it happened for me it was apparent, since some objects just disappeared around me but I can't say that this always happens in this way...
Also in my case the problem occurred when I was already playing for a long time in one go (meaning since starting Exult), so that might be related.
Re: The infamous 'objects disappearing bug'
Posted: Sun Jun 05, 2011 4:04 pm
by Gadget2006
Oh OK, thanks for the info.
I'll let you know if any instances of this bug manifest themselves during my playthrough.
Re: The infamous 'objects disappearing bug'
Posted: Mon Jun 06, 2011 4:03 pm
by VisElEchNon
Just out of curiosity, could the bug be the same one as
noted in this article from 1992?
Re: The infamous 'objects disappearing bug'
Posted: Mon Jun 06, 2011 6:35 pm
by Dominus
Exult is NOT Ultima 7.
Exult doesn't use Ultima 7s code.
Re: The infamous 'objects disappearing bug'
Posted: Mon Jun 06, 2011 9:14 pm
by VisElEchNon
Okay, I was just curious...
Re: The infamous 'objects disappearing bug'
Posted: Fri Jun 10, 2011 3:14 pm
by Zosite
Hehehe... as Dominus explains (he made it clear to me too some time ago) Exult doesn't use the original code hence why this particular bug can't be that annoying original one we all suffered back in the day.
However, that article forgets to mention how funny was whenever you noticed that your stuff didn't disappear but it was actually STOLEN by somebody.
I just cannot remember how many times Nicodemus stole reagents from my backpack. And what about the barman at Vesper? (cant' remember the name). I was always checking my stuff right after talking with a few -nice- fellas. uO_o
Re: The infamous 'objects disappearing bug'
Posted: Sun Jun 12, 2011 4:21 am
by Mortegro
Just have to ask... objects disappearing for good? I know no one know what bug is triggering it. But i want to know if this happens only if the Avatar has contact with it? Could objects dispear on there own? In spots that the Avatar haven't explored yet?
Anyway... i hope you guys find this bug.
Re: The infamous 'objects disappearing bug'
Posted: Sun Jun 12, 2011 4:42 am
by Dominus
Yes, objects disappearing for good, no way to reproduce and no idea whether it happens only around the avatar or further away, too. We wrote about it on our front page some months ago.
Re: The infamous 'objects disappearing bug'
Posted: Mon Jun 13, 2011 12:19 am
by Scythifuge
Did this bug happen to occur around the time that the lift was raised to, I think it was a value of 255?
Re: The infamous 'objects disappearing bug'
Posted: Mon Jun 13, 2011 9:03 pm
by bradsucks
Any thought of making a heavily logged version of Exult to try and track the bug down? I'm itching to do a playthrough and have been holding off for like a decade. I'd feel very noble if I thought I was actually helping while I played it.
Re: The infamous 'objects disappearing bug'
Posted: Sat Jun 18, 2011 4:22 pm
by Luke
Semi-related, can the cheat options track down an object and give the in world location to see if it has succumbed to the bug or that I simply misplaced it... *embarrassed grin*
Can't find the talisman from the FOV test of truth....
Re: The infamous 'objects disappearing bug'
Posted: Sat Jun 18, 2011 5:13 pm
by Dominus
Nope, can't do that
Re: The infamous 'objects disappearing bug'
Posted: Sun Jul 31, 2011 11:24 am
by Muzza
This may seem like a stupid question but,
Did origin not already fix the bug that causes things to disappear? Could it be that some people are using the unpatched original version of Ultima 7 BG?
Upon installing my copy of Ultima 7, from the Ultima Collection CD, i found a zip with a patch to update Ultima 7 to version 1.1..
The beggining of the patch batch file says:
@echo off
echo ***********************************************
echo * Ultima VII - The Black Gate update program *
echo * Ver 1.1 (C) 1992 Origin Inc. *
echo * Problem: Once in a great while, items or *
echo * terrain disappear or are altered. Keys are *
echo * removed from party inventory while sleeping.*
echo ***********************************************
The patch zip contents are:
KZ.EXE 32KB
U7.KZ 303KB
UPDATEU7.BAT 2KB
XXX.EXE 11KB
I can't figure out if this patch is already applied to the copy on the Ultima Collection CD im using as it won't let me patch on my 64-bit system.
I imagine this is a long shot, but I thought it odd that this patch is not mentioned in the FAQ and i cannot search it anywhere else in the forum. I would guess that there would be a large variation in the versions/sources of Ultima 7 installs that people are using with Exult.
So is it possible that people are using unpatched buggy copies of Ultima 7 with Exult rather than Exult causing Ultima 7 to be buggy?
Re: The infamous 'objects disappearing bug'
Posted: Sun Jul 31, 2011 11:26 am
by Muzza
Nevermind that last post - just read that none of Exult is origial code.
Re: The infamous 'objects disappearing bug'
Posted: Tue Aug 02, 2011 9:14 pm
by Anonymous
It happened to me today. Here's a summary of what happened:
I was in New Magincia with a party composed of Avatar, Iolo, Spark, Shamino, Sentri and Jaana. I noticed Katrina out (it was around 9 PM), near that small house in the center of the island, and stuck in the position the characters have when they're going to sit down or vomit. I talked to her a bit, then I saved; a bit after saving Exult hung, so I restarted it and loaded the game. Jaana was not in the party anymore; the join command on her did nothing to solve this. I managed to add her to the party by using the cheats menu, toggling the party switch in the NPC stuff twice. I noticed the clock was off and had approximately the same time as the next-to-last save (11 AM), furthermore the notes I did disappeared, so I teleported to Cove, then Vesper to make sure the sub-quests I completed since then save were still counted completed. In Cove they weren't, but the real surprise was to be found in Vesper: almost every piece of furniture in the Gargoyle part of the town (including doors, tables etc.) had disappeared.
I'm using Exult v1.4.9rc1 compiled from the sources.
Re: The infamous 'objects disappearing bug'
Posted: Wed Aug 03, 2011 12:55 am
by paulo
Is exult tested with valgrind?
Re: The infamous 'objects disappearing bug'
Posted: Wed Aug 03, 2011 1:58 am
by paulo
Slow as god's wrath.
==15765== LEAK SUMMARY:
==15765== definitely lost: 291,170 bytes in 715 blocks
==15765== indirectly lost: 2,743,988 bytes in 27,922 blocks
==15765== possibly lost: 139,348 bytes in 1,447 blocks
==15765== still reachable: 132,219 bytes in 2,217 blocks
==15765== suppressed: 0 bytes in 0 blocks
==15765== Reachable blocks (those to which a pointer was found) are not shown.
==15765== To see them, rerun with: --leak-check=full --show-reachable=yes
==15765==
==15765== For counts of detected and suppressed errors, rerun with: -v
==15765== Use --track-origins=yes to see where uninitialised values come from
==15765== ERROR SUMMARY: 218 errors from 218 contexts (suppressed: 1402 from 7)
Anyway, gonna log a while.
Re: The infamous 'objects disappearing bug'
Posted: Wed Aug 03, 2011 10:51 am
by paulo
Ok here is a simple log just from walking around. Most lost memory seems to be from subclass overriding? No invalid accesses yet.
Anyway, here is a cut down log with:
cat leaks.txt | grep -A 2 -i invalid; cat leaks.txt | grep -A 2 -i indirectly ;cat leaks.txt | grep -A 2 -i definitely > leakssimple.txt
http://pastebin.com/awPCiQJt
(the complete thing is bigger than the file limit on paste bin)
Re: The infamous 'objects disappearing bug'
Posted: Wed Aug 03, 2011 10:58 am
by paulo
Wrong concat operator and stuff.
cat leaks.txt | grep -A 2 -i invalid >> leakssimple.txt; cat leaks.txt | grep -A 2 -i indirectly >> leakssimple.txt ;cat leaks.txt | grep -A 2 -i definitely >> leakssimple.txt
http://pastebin.com/raw.php?i=4DS8yMEi
Re: The infamous 'objects disappearing bug'
Posted: Sat Aug 06, 2011 7:46 pm
by kaizoku
To keep my message short: I haven't tried Exult myself but I found the following message regarding the cause of this issue:
At
http://rpgcodex.net/phpBB/viewtopic.php?t=62655
It says:
Solution to Ultima VII BG freezes found(?)
Exult 1.4.9rc1: played U7 SI without freezing problems, then played U7 BG with freezes every now and then.
I noticed how many items are spawned by NPCs doing jobs like baking, sewing, waiting on tables. There are lots of shears and dining plates generated on one location. Britain it self has 5 NPCs doing this, and almost every town has a tavern keeper generating food and dining plates.
Now, the freezing in U7 BG is known to be accompanied by loss of items, so I decided to disable or change the NPCs behaviour using the cheat menu and altering their NPC schedules, I also deleted some crafting equipment like tables. This way they cannot generate items. I decided to be on the safe side and delete useless items lying around.
Starting a new game and doing this, there is so far no more freezing. I'm guessing that it is due to the crafters or the items generated. Try this and see if it works for you, remember to delete the excess generated items.
Re: The infamous 'objects disappearing bug'
Posted: Sat Aug 06, 2011 9:33 pm
by Dominus
Re: The infamous 'objects disappearing bug'
Posted: Sun Aug 07, 2011 4:11 am
by Colourless
With this information it may be possible to actually track down whats gone wrong.
Re: The infamous 'objects disappearing bug'
Posted: Wed Sep 21, 2011 12:47 am
by BeagleBoy
Out of curiosity, does anyone have a rough idea of when this bug started to manifest?
I ask, because I recall playing and winning both BG and SI with exult in the past, but I admit it's been quite a while. So I was wondering if I had just been lucky when I played, or if the bug was introduced (or became more prevalent) since my last time playing.
Basically, I've got the urge to play U7 again. So I can play under dosbox (okay, but sound isn't perfect), play under my old copy of Exult (not perfect, but it was certainly playable), or download the latest copy. If my copy from 3 years ago was just as likely to have the bug hit, then I won't worry too much about using a new copy. Otherwise, I'll probably stick with the old copy.
I suppose my other option would be to break out the debugger and try to help solve the problem. But between coding all day at work, and changing kids' diapers at home, I'd kinda like to just play a game in the evening.
-Jim
Re: The infamous 'objects disappearing bug'
Posted: Wed Sep 21, 2011 9:46 am
by Colourless
Don't think anyone has looked into it yet. An idea might be to run it through valgrind and just leave it sitting in britain in the pub and just wait and see what happens.
Re: The infamous 'objects disappearing bug'
Posted: Thu Sep 22, 2011 9:21 am
by Dominus
Marzo and I talked a bit about what *could* be done
http://log.usecode.org/exultlog.php?log=25Aug2011
Re: The infamous 'objects disappearing bug'
Posted: Tue Oct 11, 2011 11:32 am
by agentorangeguy
I've had some issues with entire u7ireg files being 'blanked' back to 512bytes or whatever. luckily I keep backups of the gamedat folder so I can replace the 'blanked' ones. I did notice the Blue Boar had some food stocking up on the plates, so I created a usecode egg to delete the excess food in a certain area when you pass by, that way it doesn't get piled up. Here it is, if anyone wants to use it as a temporary fix like I did. Works nicely!:
Code: Select all
void RemoveFoodBlueBoar ####() //# is number of egg
{
if (event == EGG)
{
pos1 = [0x418, 0x4ea]; //top left corner of rectangle - hex coords
pos2 = [0x4c9, 0x4fb]; //bottom right corner of rectangle -hex coords
var food = UI_find_object(-359, SHAPE_FOOD, -359, FRAME_ANY);
//all individual food frames, so everything gets deleted
UI_remove_from_area(SHAPE_FOOD, 0, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 1, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 2, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 3, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 4, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 5, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 6, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 7, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 8, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 9, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 10, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 11, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 12, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 13, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 14, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 15, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 16, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 17, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 18, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 19, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 20, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 21, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 22, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 23, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 24, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 25, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 26, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 27, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 28, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 29, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 30, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 31, [pos1], [pos2]);
UI_remove_from_area(SHAPE_FOOD, 32, [pos1], [pos2]);
}
}
(edit by Dominus: corrected pos2 as Agent wrote in the following post)
Re: The infamous 'objects disappearing bug'
Posted: Tue Oct 11, 2011 11:33 am
by agentorangeguy
whoops, for 'pos2' it is the BOTTOM RIGHT corner of the rectangle.
Re: The infamous 'objects disappearing bug'
Posted: Tue Oct 11, 2011 1:02 pm
by Dominus
I'm not sure this helps to much, as far as I think the bug works it is regardless whether the Aavatar is near.
Re: The infamous 'objects disappearing bug'
Posted: Tue Oct 11, 2011 1:51 pm
by agentorangeguy
yeah, I've had random areas wiped clean for no apparent reason. the egg I made at least makes things better for the eyes, it sucks seeing piles and piles of food on someone's plate haha
Re: The infamous 'objects disappearing bug'
Posted: Tue Oct 11, 2011 3:22 pm
by Dominus
yeah, I thought Malignant added some code to make the pubs a bit cleaner to SVN.
Re: The infamous 'objects disappearing bug'
Posted: Tue Oct 11, 2011 3:23 pm
by Dominus
Btw. I'd pay for someone to fix that damn disappearing objects bug
Re: The infamous 'objects disappearing bug'
Posted: Thu Oct 13, 2011 1:23 am
by 1crash007
Just out of mere curiosity what if someone tried something like this:
create a random party of 2 standard characters and two npcs
give each a backpack with 10 coins.. some food two pieces and a random
item (hammer pickaxe sword blank.... etc)
Create a business schedule for each of them in different locations
then teleport yourself around a few times allow some days to pass time..
find a trigger of a quest or something...
then go and recall all party and npcs and check there inventory..
if they gained items then maybe they are from activating them when they were walking off screen..
If items disappeared then track from there..
Also when the backpack issue was fixed a while back did the bugs occur before? (bug about items going outside backpack grab limit)
Re: The infamous 'objects disappearing bug'
Posted: Thu Oct 13, 2011 4:57 am
by Dominus
The bug is not about items disappearing from the inventory, it's about whole areas being wiped to the bare chunk (in the worst case).
Re: The infamous 'objects disappearing bug'
Posted: Thu Oct 13, 2011 12:05 pm
by N
Hey,
Could you guys put out a general statement about what sorts of savefiles/help could be good from us non-coders?
I'm sure that we'd love to help you solve this -- so just tell us if you can think of anything useful. (ie. Savefiles with missing objects -- I think that the drawbridge to castle Britannia disappeared in one of my games...)
If that isn't useful, then let us know what we can provide to render assistance.
Cheers!
-N
Re: The infamous 'objects disappearing bug'
Posted: Thu Oct 13, 2011 6:37 pm
by Dominus
Right now no user help is needed. Right now it needs a developer/programmer to tackle it.
Re: The infamous 'objects disappearing bug'
Posted: Sun Feb 05, 2012 8:25 am
by Hammerite
I have the very same thing happen... Haven't played U7 for sometime, download the latest Exult.exe played a few hours and noticed something funky. All the furnitures and item disappeared from the houses.
Re: The infamous 'objects disappearing bug'
Posted: Sun Feb 05, 2012 8:50 am
by Dominus
Then don't play further with this savegame, playing on with this will not get better. Revert to one where the furniture is not yet gone. Save often and often reload, or restart Exult.
Re: The infamous 'objects disappearing bug'
Posted: Sun Mar 25, 2012 1:16 am
by drcode
I'd like to work on this, but I have no idea how to make the bug happen. I think it might have occurred years ago for me when I was in Britain, and it does seem to have something to do with being in an area with lots of objects. It also might have to do with the 'cache-out' code, which happens when you walk away from an area. The objects there are supposed to be stored in a separate buffer, then restored when you walk back.
I tried using the 'cheat' screen to insert loads of extra objects by the Avatar, then walk away and back; but nothing went wrong. Anyone have a savegame where they could reproduce the problem?
Re: The infamous 'objects disappearing bug'
Posted: Sun Mar 25, 2012 3:46 am
by paulo
Can you limit given allowed memory to a linux program?
Re: The infamous 'objects disappearing bug'
Posted: Sun Mar 25, 2012 1:48 pm
by marzo
DrCode: I am just about 100% sure that the disappearing objects bug is due to double deletion -- several schedules hold live pointers to their temporary objects that may be deleted due to a cache out; and the schedules also delete these objects once they end (for example, due to a cache out). I doubt this happens only in schedules, but I am sure it happens in them. I had begun some work on using smart pointers (the fork I made) for objects (instead of raw pointers), but unfortunately I haven't had much time to work on it.
Re: The infamous 'objects disappearing bug'
Posted: Sun Mar 25, 2012 4:23 pm
by paulo
Is smart pointers the equivalent of WeakReferences in garbage collected languages?
Re: The infamous 'objects disappearing bug'
Posted: Sun Mar 25, 2012 10:05 pm
by marzo
There are "weak" and "strong" smart pointers; so in a sense, yes and no.
Re: The infamous 'objects disappearing bug'
Posted: Mon Mar 26, 2012 7:47 pm
by drcode
Marzo: That makes a lot of sense. But it looks like everything gets deleted in cache-out and the schedules by a call to 'remove_this(0)', which puts the object in gwin's 'removed' list, which is a 'map' that should avoid having the same item there twice.
Re: The infamous 'objects disappearing bug'
Posted: Tue Mar 27, 2012 4:36 pm
by marzo
Consider this case: the NPC in a schedule places an item in the map. He then moves to a different chunk (because the schedule takes place near a chunk's edge). The player moves away, caching out the chunk where the object was placed (deleting the object) but -- and this is crucial -- not the NPC.
That alone would be dangerous: the schedule keeps a live pointer to the object and may cause problems if the NPC tries to do something with that pointer. But to make things worse, any of these cases may happen:
[*] A change of schedule causes ::ending to be called, which tries to delete the object;
[*] in the course of the schedule, the schedule tries to delete the object as part of the normal course of operations;
[*] the player moves further away and triggers the cache-out of the chunk where the NPC is in; this causes ::ending, causing the object to be deleted.
Since the chunk where the object was has already cached out, the object has already been deleted and will no longer be in the 'removed' list. Thus, the second attempt to delete the item will go through, resulting in the double delete.
Re: The infamous 'objects disappearing bug'
Posted: Tue Mar 27, 2012 8:00 pm
by VisElEchNon
In this case wouldn't it be "relatively easy"* to test this by creating a test NPC with a schedule similar to what you've described?
* Yeah, I know, nothing is ever as easy as it sounds where programming is concerned.