[Lazarus] Error SIGILL appearing out of the blue, what does it mean?

Bo Berglund bo.berglund at gmail.com
Thu Nov 5 21:14:33 CET 2015


On Wed, 04 Nov 2015 16:04:53 +0000, Mark Morgan Lloyd
<markMLl.lazarus at telemetry.co.uk> wrote:

>Bo Berglund wrote:
>> Yesterday I was testing lnet and the test project was working just
>> fine. Today I came back and hit run again only to find a pop-up error
>> box saying:
>> Project xxx raised exception class 'External: SIGILL'."
>> 
>
>Is this the IDE crashing when doing nothing in particular, the IDE 
>crashing when you try to run your program, or your program crashing when 
>it runs in isolation?

It is not the IDE, it is my program that seems to throw exceptions
when I hit the green arrow to start it.
It works as follows:
- Hit green arrow to start
- The error dialog shows up
- When I hit Ok in that it is replaced by an assembler window
- I can now hit the green arrow again and this happens:
- In the console window I see a number of text lines with "Program
start" at the top. This is the very first Writeln in the program.
- There are a handful of more lines but then the console goes blank
unlike before when the messages printed in a session stays until I
start the next execution. The whole process takes less than a second
after the 2nd green arrow click.

Then I tested with another test URL (I use public webservers to do the
connection test) and now the console does not go blank anymore, but
the initial error seems to happen before I reach the DoRun stage.

>In the latter two cases, I'd suggest making sure the program is built 
>with debug info, then running it from a shell session (i.e. not inside 
>Lazarus) and getting a GDB backtrace.
>http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB#Very_short_how-to

Instead of doing that before going to Terminal I tested the binary
(before changing the test URL) from a terminal window and in this case
it ran to completion. So I used the exact same binary as threw the
SIGILL error and it just completes. It also displays the return data
from the website I tested against. This showed me I had made a typo in
my code (wrong webserver) but when I corrected it I still get the same
SIGILL error in the Lazarus IDE...
But when I OK the error and hit green arrow the program runs to
completion without fuss and leaves the data on screen.

One last piece of info:
When I had the error dialog open and OK-ed out of it so the assembler
window appeared, I tried to do a Step-over using the tool button. This
brought up a new dialog saying the following:

The file "dl-init.c" was not found.
Do you want to locate it yourself?

What could this mean? I don't even know why a c file should be needed
for a pascal program...

My take on this is that I suspect that the error happens when Lazarus
initializes the program for debugging but before it is really started.
Hence I have no way to figure out what could have gone wrong.
I cannot find any setting to set if the program shall be run with or
without debugger....



-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list