numere-org / NumeRe

Framework for numerical computations, data analysis and visualisation
https://www.numere.org
GNU General Public License v3.0
20 stars 7 forks source link

Error indicator does sometimes not jump to correct location #189

Closed numeredev closed 9 months ago

numeredev commented 9 months ago

DESCRIPTION

Describe the bug In case of an error, the indicator sometimes does not jump to the correct location: module is incorrect but line number is correct. Might be happening if started from a script. Does not happen, when the debugger is active.

To Reproduce Steps to reproduce the behavior:

  1. Create a simple script calling another procedure
  2. Add a syntax error to the procedure
  3. Execute the script without the debugger active
  4. See error
  5. Repeat with debugger
  6. Error disappears

Expected behavior The error indicator points to the correct location.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

(Do not write below this line)


DEVS' SECTION

ANALYSIS

It is most certain that the problem originates from a condition in std::pair<std::string, size_t> NumeReKernel::getErrorLocation(), which first checks for the validity of a script but ignores the fact that the error could originate from a called procedure. Adding a guarding condition checking for the validity of an error location in a procedure might solve this problem.

IMPLEMENTATION STEPS

(see also our Wiki for implementation guidelines)

DOCUMENTATION STEPS

(see also our Wiki for further information)

PULL REQUEST