question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect Line Numbers Reported

See original GitHub issue

I am using Meriyah with GraalVM to validate Javascript source in my code editor. I am using the version from the dev branch from commit 96eb15f, dated 2019-08-21.

Given the code:

...
108    handleAddressSelected : function(adr) {
109        var prp                          this.props;
110
111       // Address selection puts the entire address into the target field value so address1 must always be changed.
112       //     e.g.: 6/19 Ashby Circuit, Kamhah ACT, Australia
113
114        if(adr.postcode!=prp.adrPostcode || adr.state!=prp.adrState) {                                                  
115            this.handleAddressChanged(prp.address1);                                                                    
116            }
117        else if(sta.showAddressLine2) {
118            this.handleAddressChanged(adr.street,adr.unit,adr.name,adr.citySuburb);
119            }
120        else {
121            this.handleAddressChanged((adr.unit ? adr.unit+"/" : "")+adr.street,"",adr.name,adr.citySuburb);
122            }
123        },

The line reported from Meriyah for the error is:

ERROR : C:/[...deleted...]/Contact.js:~: [121:45]: Unexpected token: 'this'

Which was immensely difficult to figure out.

After a long time I noticed the missing = at line 109. Then I used the browser to locate the error and it pointed to the this at line 109 also. Obviously this was made much more difficult by the fact that there was no reason to suspect the line number was incorrect. Since I’ve been using Meriyah for a while, I suspect that this was introduced in the last few weeks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
KFlashcommented, Aug 23, 2019

No problem. Issue was very easy, and the way you investigated and described things was very helpful 😃

0reactions
lawrence-dolcommented, Aug 23, 2019

Thanks for working with me on this. Apologies for the misleading bit about state |= 1 | 4; – apparently my bit-fu is rusty.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect line numbers reported for some test combinations
If I run all but one test, or that one test on its own, the correct line numbers are shown. If I run...
Read more >
Why this snippet is giving me incorrect line numbers?
I throw an error, and I noticed both Stackoverflow and JSFiddle giving me incorrect line numbers on stack-trace.
Read more >
Incorrect line numbers reported in traceStack of a byteman rule?
I am using Byteman in investigating some resource leaks within a project. Am currently using the latest released 3.0.10 version of Byteman.
Read more >
Excel spreadsheet has incorrect line numbers
All of a sudden the LINE NUMBERS (far left column) are incorrect (out of sequence). Line 56 is followed by line 63! This...
Read more >
Line numbers are incorrect in exception stack trace : KT-8628
In which console exactly are you clicking the link? Line numbers greater than the number of lines in the file are expected behavior...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found