[Fixed] DEFCVARS causes IWAD run as PWAD load to fail

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

DEFCVARS causes IWAD run as PWAD load to fail

Postby AFADoomer » Fri Jul 31, 2020 6:34 pm

I guess this isn't technically a bug, per se, since the code is doing what it's designed to do, but...

If you have built an IWAD/IPK3 file that includes a DEFCVARS lump/file, then try to load that file as a normal WAD/PK3 (say, for testing during development), you get:
Code: Select allExpand view
Execution could not continue.

Cannot load DEFCVARS from a wadfile!


I can understand throwing an error because the file should not be parsed for a standard WAD, but is this supposed to be a stopping/fatal error in this case?
You do not have the required permissions to view the files attached to this post.
User avatar
AFADoomer
 
Joined: 15 Jul 2003

Re: DEFCVARS causes IWAD run as PWAD load to fail

Postby Rachael » Fri Jul 31, 2020 6:43 pm

This is a philosophical decision, that for the record, I disagree with, but went along with. Yes, this isn't a bug.

I can demote it to a warning but if I do that I am going to set it to pause the startup for a couple seconds so that mod authors are aware of the restriction.

Of course, I'd really just rather remove the restriction entirely. There really is no protection that this serves that really is helpful, at least not from any scenario that I've imagined.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: DEFCVARS causes IWAD run as PWAD load to fail

Postby AFADoomer » Fri Jul 31, 2020 11:44 pm

Either action sounds perfectly reasonable... I'd honestly prefer to still see the warning so that I know something might not work as expected. Maybe behind a developer CVar check?
User avatar
AFADoomer
 
Joined: 15 Jul 2003

Re: DEFCVARS causes IWAD run as PWAD load to fail

Postby Graf Zahl » Sat Aug 01, 2020 12:00 am

No, not a bug and there's very good reasons not to allow PWADs to change CVAR defaults. At best it should print a warning but not execute the file.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: DEFCVARS causes IWAD run as PWAD load to fail

Postby AFADoomer » Sat Aug 01, 2020 12:05 am

Right, I don't think anyone is expecting it to change CVAR defaults if not run as an IWAD... I would expect it to throw a warning, skip processing the DEFCVARS file, and continue loading as a PWAD normally.
User avatar
AFADoomer
 
Joined: 15 Jul 2003

Re: DEFCVARS causes IWAD run as PWAD load to fail

Postby Rachael » Sat Aug 01, 2020 4:02 am

User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: DEFCVARS causes IWAD run as PWAD load to fail

Postby AFADoomer » Sat Aug 01, 2020 11:00 am

Thanks, Rachael!

One slightly odd thing... For me, at least, the message color doesn't seem to be changed to red when printed, for some reason. The code looks correct, but output is still gray.
User avatar
AFADoomer
 
Joined: 15 Jul 2003

Re: DEFCVARS causes IWAD run as PWAD load to fail

Postby Rachael » Sat Aug 01, 2020 8:59 pm

Unfortunately, I've no idea, there. Might be a problem with the RTF spitter, or its parser. Or I could have just misused it somehow and not known. It's red when you view it in the console in-game, though.

If anyone knows more than me what's going on with that, it's definitely Graf.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: DEFCVARS causes IWAD run as PWAD load to fail

Postby Graf Zahl » Sat Aug 01, 2020 11:29 pm

Text should be red with that code.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: DEFCVARS causes IWAD run as PWAD load to fail

Postby _mental_ » Sun Aug 02, 2020 12:53 am

That's because TranslationColors array is empty when the message is printed to startup window. Console doesn't exhibit this issue as translations are already defined when it is rendered.
_mental_
 
 
 
Joined: 07 Aug 2011


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests