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

2015-11-05 Thread Bo Berglund
On Wed, 04 Nov 2015 16:04:53 +, Mark Morgan Lloyd
 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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2015-11-04 Thread Mark Morgan Lloyd

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'."

I have restarted Lazarus and even made a Build Clean but the problem
persists. I don't even get to keep what has been written to the
console (I see a few lines appearing but they are immediately erased).
Yesterday whatever was written to the console remained until the test
program was started again. That was very convenient in order to trace
what happened against the source.

Where should I look for a solution to this?


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?


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

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


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

2015-11-04 Thread Bo Berglund
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'."

I have restarted Lazarus and even made a Build Clean but the problem
persists. I don't even get to keep what has been written to the
console (I see a few lines appearing but they are immediately erased).
Yesterday whatever was written to the console remained until the test
program was started again. That was very convenient in order to trace
what happened against the source.

Where should I look for a solution to this?


-- 
Bo Berglund
Developer in Sweden


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus