#1 2014-11-20 16:04:58

AntonE
Member
Registered: 2012-02-03
Posts: 74

mORMot & Intraweb

Hello,
trying to add mORMot to an IntraWeb XIV app in Delphi XE4.
Just create simple stand-alone IW-app, add:

type
  TIWServerController = class(TIWServerControllerBase)
    procedure IWServerControllerBaseNewSession(ASession: TIWApplication);
    procedure IWServerControllerBaseConfig(Sender: TObject);
    procedure IWServerControllerBaseDestroy(Sender: TObject);

  private

  public
    Model       : TSQLModel;
    SQLDB       : TSQLRest;
  end;

procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
  Model := TSQLModel.Create([TSQLWISPRouter,TSQLWISPClient,TSQLWISPSite,TSQLWISPEMailAcc,TSQLWISPVoIPAcc,TSQLIPTraffic]);
  SQLDB := TSQLRestServerDB.Create(Model,ChangeFileExt(paramstr(0),'.db3'));
  TSQLRestServerDB(SQLDB).CreateMissingTables(0);
end;

procedure TIWServerController.IWServerControllerBaseDestroy(Sender: TObject);
begin
 SQLDB.Free;
 Model.Free;
end;

Just run server and try close, it gives AV error in SynCommons line 43472 in TSynLogFamily.Create(aSynLog: TSynLogClass);
If I just create/close DB it's fine, but once IW app runs, then I can't close without AV.

Best regards
AntonE

Last edited by AntonE (2014-11-20 16:06:27)

Offline

#2 2014-11-20 20:32:55

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: mORMot & Intraweb

When is the destroy event called?
Please check your .dpr file.

Offline

Board footer

Powered by FluxBB