MantisBT - Zandronum
View Issue Details
0001198Zandronum[All Projects] Bugpublic2012-12-02 13:512014-07-08 10:33
ZzZombo 
Torr Samaho 
normalmajoralways
feedbackreopened 
MicrosoftWindowsXP/Vista/7
 
 
0001198: Player_SetTeam() leaves a ghost player body when the player is morphed
As I've described in my mod's thread, when using this function along with morphing the player leaves the a ghost body of the morphed form. It causes the server to crash when it unloads map. I've shrunk my mod but players leave ghosts bodies now when switched between teams without making the server to crash anymore.
Load attached WAD on D2ST1 in teamgame mode. You can add some bots. Puke script 0000821 player_idx, where player_idx number of the player you wish to infect. At location where he was in time of being infected you will find the ghost body. It can be invisible but it becomes visible when attacked.
Possibly related to an old bug there morphed players with no weapons at the time of map unloading caused the server to crash.

Also an unrelated issue: if you run the file in any other gamemodes the script will try to restart the map in teamgame mode, but as you can see it will fail because the line str s=StrParam(s:"map ",n:PRINTNAME_LEVEL); will produce just "map " and then ConsoleCommand(s); won't work.

When you join the game with the join command you bypass the script that checks joining players' team to move them to humans if necessary.
No tags attached.
? skulltag_bug_example9.pk3 (92,933) 2012-12-02 13:51
https://zandronum.com/tracker/file_download.php?file_id=895&type=bug
zip CrashReport.zip (42,397) 2012-12-09 11:24
https://zandronum.com/tracker/file_download.php?file_id=899&type=bug
? ghostactortestmap.wad (1,583) 2013-07-02 20:14
https://zandronum.com/tracker/file_download.php?file_id=995&type=bug
? skulltag_bug_example10.pk3 (2,775) 2014-07-08 10:33
https://zandronum.com/tracker/file_download.php?file_id=1247&type=bug
Issue History
2012-12-02 13:51ZzZomboNew Issue
2012-12-02 13:51ZzZomboFile Added: skulltag_bug_example9.pk3
2012-12-09 08:26Torr SamahoAssigned To => Torr Samaho
2012-12-09 08:26Torr SamahoStatusnew => assigned
2012-12-09 09:47Torr SamahoNote Added: 0005489
2012-12-09 09:47Torr SamahoStatusassigned => needs testing
2012-12-09 10:59ZzZomboNote Added: 0005492
2012-12-09 11:07Torr SamahoNote Added: 0005493
2012-12-09 11:09Torr SamahoNote Edited: 0005493bug_revision_view_page.php?bugnote_id=5493#r3007
2012-12-09 11:23ZzZomboNote Added: 0005494
2012-12-09 11:24ZzZomboFile Added: CrashReport.zip
2012-12-09 11:24ZzZomboNote Edited: 0005494bug_revision_view_page.php?bugnote_id=5494#r3009
2012-12-09 11:33Torr SamahoNote Added: 0005496
2012-12-09 12:22ZzZomboNote Added: 0005497
2012-12-09 12:23ZzZomboNote Edited: 0005497bug_revision_view_page.php?bugnote_id=5497#r3011
2012-12-09 12:27ZzZomboNote Edited: 0005497bug_revision_view_page.php?bugnote_id=5497#r3012
2012-12-09 20:15Torr SamahoNote Added: 0005500
2012-12-09 20:19Torr SamahoNote Edited: 0005500bug_revision_view_page.php?bugnote_id=5500#r3016
2012-12-18 20:41DuskTarget Version => 1.1
2013-02-14 20:50QentNote Added: 0006026
2013-02-14 21:53QentNote Edited: 0006026bug_revision_view_page.php?bugnote_id=6026#r3324
2013-02-23 16:26Torr SamahoNote Added: 0006064
2013-04-07 00:04DuskNote Added: 0006263
2013-04-07 00:04DuskStatusneeds testing => feedback
2013-04-11 21:42ArcoNote Added: 0006283
2013-06-11 04:26ArcoNote Edited: 0006283bug_revision_view_page.php?bugnote_id=6283#r3541
2013-07-02 04:42ForrestMarkXNote Added: 0006549
2013-07-02 04:52ForrestMarkXNote Edited: 0006549bug_revision_view_page.php?bugnote_id=6549#r3630
2013-07-02 04:53ForrestMarkXNote Edited: 0006549bug_revision_view_page.php?bugnote_id=6549#r3631
2013-07-02 20:13Torr SamahoNote Added: 0006557
2013-07-02 20:14Torr SamahoNote Edited: 0006557bug_revision_view_page.php?bugnote_id=6557#r3637
2013-07-02 20:14Torr SamahoNote Revision Dropped: 6557: 0003636
2013-07-02 20:14Torr SamahoFile Added: ghostactortestmap.wad
2013-07-03 02:17ForrestMarkXNote Added: 0006559
2013-07-03 19:59Torr SamahoNote Added: 0006564
2013-07-04 18:11Torr SamahoNote Added: 0006566
2013-07-04 18:15DuskNote Added: 0006567
2013-07-04 18:24Torr SamahoNote Added: 0006568
2013-07-14 19:02ArcoNote Added: 0006631
2013-07-14 19:06ArcoNote Edited: 0006631bug_revision_view_page.php?bugnote_id=6631#r3687
2013-07-14 20:30DuskTarget Version1.1 =>
2013-07-14 20:41DuskNote Added: 0006639
2013-07-14 20:41DuskStatusfeedback => closed
2013-07-14 20:41DuskResolutionopen => unable to reproduce
2014-07-08 10:31ZzZomboNote Added: 0009902
2014-07-08 10:31ZzZomboStatusclosed => feedback
2014-07-08 10:31ZzZomboResolutionunable to reproduce => reopened
2014-07-08 10:33ZzZomboFile Added: skulltag_bug_example10.pk3

