MantisBT - Zandronum
View Issue Details
0003949Zandronum[All Projects] Bugpublic2021-12-19 12:422021-12-23 10:14
Zalewa 
Zalewa 
normalminoralways
resolvedinvalid 
MicrosoftWindowsXP/Vista/7
3.1 
 
0003949: The game ignores a negative value in "+compatflags -2147483648" command line argument
Passing +compatflags -2147483648 as a command line argument should enable the compat_maskedmidtex compat flag. It doesn't:

- compatflags are 0
- compat_maskedmidtex is false

If "compatflags -2147483648" is set from the console, the game accepts it just fine, so it appears that only parsing the command line is broken.
1. Run "zandronum.exe -iwad doom2.wad +map map01 +compatflags -2147483648".
The dmflags, compatflags and zaflags are all signed 32-bit integers. The compat_maskedmidtex is the only flag that uses the most significant bit of a 32-bit integer.
No tags attached.
related to 0003956resolved Kaminsky Zandronum +compatflags, +compatflags2 cmdline arguments broken in Zandronum 3.1 
related to 0003944closed Zalewa Doomseeker dmflags, dmflags2, etc, number fields dont accept negative values 
jpg zandronum_eval_flags_doesnt_really_work_either.jpg (150,812) 2021-12-23 09:08
https://zandronum.com/tracker/file_download.php?file_id=2693&type=bug
jpg

jpg the_problem_is_worse_though.jpg (29,085) 2021-12-23 09:11
https://zandronum.com/tracker/file_download.php?file_id=2694&type=bug
jpg

jpg meanwhile_in_zan_3p0.jpg (53,613) 2021-12-23 09:14
https://zandronum.com/tracker/file_download.php?file_id=2695&type=bug
jpg

png eval_working.png (159,680) 2021-12-23 10:08
https://zandronum.com/tracker/file_download.php?file_id=2699&type=bug
png
Issue History
2021-12-19 12:42ZalewaNew Issue
2021-12-19 12:42ZalewaRelationship addedrelated to 0003944
2021-12-19 13:54WaTaKiDNote Added: 0021929
2021-12-19 14:48KaminskyStatusnew => acknowledged
2021-12-22 03:14Blzut3Note Added: 0021972
2021-12-22 09:22ZalewaAssigned To => Zalewa
2021-12-22 09:22ZalewaStatusacknowledged => assigned
2021-12-22 09:23ZalewaNote Added: 0021975
2021-12-22 11:12ZalewaNote Added: 0021976
2021-12-22 11:45ZalewaAssigned ToZalewa =>
2021-12-22 11:45ZalewaStatusassigned => acknowledged
2021-12-23 03:27Blzut3Note Added: 0021989
2021-12-23 09:08ZalewaFile Added: zandronum_eval_flags_doesnt_really_work_either.jpg
2021-12-23 09:09ZalewaNote Added: 0021990
2021-12-23 09:11ZalewaFile Added: the_problem_is_worse_though.jpg
2021-12-23 09:12ZalewaNote Added: 0021991
2021-12-23 09:14ZalewaFile Added: meanwhile_in_zan_3p0.jpg
2021-12-23 09:14ZalewaNote Edited: 0021991bug_revision_view_page.php?bugnote_id=21991#r13495
2021-12-23 09:23ZalewaRelationship addedrelated to 0003956
2021-12-23 09:24ZalewaNote Added: 0021992
2021-12-23 09:24ZalewaStatusacknowledged => resolved
2021-12-23 09:24ZalewaResolutionopen => invalid
2021-12-23 09:24ZalewaAssigned To => Zalewa
2021-12-23 09:24ZalewaNote Edited: 0021992bug_revision_view_page.php?bugnote_id=21992#r13497
2021-12-23 10:08Blzut3File Added: eval_working.png
2021-12-23 10:14Blzut3Note Added: 0021994

Notes
(0021929)
WaTaKiD   
2021-12-19 13:54   
to recap our findings on discord:
 also an issue in zan 3.0 where the flag was backported
 also an issue in gzdoom 1.8.6
 fixed in gzdoom 4.7.0
(0021972)
Blzut3   
2021-12-22 03:14   
Actually kind of surprised it got noticed in GZDoom (unless it was an incidental fix from a rewrite or something).

I'm guessing the issue is that it's assuming the dash is starting a new command line parameter instead of being part of the console command. It can be worked around in the mean time by putting a space before the minus sign, or even sending "+compatflags -2147483648" as one argument. Obviously not something we'd want to use permanently though.
(0021975)
Zalewa   
2021-12-22 09:23   
Quote from Blzut3
Obviously not something we'd want to use permanently though.

But I will use it right now :D
(0021976)
Zalewa   
2021-12-22 11:12   
Quote from Blzut3
It can be worked around in the mean time by putting a space before the minus sign, or even sending "+compatflags -2147483648" as one argument.


So, I tried that, and unfortunately it only works when launching an offline game. When I add "-host" to the command line, the server starts with compatflags 0.
(0021989)
Blzut3   
2021-12-23 03:27   
OK, another work around which works with -host in my testing: +eval 0x80000000 compatflags
(0021990)
Zalewa   
2021-12-23 09:09   
Quote from Blzut3
OK, another work around which works with -host in my testing: +eval 0x80000000 compatflags


Unfortunately no: zandronum_eval_flags_doesnt_really_work_either.jpg

It sets the value, but only up to the max signed value.
(0021991)
Zalewa   
2021-12-23 09:12   
(edited on: 2021-12-23 09:14)
the_problem_is_worse_though.jpg
meanwhile_in_zan_3p0.jpg

'https://zandronum.com/tracker/view.php?id=3938#c21985 [^]'
'https://zandronum.com/tracker/view.php?id=3938#c21986 [^]'

Quote from WaTaKiD
upon further inspection, it seems the compatflags and compatflags2 fields dont work at all

to reproduce:
set all the flags fields to a value of 2 and start the server, then check them on the server, compatflags and compatflags2 will return 0 instead of 2

[...]

regarding compatflags/compatflags2 i think this is a zan 3.1 regression unless im doing something terribly wrong, requires even further inspection


(0021992)
Zalewa   
2021-12-23 09:24   
Since the problem is different and there has been some discussion here already about the negative values, I'm closing this ticket and opened a new one at 0003956.

(0021994)
Blzut3   
2021-12-23 10:14   
Huh, that's quite interesting. It definitely does work for me on Linux (attached screenshot). Although I wouldn't be surprised if it was a libc difference in that case or something. There's probably another expression you could pass to eval to get it to work, but yeah something is weird with compatflag handling regardless.