View Issue Details

IDProjectCategoryView StatusLast Update
0001120FSSCPtablespublic2006-10-27 14:55
ReporterWanderer Assigned Totaylor  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Fixed in Version3.6.9 
Summary0001120: Reported error line is not the same as the actual error line
DescriptionThis happen with debug builds. On longer table files (like ships.tbl) the reported line where the error is found is different to the actual error line. The difference between the actual line and the reported line of the error increases the further in the table the error occurs. In retail table ulysses gets error of about 2 and around line 8000 the error is greater than 100 making it useless (points to wrong ship entry).
Additional InformationThe error can be easily seen by extracting a retail ships.tbl to a new mod folder and then 'planting' an error to the file at a known line.
TagsNo tags attached.

Activities

Backslash

2006-10-22 03:50

developer   ~0006978

Hmm, you say this even happens in retail? Normally, I assumed it was just a result of all the modular tables and ignored the problem. So it happens even without the MediaVPs and any other TBMs?

Gah I wish my laptop could run retail so I could test this while I'm away this weekend...

Wanderer

2006-10-22 12:10

developer   ~0006979

I mean it happen on non-edited table files as well...

Goober5000

2006-10-23 02:25

administrator   ~0006980

It's probably using the commented version while reporting the uncommented one, or vice versa.

Wanderer

2006-10-23 20:34

developer   ~0006988

Dunno if relevant but i tested adding six commented lines before the error and the error moved 6 lines forward respectively. Same result when adding empty lines... that is the error moved forward number of lines exactly equal to the number of the added lines.

taylor

2006-10-23 21:08

administrator   ~0006989

It's actually using both, and needs to just pick one.

The current code:

p = Mission_text_raw;
stoploc = (Mp - Mission_text) + p;

... reports the wrong numbers.

But this:

p = Mission_text;
stoploc = (Mp - Mission_text) + p;

... reports the line numbers correctly.

Goober5000

2006-10-23 22:43

administrator   ~0006990

Oh, okay, well that's easy. Now we just need to know which error messages to fix. :)

taylor

2006-10-27 02:16

administrator   ~0007019

Error messages? I thought that the only bug was the line number reporting, which the change I posted should fix. There is just the one function that needs to be updated, then all of the line number reporting error message should do the right thing.

If that's all that there is then I'll go ahead and commit it, but your comment seemed to indicate an additional problem (which I don't see) so I haven't touched it yet. :)

Goober5000

2006-10-27 03:10

administrator   ~0007021

Last edited: 2006-10-27 03:14

Oh... crap. I thought some error messages were reporting it correctly and some weren't. Okay, I'm committing the fix. :p

EDIT: Actually, wait. Your fix makes the line cancel out to simply this:

stoploc = Mp;

The problem is that Mp is traversing the comment-stripped text, but the function needs to report the line in the raw text.

taylor

2006-10-27 03:30

administrator   ~0007022

It worked fine for me, counting comments and all in the line counts. I was under the impression (from the code, and comments) that Mission_text would have the same line count as Mission_text_raw, just not have the actual comments. The ptr locations are different, which is why the math was off, but I don't think that the line counts are actually different.

I did miss the obvious "stoploc = Mp" thing though.

Goober5000

2006-10-27 14:53

administrator   ~0007024

Last edited: 2006-10-27 14:57

Oh. Well, if the lines are still there, that's fine then. :)

I'll commit that now.

Issue History

Date Modified Username Field Change
2006-10-21 18:53 Wanderer New Issue
2006-10-22 03:50 Backslash Note Added: 0006978
2006-10-22 12:10 Wanderer Note Added: 0006979
2006-10-23 02:25 Goober5000 Note Added: 0006980
2006-10-23 20:34 Wanderer Note Added: 0006988
2006-10-23 21:08 taylor Note Added: 0006989
2006-10-23 22:43 Goober5000 Note Added: 0006990
2006-10-23 22:44 Goober5000 Status new => assigned
2006-10-23 22:44 Goober5000 Assigned To => Goober5000
2006-10-27 02:16 taylor Note Added: 0007019
2006-10-27 03:10 Goober5000 Note Added: 0007021
2006-10-27 03:14 Goober5000 Note Edited: 0007021
2006-10-27 03:30 taylor Note Added: 0007022
2006-10-27 14:53 Goober5000 Note Added: 0007024
2006-10-27 14:55 Goober5000 Assigned To Goober5000 => taylor
2006-10-27 14:55 Goober5000 Status assigned => resolved
2006-10-27 14:55 Goober5000 Resolution open => fixed
2006-10-27 14:55 Goober5000 Fixed in Version => 3.6.9
2006-10-27 14:57 Goober5000 Note Edited: 0007024