[3.7.1] VM abort gives wrong line

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

[3.7.1] VM abort gives wrong line

Post by Matt »

Still happens on cb4548a.

1. Try to run this commit of HD.
2. Read the line number given for "Self pointer used in ambiguous context; VM execution may abort!"

Expected: Line 675
Actual: Line 663

Setting vm_jit in the command line has no effect on this output.

First noticed on Windows build but replicated on own Debian compile.
(Not sure if Windows build was offsetting the line # in the same way)
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [3.7.1] VM abort gives wrong line

Post by _mental_ »

The discrepancy is caused by this multi-line thing.

I was surprised that it's correct syntax at all. I thought every line should be wrapped with double quotes like in C/C++.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [3.7.1] VM abort gives wrong line

Post by Graf Zahl »

I thought so, too. And obviously the parser isn't prepared for that kind of token.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [3.7.1] VM abort gives wrong line

Post by _mental_ »

Curiously enough, it works like a raw string literal. Also, we can create kinda multi-line comments inside functions like this as long as it doesn't include double quote.

Code: Select all

// ... code ...
"
cool
multi-line
comment
";
// ... code ...
Unfortunately, it's treated as a single line screwing error/warning reporting. Outside of this issue, it's OK to keep it as is in my opinion.
The topic's title is a bit misleading because this has nothing to do with a runtime exception handling.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [3.7.1] VM abort gives wrong line

Post by _mental_ »

In order to be sure there will be no objections, I made this PR with the fix.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [3.7.1] VM abort gives wrong line

Post by Graf Zahl »

Why should I object?
Post Reply

Return to “Closed Bugs [GZDoom]”