AV using SDAC & LiteDAC w/ direct-mode in OSX 10.13.2

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
witzl
Posts: 5
Joined: Fri 21 Apr 2017 10:01

AV using SDAC & LiteDAC w/ direct-mode in OSX 10.13.2

Post by witzl » Tue 09 Jan 2018 01:39

Hi,

When using LiteDac in direct-mode and including MSACCESS in uses clause results in access violation running on OSX 10.13.2 when trying to create a SQLite table:

Code: Select all

unit UTest;

interface

uses

  System.SysUtils,
  System.Types,
  System.UITypes,
  System.Classes,
  System.Variants,
  System.IOUtils,

  FMX.Types,
  FMX.Controls,
  FMX.Forms,
  FMX.Graphics,
  FMX.Dialogs,
  FMX.Controls.Presentation,
  FMX.StdCtrls,

  Data.DB,

  LiteCall,
  LiteConsts,
  DAScript,
  LiteScript,
  LiteAccess,

  DBAccess,

  {

  I need SDAC SQL-Server-Access together with LiteDAC with direct-mode and Encryption.

  Errors:

  - OSX 10.13.2 Including MSAccess causes an "access violation" when direct-Mode = true.
  - IOS-Simulator 10.3.1 shows message "Feature is not supported"
  - IOS-Simulator 11.01 and 11.2 probably not supported by Embarcadero Tokyo 10.2.2

  }

  // INCLUDING MSACCESS RESULT IN ACCESS VIOLATION
  MSAccess;


type

  TFTest = class(TForm)

    Button1         : TButton;
    LiteConnection1 : TLiteConnection;
    LiteScript1     : TLiteScript;

    procedure Button1Click(Sender: TObject);
    procedure LiteConnection1AfterConnect(Sender: TObject);

  end;

var
  FTest: TFTest;

implementation

{$R *.fmx}

procedure TFTest.Button1Click(Sender: TObject);
begin

  LiteConnection1.LoginPrompt                 := false;
  LiteConnection1.Options.ForceCreateDatabase := true;

  // "Feature not supported" occurs on IOS 10.3.1 Simulator when direct = true
  LiteConnection1.Options.Direct              := true;

  LiteConnection1.EncryptionKey               := 'test';
  LiteConnection1.Options.EncryptionAlgorithm := leBlowfish;
  LiteConnection1.Database                    := TPath.Combine(TPath.GetDocumentsPath, 'test.db3');
  LiteConnection1.Connected                   := true;

end;

procedure TFTest.LiteConnection1AfterConnect(Sender: TObject);
begin

  LiteScript1.SQL.text := 'create table if not exists test (ID int, Match Varchar(10))';

  // Access violation in OSX 10.13.2 occurs when script is executed and direct = true 
  // and MSACCESS included

  LiteScript1.Execute;

end;

end.
Configuration:

OSX 10.13.2
XCode 9.2
IOS Simulators 10.3.1 / 11.0.1 / 11.2
WIN 10 Prof
EMB Delphi 10.2.2 Tokyo Enterprise
DEVART SDAC 8.03
DEVART LiteDAC 3.1.3


Thanks for help,
Dietrich

MaximG
Devart Team
Posts: 1019
Joined: Mon 06 Jul 2015 11:34

Re: AV using SDAC & LiteDAC w/ direct-mode in OSX 10.13.2

Post by MaximG » Thu 11 Jan 2018 12:28

LiteDAC does not support Direct Mode when using iOS Simulators. That's why you get the "Feature is not supported" error when running the application on the platforms you listed (IOS Simulators 10.3.1/11.0.1/11.2). We will check the performance of our products on macOS 10.13 High Sierra platform and let you know about the results in the nearest

witzl
Posts: 5
Joined: Fri 21 Apr 2017 10:01

Re: AV using SDAC & LiteDAC w/ direct-mode in OSX 10.13.2

Post by witzl » Thu 11 Jan 2018 14:15

ok,

if you continue to read you will see that I get an ACCESS VIOLATION running the app on my MAC w/ OSX 10.13.2:

I dropped both components, TMSConnection and TLiteConnection on the form, resulting that both probably use the same unit "MSACCESS".

When I try to execute the TLiteScript an AV occurs!

If I delete the TMSConnection component and remove the MSACCESS from the unit clause, Delphi adds the MSACCESS again and LiteScript executes without AV.


Thanks for help,
Dietrich

MaximG
Devart Team
Posts: 1019
Joined: Mon 06 Jul 2015 11:34

Re: AV using SDAC & LiteDAC w/ direct-mode in OSX 10.13.2

Post by MaximG » Wed 17 Jan 2018 13:59

Thank you for the information. We have reproduced the issue and will investigate its origin. We will inform you about the results shortly.

Post Reply