title: Lazarus error "External: SIGSEGV" on variable increment?
body: <p>I got a problem in my Lazarus project: everytime I want to use a function it throws the above error (<code>External: SIGSEGV</code>). I don't know what that means, but some debugging showed me, that this is the code, causing the error:</p>
  
  <pre><code>class function TUtils.AsStringArray(const Strs:TStrings): TStringArray;
  var
    s:string;
    i:integer;
  begin
    SetLength(Result, Strs.Count);
    i := 1;
    for s in Strs do
    begin
      Result[i] := s;
      i := i + 1;
    end;
  end; 
  </code></pre>
  
  <p>And the definitions</p>
  
  <pre><code>TStringArray = array of string; 
  
  TUtils = class
    public
      [...]
      class function AsStringArray(const Strs:TStrings): TStringArray; static;
  end;   
  </code></pre>
  
  <p>The exception occurs after <code>i := i + 1;</code>. I would be really thankful if you could help me!</p>