MantisBT - Zandronum
View Issue Details
0003107Zandronum[All Projects] Bugpublic2017-04-29 08:332018-09-30 21:45
Cutman 
 
highmajoralways
closedfixed 
MicrosoftWindowsXP/Vista/7
3.0-beta 
3.03.0 
0003107: Issues with weapon switching and state jumps
In 3.0 we've started to notice people getting invalid weapon state errors online. It's difficult to pinpoint the issue but one of our weapons can reproduce it every time. The error does not appear in 2.1.2.

I've made a Doom version of our weapon. Sadly it's still a little complicated but I couldn't come up with a more minimal example (excuse the graphics). I'll explain what it does:

You fire the weapon once to activate it. It then enters a waiting loop.
If you press fire again it will deactivate it and fire a projectile.
While activated it will heal you if you are damaged (this is where some of the jumps are called).

If press and hold fire (while it is not activated) and quickly switch to a regular doom weapon (and keep holding fire), you should get a couple of error messages appear and some graphical glitches. This ONLY happens online, so I assume what is happening is the weapon is getting desynced somewhere.
1. Host and join your own server with the file attached, deathmatch 1 map01.
2. Obtain the Plasma Rifle in MAP01 (or cheat to give yourself PlantBarrierWep).
3. Select the weapon. Press and hold the fire button and immediately switch to a different regular weapon. Continue to hold fire.
4. A bunch of error messages should appear.
This "unique" weapon isn't the only weapon causing this. Other weapons that get stuck in a loop and call jumps also have this this problem and is most likely not limited to mm8bdm weapons.
No tags attached.
related to 0002832closed Dusk Incorrect Jump Frame Errors 
child of 0002776closed Dusk FindStateLabelAndOffset flaws 
? jumptest.wad (1,818) 2017-04-29 08:33
https://zandronum.com/tracker/file_download.php?file_id=2083&type=bug
? jumptest2.wad (604) 2017-04-30 12:10
https://zandronum.com/tracker/file_download.php?file_id=2091&type=bug
Issue History
2017-04-29 08:33CutmanNew Issue
2017-04-29 08:33CutmanFile Added: jumptest.wad
2017-04-30 12:10CutmanFile Added: jumptest2.wad
2017-04-30 12:29CutmanNote Added: 0017441
2017-04-30 12:32CutmanNote Edited: 0017441bug_revision_view_page.php?bugnote_id=17441#r10483
2017-04-30 13:14CutmanNote Edited: 0017441bug_revision_view_page.php?bugnote_id=17441#r10484
2017-04-30 20:12WaTaKiDNote Added: 0017470
2017-04-30 20:19WaTaKiDRelationship addedchild of 0002776
2017-05-01 17:31Torr SamahoNote Added: 0017482
2017-05-01 17:31Torr SamahoStatusnew => needs testing
2017-05-01 17:31Torr SamahoTarget Version => 3.0
2017-05-01 18:00WaTaKiDNote Added: 0017485
2017-05-01 21:02CutmanNote Added: 0017503
2017-05-02 22:24Ru5tK1ngNote Added: 0017526
2017-05-02 22:24Ru5tK1ngStatusneeds testing => resolved
2017-05-02 22:24Ru5tK1ngResolutionopen => fixed
2017-05-02 22:24Ru5tK1ngFixed in Version => 3.0
2017-05-07 14:52Torr SamahoRelationship addedrelated to 0002832
2018-09-30 21:45Blzut3Statusresolved => closed

Notes
(0017441)
Cutman   
2017-04-30 12:29   
(edited on: 2017-04-30 13:14)
I have uploaded a second example that clears out most of the junk that isn't required to see the bug (it is now a simple nonsense weapon to purely show off the desync, weapon name is "TestWeapon"). Repeat the steps to reproduce to see and you just get a message printed to the screen. Check the DECORATE lump to see some comments that may help identify what causes it.

A lot of weapons have been reported to be doing this in various mods, but most are difficult to reproduce. It seems to be the same problem though, a weapon is trying to access states it doesn't have due to desync.

I don't think I can release a new MM8BDM until we have an answer to this.

(0017470)
WaTaKiD   
2017-04-30 20:12   
i tested some builds and it seems 'https://bitbucket.org/Torr_Samaho/zandronum/commits/be80717ad949c9eae6c091b929c4cb0d7ee06c3a [^]' is related, as switching from TestWeapon to another weapon was broken, but no error message showed

but then with this 'https://bitbucket.org/Torr_Samaho/zandronum/commits/edda8070f9b1011dd162004e6bba9ea9e43922f0 [^]' switching from TestWeapon worked again and the error message showed
(0017482)
Torr Samaho   
2017-05-01 17:31   
The graphical glitches should be fixed now. Also the error messages should be gone . You'll still get a warning if you have "cl_showwarnings 1", but it should be safe to ignore that warning for now.

SetPlayerPSprite and SetThingFrame should be tested thoroughly to make sure that the client is not blocking any valid commands.
(0017485)
WaTaKiD   
2017-05-01 18:00   
this build contains the fix: 'https://www.dropbox.com/s/hayd6havowr3my5/zandronum-3.0-r170501-1721-6265097-windows.zip?dl=0 [^]'
(0017503)
Cutman   
2017-05-01 21:02   
I've tested it with the mm8bdm weapon and had others test the mods that were also causing the issue. Appears to be fixed.
(0017526)
Ru5tK1ng   
2017-05-02 22:24   
Thanks for testing and getting others to test other mods as well. Feel free to re-open this ticket if the issue pops up again.