Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Mordeth

[BUG] showcase level

Recommended Posts

Now that excellent progress is being made, I figured it would be a good time to reiterate some of the bugs I've encountered so far. They are showcased in the following level:

https://www.dropbox.com/s/l1pdwbslb27w2xj/bug.wad?dl=0

Crash: linked portal combined with 242 action

First, the bugs that crash EE. They have all to do with the combination of a (linked) portal with Boom's transfer flat action (242), commonly used to create pools. The starting room has two pools, but no portal. You can enter, bob under/above water, die and sink below the surface, etc etc and everything is well. The smaller pool has a pillar of water you can also walk through.

The room to the east is a copy of the water pool, now with nukage textures. Setup is the same, except this room has a linked portal room attached to the ceiling. Now, walking (repeatedly) through the pillar will more often than not crash EE. Note that this pillar does not actually have a portal attached, just the area around it. Enter the bigger pool. Going in/out the pool by the stairs will sometimes crash EE when breaking the surface. Now, stand inside the pool with your viewpoint still above the surface, then kill yourself. As you die and sink below the surface, EE will almost always crash.

Misbehaving polyobjects

The room to the west contains four polyobjects, with can be rotated by the switches in front of them. The METALx on the utmost left will rotate continuously; the one right next to it will rotate 180 degrees (byteangle = 128). The left marble one is supposed to rotate 360 degrees once (byteangle = 0). It doesn't, but 'jitters' slightly before stopping. The right marble polyobject is supposed to rotate 270 degrees (byteangle = 192) but this one too will just 'jitter' slightly in place.

Sector ceiling movement to 3Dmidtex as vertical scroll

To the left of the polyobject platform are two pillars, that open like a door. The door's ceiling movement is transferred by action 282 to the 3Dmidtex STEPTOP next to it. The metal pillar acts like a normal door, and you can repeat opening/closing the door as often as you like and the STEPTOP will mimic the movement. The marble pillar acts like a fast door. When the fast door closes, you'll notice that its STEPTOP texture has not returned to its original location, but has 'bounced up' a little. Repeating to open/close the fast door will make matters worse and worse.

Share this post


Link to post

I am still looking into the bug. I understand why the bug happens and will try to explain it cleanly.

For the right metal pillar, the "distance" is set to value 0x80000000 (this is considered negative as distance is an int). After it does the first step of rotation it decrements distance by the amount moved, setting it to some amount less than 0x80000000, which is considered positive.
The important lines here are:

if(this->distance <= 0)
{
   // remove thinker
   [SNIP]

   // TODO: notify scripts
   S_StopPolySequence(po);
}
I think that if I add a flag called wasPositiveAtSomePoint (with a better name) and edit the above statement to what is shown on the following line then this would fix the bug potentially:
if(this->distance <= 0 && wasPositiveAtSomePoint)
The reason why it doesn't work for other angles is made somewhat apparent now, if distance is >= 0x80000000 after the first call of the rotation function (Polyobj_rotate(po, this->speed)), then it is considered negative and sets off the above code to stop the polyobj sequence.

EDIT: I think I have fixed the issue, but it likely needs more thorough testing. The fix can be found here. [url]https://github.com/team-eternity/eternity/compare/master...Altazimuth:polyobj-fix?expand=1/url]
I'll try to have it looked at ASAP and see if it can be pushed to the main repo so that you can get in in a build soon.
EDIT 2: Quasar would like to understand the code a bit more carefully before settling on this.

Share this post


Link to post

I have managed to fix the issue that causes the issue with the 3DMidTex being connected to the fast doors. The issue wasn't just limited to fast doors but in fact any door where its movement per tic wasn't a divisor of the distance it had to go. If you test your map again, moving the floor (and ceiling of the pillars) up one unit then you will find the same issue present with the metal pillar too.

The problem code ended up being in T_MoveCeilingDown() in t_plane.cpp. The fix was surprisingly simple.
Change

flag = P_Scroll3DSides(sector, true, lastpos-destheight, crush);
to
flag = P_Scroll3DSides(sector, true, destheight-lastpos, crush);
and the problem is solved. Just a simple sign error.

On a side note, did the issue with polyobjects not rotating properly also affect swinging doors? If so I believe that my code will need to be tested with another map that exhibits this buggy behaviour in the current build, as I will need to extend my fix to also change that.