Notes
(0005489)
Torr Samaho   
2012-12-09 09:47   
The problem here is that you are creating an illegal state: The player class Human has "LimitedToTeam 0". When you use Player_SetTeam to change the team of a "Human" player to 1, you create a player on team 1 with a class that is limited to team 0. This is forbidden and the engine resolves this by respawning said player with a class allowed to team 1 (this is also why RESPAWN scripts are triggered by Player_SetTeam here). The respawning internally wasn't done properly though which led to the ghost player. This should hopefully prevent ghost players from appearing.
(0005492)
ZzZombo   
2012-12-09 10:59   
Hm. Is where some way around to change player class without morphing? Morphing AFAIK is used only to temporary change it while I need the effect to be permanent. Maybe introduce a new function to change the player class on the fly?

BRB testing.
(0005493)
Torr Samaho   
2012-12-09 11:07   
(edited on: 2012-12-09 11:09)
Zandronum will automatically change the player class when you change the team and the current class is not allowed to the new team. In your case, if you change the team to infected, the player should automatically be respawned with the infected class.

EDIT: Did the new binary fix the problems with the ghost player?

(0005494)
ZzZombo   
2012-12-09 11:23   
(edited on: 2012-12-09 11:24)
Quote from Torr Samaho
EDIT: Did the new binary fix the problems with the ghost player?
No, although I couldn't find the ghost bodies anywhere, but the server crashed once when I invoked changemap. Crash report attached.

Quote from Torr Samaho
Zandronum will automatically change the player class when you change the team and the current class is not allowed to the new team.
The reason I ask for s separate function is that I don't what the player to respawn. It causes the server to move the player to his team spawn spot, but I need him to stay where he was at time of infection.

Quote from Torr Samaho
In your case, if you change the team to infected, the player should automatically be respawned with the infected class.
After changemap some of infected players could get into the Humans team.

(0005496)
Torr Samaho   
2012-12-09 11:33   
Quote from ZzZombo
No, although I couldn't find the ghost bodies anywhere, but the server crashed once when I invoked changemap. Crash report attached.
Doesn't crash for me and your crash log doesn't show what's going wrong. Can you tell me exactly how to reproduce the crash?

Quote from ZzZombo
The reason I ask for s separate function is that I don't what the player to respawn. It causes the server to move the player to his team spawn spot, but I need him to stay where he was at time of infection.
Changing the player class technically requires the player to be respawned. We can think about letting Player_SetTeam respawn the player at the position he was though.

Quote from ZzZombo
After changemap some of infected players could get into the Humans team.

Please tell me exactly how to reproduce this.
(0005497)
ZzZombo   
2012-12-09 12:22   
(edited on: 2012-12-09 12:27)
Hm, it didn't crash with the "light" version of the WAD, but crashed with the unstripped version.

It's very strange but I can't run the executable you've given me as client anymore, because it hangs after level authentication. It suddenly timeouts from the server. No skins or other autoloaded files are present.

But what I did is just running the game with a few bots, infecting some of them and then invoking changemap. In the light version it should changemap successfully but with some bots as Infected in the human team. In the actual version it'll crash. The download link of the full version are here:'http://zandronum.com/forum/showthread.php?tid=1628. [^]' UPD: Best-Ever servers are down for a while so the files can't be downloaded right now and I can't reupload from this connection :/.

EDIT: forgot to mention that some of bots were dead at the time of changemap.

(0005500)
Torr Samaho   
2012-12-09 20:15   
(edited on: 2012-12-09 20:19)
Please let me know when the files are available for download again.

