View Issue Details

IDProjectCategoryView StatusLast Update
0000008LDMud 3.2-devRuntimepublic2004-05-17 07:27
Reportermenaures Assigned Tolars 
PrioritynormalSeveritytrivialReproducibilitysometimes
Status closedResolutionunable to reproduce 
Summary0000008: line numbers off-by-one
DescriptionSometimes (uh, actually quite often if not always) when a runtime error occurs, the driver does not give the correct line numbers, but line+1.

example file (?: is autoinclude-string):
---- 8< ----
?:#pragma combine_strings, warn_deprecated, verbose_errors
?:#define VARARGS varargs
?:#define file_name object_name
?:#define filter_array filter
?:#define map_array map
?:#define member_array(x,y) member(y,x)
1:
2:void create()
3:{
4: int i = 1/0;
5:}
---- 8< ----

Debuglog Output:
---- 8< ----
2003.08.07 18:27:07 Division by zero
2003.08.07 18:27:07 program: w/menaures/test.c, object: w/menaures/test line 5
---- 8< ----

Ed output:

---- 8< ----
ed test.c
/w/menaures/test.c, 5 lines
:5
}
---- 8< ----

This bug is not new, the problem existed already in dev540 (and I think, in older drivers too).
TagsNo tags attached.

Activities

lars

2003-08-07 20:55

reporter   ~0000019

After finishing reading the auto_include_string, the original line number wasn't restored properly.

Fixed in 3.2.10-dev.598 and 3.3.295.

menaures

2003-08-11 19:50

reporter   ~0000021

It fixes my test case, all right.
However, there seem are still some off-by-one cases left. At least, I still encounter many errors with off-by-one line numbers.
I could not yet produce a new code snippet which reproduces the error, though. :-( I'll try and find one as soon as possible.

menaures

2004-01-01 05:52

reporter   ~0000027

Tested in 3.2.10-dev.614

---- test.c ----
      1 #include "test.inc"
      2
      3 void create()
      4 {
      5 test();
      6 }
      7
---- EOF ----

---- test.inc ----
      1 void test()
      2 {
      3 mixed * error;
      4
      5 error[-1];
      6 }
---- EOF ----

Error message:
2004.01.01 12:50:36 (value)Indexing on illegal type.
2004.01.01 12:50:36 program: w/menaures/test.c (/w/menaures/test.inc), object:
w/menaures/test line 4

The error occured in line 5, not in line 4.

lars

2004-04-03 15:40

reporter   ~0000043

I can't reproduce the error with the new code snippet in 3.2-dev.623 nor 3.3.508 .

Issue History

Date Modified Username Field Change
2003-08-07 10:30 menaures New Issue
2003-08-07 20:55 lars Status new => resolved
2003-08-07 20:55 lars Resolution open => fixed
2003-08-07 20:55 lars Assigned To => lars
2003-08-07 20:55 lars Note Added: 0000019
2003-08-11 19:50 menaures Status resolved => feedback
2003-08-11 19:50 menaures Resolution fixed => reopened
2003-08-11 19:50 menaures Note Added: 0000021
2004-01-01 05:52 menaures Note Added: 0000027
2004-04-03 15:40 lars Status feedback => resolved
2004-04-03 15:40 lars Resolution reopened => unable to reproduce
2004-04-03 15:40 lars Note Added: 0000043
2004-05-17 07:27 lars Status resolved => closed