Share this post


Link to post
Altazimuth said:

On a side note, did the issue with polyobjects not rotating properly also affect swinging doors?


Haven't encountered it with swinging doors 'in the field', so to speak. But then again, not many doors swing >180 degrees :) I guess you can adjust the ED script in this testlevel.

Share this post


Link to post

The bug was present, and is no longer! It was a bit trickier to apply the fix to swinging doors as they are more sophisticated, but the cause was the same so I didn't have to do too much poking around to find out what was wrong.

https://github.com/Altazimuth/eternity/commit/3339e8d0194307af9994ed76350f402e84d9facf

EDIT: Both my fixes have been implemented, so the next DRD Team build should have the fixes in. Be sure to try them out!

Share this post


Link to post
printz said:

Also fixed the crash, both on trunk and on my portal branch.


Close, but no cigar:

Spoiler

eternity caused an Access Violation Exception (0xc0000005)
in module eternity.exe at 001b:00ec4713.

Error occurred at 1/19/2016 15:52:54.
C:\GAMES\Eternity\eternity.exe, run by xxx.
Operating system: 6.0.6002
2 processors, type 586.
61% memory in use.
2048 MB physical memory.
1290 MB physical memory free.
0 MB page file.
0 MB paging file free.
2048 MB user address space.
1879 MB user address space free.
Access violation at 00000010. The memory could not be read.

Context:
EDI:    0x00fdb6c0  ESI: 0x0031f934  EAX:   0x00000000
EBX:    0x07f48eec  ECX: 0x09819c00  EDX:   0xff10e6e8
EIP:    0x00ec4713  EBP: 0x0031f8fc  SegCs: 0x0000001b
EFlags: 0x00210206  ESP: 0x0031f89c  SegSs: 0x00000023

Bytes at CS:EIP:
3b 50 10 7f 1f f7 86 44 01 00 00 00 01 00 00 0f 

