Aleph-One-Marathon / alephone

Aleph One is the open source continuation of Bungie’s Marathon 2 game engine.
https://alephone.lhowon.org/
GNU General Public License v3.0
644 stars 100 forks source link

Assertion Failure: map.cpp Line: 788 when playing "God Will Sort The Dead" in M2 #20

Open ErikaRedmark opened 8 years ago

ErikaRedmark commented 8 years ago

Whilst playing Marathon 2 in co-op (using irons co-op script but I doubt it had a direct effect on this given this is new and seems specific to a single level), playing on God Will Sort The Dead, sometimes death by an exploding Bob will trigger an assertion failure on line 788 in map.cpp:

parasite_index!=NONE

We have played through Infinity and the rest of Durandal without ever encountering this issue before on any other level with exploding Bobs... then again this is the first level where we are dying to them constantly.

My friend is in Finland and he is the host: I have Windows 7, he has Windows 8. I do not believe the graphics specs are relevant to this bug but if they are let me know and I will contact him and post both of our more detailed system specs.

Hopper262 commented 8 years ago

It looks like this assertion error happens when there are no object slots left on the map to respawn the player. Almost every 2D sprite you see is an object -- ammo, scenery, monsters, explosions -- and there's a fixed limit to the number on a level.

As you mentioned on the Pfhorums, the testing you're doing on Co-op.lua has the side effect of duplicating items. Is it possible you filled up the map with extra ammo after multiple deaths? If that's the case, you'd be able to trigger this on any level by dying enough, regardless of how you died.

If you noticed anything that does or doesn't fit with this theory, or if you get any time to test it more, please let me know. Graphics specs shouldn't matter on this one, unless I'm way off base and the actual cause is something stranger. Thanks much for the report, and for all you're doing to try to get Co-op.lua working properly!

ErikaRedmark commented 8 years ago

We have upwards of 500 fusion pistol batteries due to the item duplication and playing on Total Carnage. The most recent changes I made to the script in an attempt to isolate the rogue code in co-op.lua meant that we keep our inventory AND drop it, and with the sharing, effectively triple ammo very easily. This assertion error occurs when one of us dies... which makes sense, now everything is dropped on the map and it crashes once I attempt to respawn. I take it this also explains why not all of our ammo would drop originally (like if I had 120 magnum clips, it would only drop 50?). I guess we finally reached an extreme we never reached before due to the new script being quite... erm, cheaty with ammo.

Is there a way to maybe search for the lowest ranking piece of ammo/monster, and take them out to respawn the player? The effect should be unnoticeable and may prevent the assertion failure, although I am not familiar at all with the code and have no idea how feasible that would be.

In the mean time, what I can do, to preserve our testing AND not cause horrible things to happen, would be to empty out all our ammo to reasonable levels, save, and then remember to waste as much ammo as possible for the rest of the game :). I have no problems wasting 30 packs of rockets.

We can only test each weekend because that's the only time we can play; Finland and America are off quite a bit in time zones so really Sundays are the only days. Having said that, relating to the Co-op script I will post the modifications I made on the pfhorums in case anyone has time to test them a bit more.

Thank you for the information!