<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
SIGSEGV (otherwise known as a segfault) is a *nix signal indicating
that the an illegal address was accessed. Normally it can't be caught
with a try...except. You have to muck about with signals to catch it
with try ... except.<br>
<br>
It some times can be difficult to determine the exact location of the
error. I usually use WriteLn() to print debugging info but the signal
can abort a program before flushing buffers so I have to verify it by
selectively remming out code or issuing flush() after each writeln().
In the latter case it easiest to create and use a logging function.<br>
<br>
Looking at the suspect code I have to say that assigning a nil to
another variable is not a segfault condition. It would be a problem if
you tried to use MyObject2_var when it is a nil or if MyObject1 is nil.
You can not access object members, if the object is nil, without
causing this condition.<br>
<br>
Hope this helps.<br>
<br>
-Jon<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:cc_@freemail.hu">cc_@freemail.hu</a> wrote:
<blockquote cite="mid:000801c8c023$49809110$cddea8c0@delli9200"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.6000.16640" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">Hi,</span><span
style="" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
lang="EN-US"><font size="3"><font face="Times New Roman"> <o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
lang="EN-US"><font size="3"><font face="Times New Roman"> <o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">I have tried
to google for "External: SIGSEGV" exception, but nothing what came up
helped.</span><span style="" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
lang="EN-US"><font size="3"><font face="Times New Roman"> <o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">Is there any
detailed explanation about when this exception occurs?</span><span
style="" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
lang="EN-US"><font size="3"><font face="Times New Roman"> <o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">In my
program it pops up when reading an unassigned (nil) object property: </span><span
style="" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
lang="EN-US"><font size="3"><font face="Times New Roman"> <o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">
MyObject2_Var:= MyObject1.MyObject2; (MyObject1.MyObject2 is nil)</span><span
style="" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
lang="EN-US"><font size="3"><font face="Times New Roman"> <o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">The strange
thing is that the assignment is in a try ... except block, and the
debugger does not stop at the breakpoints in the exception </span><span
style="" lang="EN-US"><font face="Times New Roman" size="3"> </font></span><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">handling
part.</span><span style="" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
lang="EN-US"><font size="3"><font face="Times New Roman"> <o:p></o:p></font></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">I am totally
clueless.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US">Thanks for
reading<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-US"><span
style=""> </span>- Leslie -</span><span style="" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style=""
lang="EN-US"><font size="3"><font face="Times New Roman"> <o:p></o:p></font></font></span></p>
</font></div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Lazarus mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Lazarus@lazarus.freepascal.org">Lazarus@lazarus.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://www.lazarus.freepascal.org/mailman/listinfo/lazarus">http://www.lazarus.freepascal.org/mailman/listinfo/lazarus</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Jon Foster
JF Possibilities, Inc.
<a class="moz-txt-link-abbreviated" href="mailto:jon@jfpossibilities.com">jon@jfpossibilities.com</a>
541-410-2760
Making computers work for you!
</pre>
</body>
</html>