Stack:
0x0031f89c: 77fc3f58 09819c00 00000005 000002ef X?.w............
0x0031f8ac: 02e36110 3c8b986a 3d4ccccd c31fced0 .a..j..<..L=....
0x0031f8bc: 00000000 0031f8dc 00000559 41980000 ......1.Y......A
0x0031f8cc: 41e00000 c3c26a70 00000005 07f48eec ...Apj..........
0x0031f8dc: 00000000 00ec6524 0000004a 0031f8fc ....$e..J.....1.
0x0031f8ec: 0031faf8 00f23b58 ffffffff 09819c00 ..1.X;..........
0x0031f8fc: 0031fb04 00ec6768 09819c00 00000000 ..1.hg..........
0x0031f90c: 77fc3cfc 099485c8 00000001 00000000 .<.w............
0x0031f91c: 00000000 00000070 00000070 09819c00 ....p...p.......
0x0031f92c: 00000000 3b9244b2 ff000000 feffffff .....D.;........
0x0031f93c: 0000061e 00000651 00000070 3b8c0006 ....Q...p......;
0x0031f94c: 00000574 ffffffff 00000000 00000000 t...............
0x0031f95c: 000000be 000000b8 00000084 00000089 ................
0x0031f96c: 00f28de8 00000000 00000000 00000000 ................
0x0031f97c: 00000000 00ec6700 00000000 00000000 .....g..........
0x0031f98c: 00000000 00000000 00000000 11800000 ................
0x0031f99c: 24c00000 00000000 00000000 00f28de8 ...$............
0x0031f9ac: 00000000 00000000 00000000 00000000 ................
0x0031f9bc: 00000500 00000000 00000000 00000000 ................
0x0031f9cc: 00000000 00000000 11800000 24c00000 ...............$
0x0031f9dc: 00000000 00000000 000891ce 07e3ea68 ............h...
0x0031f9ec: 0000df5c 00000053 00000000 00000000 \...S...........
0x0031f9fc: 00000000 00000000 ffffffff ffffffff ................
0x0031fa0c: 00000000 00000000 00000000 00000000 ................
0x0031fa1c: 00000356 000004e4 ffffffff 00000005 V...............
0x0031fa2c: 00000000 00000000 00000000 077680e0 ..............v.
0x0031fa3c: 00000026 07f7775c 00000000 00000000 &...\w..........
0x0031fa4c: 00000000 00000000 00000000 00000000 ................
0x0031fa5c: 00000000 00000000 00000000 00000000 ................
0x0031fa6c: 00000000 00000000 00000380 00000000 ................
0x0031fa7c: 00000000 00000000 00000000 00000000 ................
0x0031fa8c: 00000000 00000000 ffffffff 00000000 ................
0x0031fa9c: 00000000 00000000 00000000 00000000 ................
0x0031faac: c3800000 c3800000 00000000 00000000 ................
0x0031fabc: 00000000 00000000 00000000 00000000 ................
0x0031facc: 00000000 00000000 00000000 00000000 ................
0x0031fadc: 00000000 00000000 00000002 4593c238 ............8..E
0x0031faec: 4618b789 c36f1918 77fc3cfc 0031fcdc ...F..o..<.w..1.
0x0031fafc: 00f23ba1 00000001 0031fb24 00ec5f0e .;......$.1.._..
0x0031fb0c: 00002b8f 127846f9 262de242 099485c8 .+...Fx.B.-&....
0x0031fb1c: 09948718 00000000 0031fb44 00ec5f0e ........D.1.._..
0x0031fb2c: 00002b87 127846f9 262de242 09948718 .+...Fx.B.-&....
0x0031fb3c: 09948750 00000001 0031fb64 00ec5f0e P.......d.1.._..
0x0031fb4c: 00002b8d 127846f9 262de242 09948750 .+...Fx.B.-&P...
0x0031fb5c: 09948a60 00000000 0031fb84 00ec5f0e `.........1.._..
0x0031fb6c: 00002b8e 127846f9 262de242 09948a60 .+...Fx.B.-&`...
0x0031fb7c: 09948a98 00000001 0031fba4 00ec5f0e ..........1.._..
0x0031fb8c: 00002b9c 127846f9 262de242 09948a98 .+...Fx.B.-&....
0x0031fb9c: 09948b08 00000001 0031fbc4 00ec5f0e ..........1.._..
0x0031fbac: 00002b9e 127846f9 262de242 09948b08 .+...Fx.B.-&....
0x0031fbbc: 09948b40 00000001 0031fbe4 00ec5f0e @.........1.._..
0x0031fbcc: 00002b9f 127846f9 262de242 09948b40 .+...Fx.B.-&@...
0x0031fbdc: 0994f478 00000000 0031fc04 00ec5f0e x.........1.._..
0x0031fbec: 00002ba0 127846f9 262de242 0994f478 .+...Fx.B.-&x...
0x0031fbfc: 0995db78 00000000 0031fc24 00ec5f0e x.......$.1.._..
0x0031fc0c: 00002d81 127846f9 262de242 0995db78 .-...Fx.B.-&x...
0x0031fc1c: 0995dbb0 00000001 0031fc44 00ec5f0e ........D.1.._..
0x0031fc2c: 000031a1 127846f9 262de242 0995dbb0 .1...Fx.B.-&....
0x0031fc3c: 099925e0 00000000 0031fc64 00ec5f0e .%......d.1.._..
0x0031fc4c: 000031a2 127846f9 262de242 099925e0 .1...Fx.B.-&.%..
0x0031fc5c: 09992618 00000001 0031fc84 00ec5f0e .&........1.._..
0x0031fc6c: 000040ac 127846f9 262de242 09992618 .@...Fx.B.-&.&..
0x0031fc7c: 00000000 00fd32d0 0031fc9c 00ecd19d .....2....1.....
0x0031fc8c: 000040ad 00000000 00000001 0002fd58 .@..........X...
0x0031fc9c: 0031fcb4 00e52b58 00fd32d0 00000000 ..1.X+...2......
0x0031fcac: 00e53e18 00ef7d32 0031fcec 00e2a531 .>..2}....1.1...
0x0031fcbc: 00000006 00103fe0 77fc3b14 00000000 .....?...;.w....
0x0031fccc: 00000001 00000000 0031fcc4 0031f490 ..........1...1.
0x0031fcdc: 0031fd1c 00f1f591 773b3010 00000000 ..1......0;w....
0x0031fcec: 0031fd2c 00f20456 00000006 00103fe0 ,.1.V........?..
0x0031fcfc: 001031a0 77fc3ad4 00000000 00000000 .1...:.w........
0x0031fd0c: 7ffde000 00000000 0031fd00 00000030 ..........1.0...
0x0031fd1c: 0031fd68 00f1f591 773ae388 00000000 h.1.......:w....
0x0031fd2c: 0031fd38 7685d3c9 7ffde000 0031fd78 8.1....v....x.1.
0x0031fd3c: 77951597 7ffde000 777253e0 00000000 ...w.....Srw....
0x0031fd4c: 00000000 7ffde000 00000000 00000000 ................
0x0031fd5c: 00000000 0031fd44 00000000 ffffffff ....D.1.........
0x0031fd6c: 77919a9a 00d5e6b0 00000000 0031fd90 ...w..........1.
0x0031fd7c: 7795156a 00f204be 7ffde000 00000000 j..w............
0x0031fd8c: 00000000 00000000 00000000 00f204be ................
0x0031fd9c: 7ffde000 00000000 00000000 00000000 ................
0x0031fdac: 00000000 00000000 00000000 00000000 ................
0x0031fdbc: 00000000 00000000 00000000 00000000 ................
0x0031fdcc: 00000000 00000000 00000000 00000000 ................
0x0031fddc: 00000000 00000000 00000000 00000000 ................
0x0031fdec: 00000000 00000000 00000000 00000000 ................
0x0031fdfc: 00000000 00000000 00000000 00000000 ................
0x0031fe0c: 00000000 00000000 00000000 00000000 ................
0x0031fe1c: 00000000 00000000 00000000 00000000 ................
0x0031fe2c: 00000000 00000000 00000000 00000000 ................
0x0031fe3c: 00000000 00000000 00000000 00000000 ................
0x0031fe4c: 00000000 00000000 00000000 00000000 ................
0x0031fe5c: 00000000 00000000 00000000 00000000 ................
0x0031fe6c: 00000000 00000000 00000000 00000000 ................
0x0031fe7c: 00000000 00000000 00000000 00000000 ................
0x0031fe8c: 00000000 00000000 00000000 00000000 ................
0x0031fe9c: 00000000 00000000 00000000 00000000 ................
0x0031feac: 00000000 00000000 00000000 00000000 ................
0x0031febc: 00000000 00000000 00000000 00000000 ................
0x0031fecc: 00000000 00000000 00000000 00000000 ................
0x0031fedc: 00000000 00000000 00000000 00000000 ................
0x0031feec: 00000000 00000000 00000000 00000000 ................
0x0031fefc: 00000000 00000000 00000000 00000000 ................
0x0031ff0c: 00000000 00000000 00000000 00000000 ................
0x0031ff1c: 00000000 00000000 00000000 00000000 ................
0x0031ff2c: 00000000 00000000 00000000 00000000 ................
0x0031ff3c: 00000000 00000000 00000000 00000000 ................
0x0031ff4c: 00000000 00000000 00000000 00000000 ................
0x0031ff5c: 00000000 00000000 00000000 00000000 ................
0x0031ff6c: 00000000 00000000 00000000 00000000 ................
0x0031ff7c: 00000000 00000000 00000000 00000000 ................
0x0031ff8c: 00000000 00000000 00000000 00000000 ................
0x0031ff9c: 00000000 00000000 00000000 00000000 ................
0x0031ffac: 00000000 00000000 00000000 00000000 ................
0x0031ffbc: 00000000 00000000 00000000 00000000 ................
0x0031ffcc: 00000000 00000000 00000000 00000000 ................
0x0031ffdc: 00000000 00000000 00000000 00000000 ................
0x0031ffec: 00000000 00000000 00000000 00000000 ................
0x0031fffc: 00000000                            ....
===== [end of CRASHLOG.TXT] =====

Note how the access violation now happens at 00000010, not 00000000 as before your fix.

Share this post


Link to post

Sorry for late reply... not enough time. Good news: the crash seems to be gone now!

or on my Portals beta forum page shortly


Your what? where?

Share this post


Link to post
Mordeth said:

Your what? where?

The "portals are ready for testing" thread, this Eternity forum.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×