Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001557Zandronum[All Projects] Bugpublic2013-10-26 21:082018-09-30 23:51
ReporterStrikerMan780 
Assigned ToDusk 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.2 
Target Version1.4Fixed in Version1.4 
Summary0001557: SetFont and SetHudSize leak into other scripts online
DescriptionThis bug needs two people to test, and I've made a test wad. This is a problem that has been around for a while now. Online, if another user executes a script that uses SetFont or SetHudSize, while another person is viewing a HudMessage, those functions will leak into the other user's script.
Steps To Reproducezandronum -host -file setfonttest.pk3
zandronum -connect localhost -file setfonttest.pk3
In console: puke 1
Attached Fileszip file icon TestWad_SetFontLeak.zip [^] (18,994 bytes) 2013-10-26 21:08
zip file icon TestWad_SetFontLeak2.zip [^] (162,761 bytes) 2013-10-26 23:00
? file icon setfonttest.pk3 [^] (1,119 bytes) 2014-11-30 03:08

- Relationships

-  Notes
User avatar (0007469)
StrikerMan780 (reporter)
2013-10-26 21:09
edited on: 2013-10-26 21:11

Another thing you can do, is pick up one mystery item, then have another player pick one up a few seconds after. If the timing is right, the font on your end will be huge all of the sudden.

Also, SMMP is OpenGL-only, so you'll need it in order to see where the 3 mystery items are.

User avatar (0007470)
Dusk (developer)
2013-10-26 21:12

Do you seriously expect us to download a 140mb wad to try confirm an issue? Make a stand-alone example WAD.
User avatar (0007471)
Ivan (reporter)
2013-10-26 22:00

I know what he means. Try to have two scripts execute, where one executes shortly after the another and have them both have SetFont and SetHudsize, each with a different value. (To observe easier hudsize could be 640x480 on one and 320x200 on the other) You'll notice that the script that executes after the first one will override the previous' hudsize value and make it look bigger. This is very common in GvH and has been there for a while.
User avatar (0007473)
StrikerMan780 (reporter)
2013-10-26 23:00
edited on: 2013-10-26 23:01

"Do you seriously expect us to download a 140mb wad to try confirm an issue? Make a stand-alone example WAD."

It takes twice, if not three times longer to make a test wad with the necessary scripts and actors cherry-picked from a large project without them messing up/breaking, than to download a PK3/Wad that is already known to reproduce the problem without fail.

Anyhow, a took the last 45/50 minutes to put an updated test wad together. No other resources are necessary now. I'll attach it in a second.

User avatar (0007492)
Toxicity (reporter)
2013-10-30 14:20

This has been a bug since forever.

'http://zandronum.com/forum/showthread.php?tid=224 [^]'


The only way to safely prevent it is to make all of your SetFont and HudMessage calls in a CLIENTSIDE script that you call from your main script.
User avatar (0010071)
Watermelon (developer)
2014-07-29 03:34

Youll have to use something like this I believe due to how ZDoom is structured:


// Might need some more args
function void drawImage(str imgName, int x, int y, int id, int time)
{
    SetHudSize(...);
    SetFont(imgName);
    HudMessage(s: "a"; ...);
}
User avatar (0010072)
StrikerMan780 (reporter)
2014-07-29 03:39

