[Fixed] [3.7.1] VM abort gives wrong line

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[3.7.1] VM abort gives wrong line

Postby Matt » Wed Jan 09, 2019 3:21 am

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)
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [3.7.1] VM abort gives wrong line

Postby _mental_ » Wed Jan 09, 2019 6:51 am

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++.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [3.7.1] VM abort gives wrong line

Postby Graf Zahl » Wed Jan 09, 2019 7:23 am

I thought so, too. And obviously the parser isn't prepared for that kind of token.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3.7.1] VM abort gives wrong line

Postby _mental_ » Wed Jan 09, 2019 7:59 am

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 allExpand view
// ... 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_
 
 
 
Joined: 07 Aug 2011

Re: [3.7.1] VM abort gives wrong line

Postby _mental_ » Fri Jan 11, 2019 11:11 am

In order to be sure there will be no objections, I made this PR with the fix.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [3.7.1] VM abort gives wrong line

Postby Graf Zahl » Fri Jan 11, 2019 11:37 am

Why should I object?
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest