Recent

Author Topic: 9.26.2 Combo box Tstrings SIGSEGV error  (Read 9071 times)

picstart

  • Full Member
  • ***
  • Posts: 236
9.26.2 Combo box Tstrings SIGSEGV error
« on: June 25, 2009, 03:46:53 pm »
win2k Lazarus 9.26.2 beta A blank form with a single ( in fact any) combo box will compile ok but errors on running with SIGSEGV error. All there is is a form and the combobox...no event code is added... same with using a var of tstring  Strangely this doesn't occur with memo or listbox that use tstrings. Is this a fundamental bug or a newbie error?

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #1 on: June 25, 2009, 04:01:20 pm »
I don't understand. What has a combobox on a form to do with TStrings (or var of TStrings)?
Can you explain better?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #2 on: June 25, 2009, 04:08:22 pm »
Theo, congratulations on your 500th post. \o/

Your presence and help in this forum is much appreciated.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #3 on: June 25, 2009, 04:22:59 pm »
Theo, congratulations on your 500th post. \o/

Your presence and help in this forum is much appreciated.

Wow, I'm a hero member now... :D
Thanks.

picstart

  • Full Member
  • ***
  • Posts: 236
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #4 on: June 26, 2009, 08:14:41 am »
The combobox  Items property ,the listbox Items property and var myval:Tstrings all use tstrings and if placed on a form1 they will compile but at run time on a win32 win2k platform any and all will error with  SIGSEGV error.
Now perhaps it is just a coincidence that all use tstrings and all fail with the same message.
There is no issue with memobox and it uses tstrings so the pattern isn't just tstrings.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #5 on: June 26, 2009, 10:39:24 am »
I asked you to explain better. But you don't.

You place a combobox on a form and compile and run -> SIGSEGV ?
And your IDE doesn't crash? It uses tons of comboboxes.
SIGSEGV is totally unspecific. Why do you think it has to do with TStrings?


Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #6 on: June 26, 2009, 11:08:05 am »
Explain it better with a piece of code. You must be doing something out of the ordinary, because usually comboboxes don't cause SIGSEGVs

picstart

  • Full Member
  • ***
  • Posts: 236
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #7 on: June 28, 2009, 09:24:46 am »

 Sorry about the lack of details but the lack is due to the fact that it takes almost nothing to get this error.

Here are the minimum of circumstances.
win2k SP4  lazarus  9.26.2
1)
Lazarus is launched and  a blank form is created all ( and I mean all) that is done is to add a combobox to the form. There is absolutely no other object on the form just the combobox . No event code is added

2) The project is compiled but not run... it compiles without error

3) the project is compiled and run and at run time voila SIGSEGV error

I know this pared down test version isn't a real world program since no event code was added but any combo box or list box or use of tstrings as a var in a more meaningful program will give SIGSEGV error
Memobox and buttons and radio box etc don't produce SIGSEGV errors

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #8 on: June 28, 2009, 08:04:22 pm »
The SIGSEGV may be caused by the debugger. Reset the debugger, before you run.

Anyway, again, without the source of your project is hard to tell, if this is the case.

picstart

  • Full Member
  • ***
  • Posts: 236
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #9 on: June 28, 2009, 10:08:28 pm »
Resetting the debugger makes no difference.

the unit
_________________________________________
unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  StdCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    ComboBox1: TComboBox;
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

initialization
  {$I unit1.lrs}

end.

 The project
__________________________________________________________________
program project1;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms
  { you can add units after this }, Unit1, LResources;

{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}

begin
  {$I project1.lrs}
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
                                           

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Re: 9.26.2 Combo box Tstrings SIGSEGV error
« Reply #10 on: June 29, 2009, 11:10:51 am »
Weird, should work.
I'll see if I can fins a win2k with 0.9.26.2
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018