I'm doing development of an engineering program I started long ago in Delphi. It ported to Lazarus just fine a couple of years ago and I've continued developing it. It has a large main unit with a lot of engineering calculations and 4 units/forms for data input. I wanted to add a form to show a graph of some output, that's when I have a problem.
I added a form and that also created a unit. I pasted in some code used from in the other forms and got various exceptions when trying to show the form via showmodal. I started stripping the form down eventually removing a lot of the code I pasted in, still errors. So I deleted that form and unit completely, added a completely blank form, changed the names of the form and unit and get exception SIGSEGV. Not having much clue what the problem was I deleted that form and unit completely, added another completely blank form and unit, left all of the names at their default, still get the exception. My other forms have a lot of stuff in them including graphing and still work fine.
When I click the button attached to this event handler I get the exception. The other forms are reached with similar event handlers:
procedure Tcontbtest1f1.Button10Click(Sender: TObject);
begin
form1.showmodal;
end;
I looked in the .lpr file and it does not contain the new unit in its uses statement and does not have an application.createform for that unit. I tried adding those and it would not compile with them added so I restored it back to its prevous state.
This is the unit in its entirety:
unit Unit1;
{$mode Delphi}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs;
type
TForm1 = class(TForm)
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
end.