Quote from ZzZombo
In the light version it should changemap successfully but with some bots as Infected in the human team.
Can't reproduce this. Please list all steps necessary to get an infected on the human team.

(0006026)
Qent   
2013-02-14 20:50   
(edited on: 2013-02-14 21:53)
The files are available again:

'http://static.best-ever.org/wads/zzz_infectedhorde-alpha-27-11-2012.pk3 [^]'
'http://static.best-ever.org/wads/zzz_infectedhorde_acs-alpha-27-11-2012.pk3 [^]'
'http://static.best-ever.org/wads/zzz_infectedhorde_music-alpha-27-11-2012.pk3 [^]'
'http://static.best-ever.org/wads/infected_horde-test-27-11-2012.wad [^]'

I have not been able to get infected on the human team either.

To clarify: the script that forces all joining players to start on the human team seems to break, but all those who do end up on the human team are human, and all on the infected team are infected.

(0006064)
Torr Samaho   
2013-02-23 16:26   
Quote from Qent
To clarify: the script that forces all joining players to start on the human team seems to break, but all those who do end up on the human team are human, and all on the infected team are infected.
Do you know whether it breaks due to a bug in the script or in Zandronum's ACS handling? If it's the latter, can somebody create a minimal example wad that demonstrates the problem?
(0006263)
Dusk   
2013-04-07 00:04   
From what I gathered on IRC, consensus is that the example given is too sloppily coded to demonstrate anything. A proper example wad is necessary here.
(0006283)
Arco   
2013-04-11 21:42   
(edited on: 2013-06-11 04:26)
I managed to get the dummy actor to spawn on V1.1 by simply adding one bot on my server. I'm not thoroughly convinced that Zand is committing this, and the bot that was forced onto a team had been a zombie prior to joining the human team. It spawns the corpses of the morphed bots while ACS mandates that only humans can spawn, and not zombies.

Edit: This still happens in 130512-1932.

(0006549)
ForrestMarkX   
2013-07-02 04:42   
(edited on: 2013-07-02 04:53)
Here is my example of this issue, I tried to make it as simple as possible

'http://static.best-ever.org/wads/ghostactortestmap.wad [^]'

The map and gametype to use is map01 and teamdeathmatch. Join in as team Ghost and you'll be automatically changed to the Normal team, this is where the ghost actor will be spawned. My solution to fix this problem is to kill the actor first then change his team

(0006557)
Torr Samaho   
2013-07-02 20:13   
(edited on: 2013-07-02 20:14)
ghostactortestmap.wad works started with
zandronum.exe -file ghostactortestmap.wad -host +teamdm 1

works fine for me in the latest 1.1 testing binary. Did you really manage to reproduce the error in 1.1 or did you only test 1.0?

(0006559)
ForrestMarkX   
2013-07-03 02:17   
I did the test in 1.0 and 1.1 but I could of been using a older version of 1.1
(0006564)
Torr Samaho   
2013-07-03 19:59   
Can you confirm that the problem is fixed for you in the latest 1.1 beta build?
(0006566)
Torr Samaho   
2013-07-04 18:11   
ForrestMarkX told me that the latest 1.1 build indeed fixes the problem for him.
(0006567)
Dusk   
2013-07-04 18:15   
Does this mean we can consider this resolved?
(0006568)
Torr Samaho   
2013-07-04 18:24   
0001198:0005494 claims that there are problems left after the fix, I wasn't able to reproduce any of these problems though. Since ZzZombo didn't give anymore feedback, I don't see anything we can do about this though.

Furthermore, 0001198:0006283 talks about bot related problems. There is no detailed instruction on how to reproduce those though either.
(0006631)
Arco   
2013-07-14 19:02   
(edited on: 2013-07-14 19:06)
I tested this ticket with ghostactortestmap.wad and with human and bot clients . It appears to be working perfectly. I'm assuming ZzZombo's example gave me a false flag due to his coding. Also, there are no issues on my part regarding ZzZombo's previous posts.

(0006639)
Dusk   
2013-07-14 20:41   
I think we can just close this at this point. Re-open if the issue crops up again.
(0009902)
ZzZombo   
2014-07-08 10:31   
I again got this to happen. Load the newly attached file w/ server (teamgame, any stock map w/ team starts will do, I used D2CTF3), connect to it and add a bunch of bots (I used 7). After the game chooses a player to become the Hunter inspect the world (you might wanna to use the god cheat to prevent dying in the process) and eventually you'll notice a ghost body of the Hunter. Some of them can't be attacked and killing them kills the actual player, pretty much like a voodoo doll. Some of them just stay there, they don't block path or anything.