Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / Update 6.0 - Certain case statements cause the compiler to report wrong error line

Author
Message
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 26th Jun 2006 19:31 Edited at: 26th Jun 2006 19:33
I've been banging my head the last couple hours trying to figure out what was wrong with my editor that it wouldn't report the correct error line in a very large project. Well it turns out that my IDE was in fact jumping to the line number that the compiler gave it, but the compiler was reporting the error on the wrong line.

So, I went digging through the source code to try to figure out where it started getting off on the line number. I tracked it down to line 3478 of the source code. On that line starts a massive case statement block. Everything after that varies from being about 4 lines off to 32 lines off (it always puts the error line after where the error occured. I've never seen it report it before.) What's even weirder than this is that there are several other case statements before this in the code, but the compiler always gets the right line number. It's just as soon as it meets this certain case statement, everything goes weird. I noticed there were several other case statements nested inside this one, so maybe that's throwing the compiler off, I dunno, or maybe it's because the line says "select id" and ID is something in the compiler. It's just really, really odd.

This is the open source FPS code (BlackOut project) that I'm using as my test. I'm attaching the full source code file and all the third party dll's used to compile this code.

Good performance is better than a good excuse.
CodeSurge -- DBP Editor for serious programmers.

Attachments

Login to view attachments
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 26th Jun 2006 20:34 Edited at: 26th Jun 2006 20:36
The problem is comments within the select-endselect statements.

Try this code, it reports an error two lines after the actual error. Adding another comment makes it report 4 lines out. For every commented line in a select-endselect statement, the errors after it are reported 2 more lines out.



Note that it only happens when the comments are in the select block, but not inside the case block.



DBPro has been reporting the wrong error line for me for as long as I can remember, I can't believe that this has gone un-fixed for this long; all this time everyone thought it was an editor problem!


Join the BlackOut Forum Today
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 26th Jun 2006 20:45
Bingo! You're right on there. Now, the question is, when will it get fixed?

Good performance is better than a good excuse.
CodeSurge -- DBP Editor for serious programmers.
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 28th Jun 2006 20:42
*bump*
Any chance of this getting marked as confirmed? It's a very annoying problem to not have the correct line number reported when an error occurs.

Good performance is better than a good excuse.
CodeSurge -- DBP Editor for serious programmers.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jun 2006 22:55
How's that?

For free Plug-ins and source code http://www.matrix1.demon.co.uk
thedubdude
20
Years of Service
User Offline
Joined: 24th May 2003
Location: San Jose, Ca.
Posted: 7th Jan 2007 00:58
I am so sick of having to deal with this bug. Its bad enough when DarkBasic reports some criptic message but then to not be able to be able to easily locate the offending line is inexcusable. This bug has been around for a long long time and not yet having it fixed speaks very poorly for TGC.

PLEASE FIX THIS BUG!!!!!!!!
ThinkDigital
18
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 21st Jan 2007 09:09
Quote: "How's that?"

Surely you're kidding.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Jan 2007 23:19
Quote: "Surely you're kidding."


If you'd been there at the time you'd have realised he was probably referring to the fact it had just been confirmed.

My guess is that a lot of these bugs will get dealt with all in one go - it's a better use of TGCs time that way.

And don't forget, sometimes "confirmed" bugs turn out not to be bugs after all. No-one's perfect.
ThinkDigital
18
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 22nd Jan 2007 03:39
My bad, I did come late. Apologies.

Login to post a reply

Server time is: 2024-04-24 16:24:59
Your offset time is: 2024-04-24 16:24:59