Page 1 of 1

Runtime error in setup script

Posted: Thu May 19, 2022 3:24 am
by pfennig
Our projects consists of several script files each.
A handfull of our customers get the attached error message during the installation.
Runtime_error_in_setup_script.png
Runtime_error_in_setup_script.png (17.62 KiB) Viewed 1667 times


Is it possible to add the offending line, not just its number?
Or is there a way, to find out what line it actually is?

Re: Runtime error in setup script

Posted: Tue May 24, 2022 12:56 pm
by FrancescoT
Currently there is no way to get the offending line (I'll try to forward such request).

Generally, this error is due the presence of an incorrect conditional nested sequence ("if/else/end" statements).

The error returns the number of the offending script line.

As first, you should check if you can verify the presence of an incorrect conditional sequence around the reported line.

Hope this helps you.

Re: Runtime error in setup script

Posted: Wed May 25, 2022 12:42 am
by pfennig
FrancescoT wrote:Currently there is no way to get the offending line (I'll try to forward such request).

Thank you. We use madExcept for error reporting. It gives more detailed information including the call stack to the point where the error occurs.

FrancescoT wrote:As first, you should check if you can verify the presence of an incorrect conditional sequence around the reported line.

It's hard to find out in a script that includes several others. That's why I posted my request to get more than just a number.
When there are incorrect conditional sequences I usually get the error message already during the build.
Since there are only few customers receiving this message, more information about the call in line 329 would be appreciated.

Re: Runtime error in setup script

Posted: Sat Feb 24, 2024 1:28 pm
by JohnGaver
Your scripts are flattened at build-time.

You could deduce the exact script where the error occurs by manually simulating a "flattening" of your scripts (just pasting all includes into a single monolithic script) and then locating the offending line number in that merged single script (thus identifying the ultimate script and line number where the issue is likely occurring).

Please note that conditional compilation via compiler variables may affect line numbering, too.