It's an online-only bug. Offline it doesn't happen, no matter what the situation is, even with bots. I doubt it has to do with ZDoom's structure, otherwise I'd think the same issue would happen there. (Which it doesn't, even in multiplayer from my testing so far.)
User avatar (0010466)
Catastrophe (reporter)
2014-10-11 07:17
edited on: 2014-10-11 15:23

Just gonna add a little more info here. The issue is definitely setfont and not sethudsize. Basically if you do a setfont, it leaks into other scripts. The only way to fix this is to call setfont before every single hud message. But I've had strange anomalies where if I display an image using setfont, it will leak into other hudmessages and turn all of them into the same image regardless if I did setfont the tic before.

I think the best way to test is going to some "big" mods like all out war or GvH and finding some scripts where the same setfont is called multiple times in a script and get rid of all but one.

Edit: You guys might as well mark this confirmed. This happens for sure online on various mods.

User avatar (0010518)
Dusk (developer)
2014-10-12 01:30

The server doesn't have a screen so it stores the font elsewhere. I guess said elsewhere doesn't get reset properly.
User avatar (0011003)
Dusk (developer)
2014-11-30 02:42
edited on: 2014-11-30 02:53

Added a simpler testcase

EDIT: Found out why this happens. The server stores the string value of 'activefont', however 'activefont' is a member of DLevelScript and thus script-dependant.
EDIT 2: SetHudSize() works fine for me and doesn't leak anywhere.

User avatar (0011004)
Dusk (developer)
2014-11-30 03:07
edited on: 2014-11-30 03:29

'https://bitbucket.org/Torr_Samaho/zandronum-stable/pull-request/108 [^]'

User avatar (0011007)
cobalt (updater)
2014-11-30 17:03

Issue addressed by commit b4c7a59679a7: - fixed: setfont() would 'leak' into other scripts online (fixes 1557)
Committed by Teemu Piippo [Dusk] on Sunday 30 November 2014 05:28:08

Changes in files:
 docs/zandronum-history.txt | 1 +
 src/p_acs.cpp | 15 +++++++--------
 src/p_acs.h | 1 +
 src/sv_main.cpp | 16 ----------------
 src/sv_main.h | 2 --
 5 files changed, 9 insertions(+), 26 deletions(-)
User avatar (0011424)
TerminusEst13 (reporter)
2015-01-18 06:09
edited on: 2015-01-18 06:10

In Push, there's a map (Push42) where there's a constant HudMessage loop noting the gravity of the area--there's also setfont wonkery going on when the player gets hit with a serious blow, as the script makes a series of Matrix-y fonts scroll down the screen and alternates between smallfont and bigfont constantly.

On the newest 2.0 build, this leak seems to be fixed, as the hudmessage loop on Push42 remained smallfont the entire time.


Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: StrikerMan780 Catastrophe
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2013-10-26 21:08 StrikerMan780 New Issue
2013-10-26 21:08 StrikerMan780 File Added: TestWad_SetFontLeak.zip
2013-10-26 21:09 StrikerMan780 Note Added: 0007469
2013-10-26 21:11 StrikerMan780 Note Edited: 0007469 View Revisions
2013-10-26 21:12 Dusk Note Added: 0007470
2013-10-26 21:12 Dusk Status new => feedback
2013-10-26 22:00 Ivan Note Added: 0007471
2013-10-26 23:00 StrikerMan780 Note Added: 0007473
2013-10-26 23:00 StrikerMan780 Status feedback => new
2013-10-26 23:00 StrikerMan780 File Added: TestWad_SetFontLeak2.zip
2013-10-26 23:01 StrikerMan780 Note Edited: 0007473 View Revisions
2013-10-27 20:40 Dusk Assigned To => Dusk
2013-10-27 20:40 Dusk Status new => assigned
2013-10-30 14:20 Toxicity Note Added: 0007492
2013-11-06 12:09 Dusk Status assigned => new
2014-06-15 14:43 Dusk Assigned To Dusk =>
2014-07-29 03:34 Watermelon Note Added: 0010071
2014-07-29 03:39 StrikerMan780 Note Added: 0010072
2014-10-11 07:17 Catastrophe Note Added: 0010466
2014-10-11 07:21 Catastrophe Note Edited: 0010466 View Revisions
2014-10-11 07:22 Catastrophe Note Edited: 0010466 View Revisions
2014-10-11 07:25 Catastrophe Note Edited: 0010466 View Revisions
2014-10-11 15:23 Catastrophe Note Edited: 0010466 View Revisions
2014-10-12 01:30 Dusk Note Added: 0010518
2014-10-12 01:31 Dusk Assigned To => Dusk
2014-10-12 01:31 Dusk Status new => confirmed
2014-11-30 02:41 Dusk File Added: setfonttest.pk3
2014-11-30 02:42 Dusk Note Added: 0011003
2014-11-30 02:42 Dusk Description Updated View Revisions
2014-11-30 02:42 Dusk Steps to Reproduce Updated View Revisions
2014-11-30 02:42 Dusk Status confirmed => assigned
2014-11-30 02:44 Dusk Note Edited: 0011003 View Revisions
2014-11-30 02:45 Dusk Note Edited: 0011003 View Revisions
2014-11-30 02:53 Dusk Note Edited: 0011003 View Revisions
2014-11-30 03:07 Dusk Note Added: 0011004
2014-11-30 03:07 Dusk Status assigned => needs review
2014-11-30 03:08 Dusk File Deleted: setfonttest.pk3
2014-11-30 03:08 Dusk File Added: setfonttest.pk3
2014-11-30 03:29 Dusk Note Edited: 0011004 View Revisions
2014-11-30 17:03 cobalt Status needs review => needs testing
2014-11-30 17:03 cobalt Target Version => 1.4
2014-11-30 17:03 cobalt Steps to Reproduce Updated View Revisions
2014-11-30 17:03 cobalt Note Added: 0011007
2015-01-18 06:09 TerminusEst13 Note Added: 0011424
2015-01-18 06:10 TerminusEst13 Note Edited: 0011424 View Revisions
2015-01-18 10:44 Dusk Status needs testing => resolved
2015-01-18 10:44 Dusk Fixed in Version => 1.4
2015-01-18 10:44 Dusk Resolution open => fixed
2018-09-30 23:51 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker