EAccessViolation in 7.2.5 (18-Jan-2018)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

EAccessViolation in 7.2.5 (18-Jan-2018)

Post by FredS » Thu 18 Jan 2018 21:02

Rebuilt and on first try:

Code: Select all

exception class : EAccessViolation
exception message : Access violation at address 0043F21E in module 'PA.exe'. Read of address 00000010.

main thread ($4214):
0043f21e PA.exe System.Variants @VarCopy
014b7c2e PA.exe MemData 3204 +16 TData.GetField
016baeaf PA.exe VirtualDataSet 463 +3 TCustomVirtualDataSetData.GetRecordField
016bae42 PA.exe VirtualDataSet 453 +5 TCustomVirtualDataSetData.GetRecordBufer
016baf26 PA.exe VirtualDataSet 471 +1 TCustomVirtualDataSetData.GetRecord
016bafcc PA.exe VirtualDataSet 490 +15 TCustomVirtualDataSetData.GetNextRecord
014cc741 PA.exe MemDS 2328 +7 TMemDataSet.GetRecord
014cc6ec PA.exe MemDS 2313 +1 TMemDataSet.GetRecord
014ca7ee PA.exe MemDS 1237 +1 TMemDataSet.OpenCursor 

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

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by MaximG » Fri 19 Jan 2018 09:01

Please describe the issue in more detail. Perhaps, you will be able to provide a code snippet, the execution of which causes the described error.

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by FredS » Fri 19 Jan 2018 18:29

MaximG wrote:Please describe the issue in more detail. Perhaps, you will be able to provide a code snippet, the execution of which causes the described error.
All I did was recompile and run. I then reverted to 7.1.4 (29-Sep-2017).
If I run it in the debugger I get exactly the same result as posted.

Code: Select all

:0043f53a @VarCopy + $A
MemData.TData.GetField($6137738,$60FDC20,$19F72C,False,False)
VirtualDataSet.TCustomVirtualDataSetData.GetRecordField(1,$60FDC20,$6137738)
VirtualDataSet.TCustomVirtualDataSetData.GetRecordBufer(1,$60FDC20)
VirtualDataSet.TCustomVirtualDataSetData.GetRecord($60FDC20)
VirtualDataSet.TCustomVirtualDataSetData.GetNextRecord($60FDC20)
MemDS.TMemDataSet.GetRecord($60FDC20,gmNext,True)
MemDS.TMemDataSet.GetRecord(101702688,gmNext,True)
:008d57bb TDataSet.GetNextRecord + $87
:008d5682 TDataSet.UpdateBufferCount + $A2
:008d2cbb TDataSet.SetActive + $5B
:008d2af7 TDataSet.Open + $F
MainFrm.TMainForm.aiUpdateADServersExecute($4885500)
But these are simple fields in a TAdsVirtualDataset that takes the result array of an ADSI Search and generates a dataset.
Yet in GetRecordField() Field.IsComplex=True and the next call blows up.

Recompiling my code with the earlier version removes this New Feature..

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by FredS » Sat 20 Jan 2018 18:02

MaximG wrote:Please describe the issue in more detail. Perhaps, you will be able to provide a code snippet, the execution of which causes the described error.
Also still waiting on this:
TVirtualDataset.OnCalcFields not published
viewtopic.php?f=8&t=34090

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

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by MaximG » Mon 22 Jan 2018 09:55

The provided information is not enough for investigating the issue. Please compose and us a small sample, the execution of which causes the issue. It is convenient to do it using the e-support form ( https://www.devart.com the "Support"\"Request Support" menu)

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by FredS » Mon 22 Jan 2018 18:51

MaximG wrote:The provided information is not enough for investigating the issue. Please compose and us a small sample, the execution of which causes the issue. It is convenient to do it using the e-support form ( https://www.devart.com the "Support"\"Request Support" menu)
OK, in Delphi 10.2.2:

Code: Select all

{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N-,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
{$APPTYPE GUI}
{$WARN SYMBOL_DEPRECATED ON}
{$WARN SYMBOL_LIBRARY ON}
{$WARN SYMBOL_PLATFORM ON}
{$WARN SYMBOL_EXPERIMENTAL ON}
{$WARN UNIT_LIBRARY ON}
{$WARN UNIT_PLATFORM ON}
{$WARN UNIT_DEPRECATED ON}
{$WARN UNIT_EXPERIMENTAL ON}
{$WARN HRESULT_COMPAT ON}
{$WARN HIDING_MEMBER ON}
{$WARN HIDDEN_VIRTUAL ON}
{$WARN GARBAGE ON}
{$WARN BOUNDS_ERROR ON}
{$WARN ZERO_NIL_COMPAT ON}
{$WARN STRING_CONST_TRUNCED ON}
{$WARN FOR_LOOP_VAR_VARPAR ON}
{$WARN TYPED_CONST_VARPAR ON}
{$WARN ASG_TO_TYPED_CONST ON}
{$WARN CASE_LABEL_RANGE ON}
{$WARN FOR_VARIABLE ON}
{$WARN CONSTRUCTING_ABSTRACT ON}
{$WARN COMPARISON_FALSE ON}
{$WARN COMPARISON_TRUE ON}
{$WARN COMPARING_SIGNED_UNSIGNED ON}
{$WARN COMBINING_SIGNED_UNSIGNED ON}
{$WARN UNSUPPORTED_CONSTRUCT ON}
{$WARN FILE_OPEN ON}
{$WARN FILE_OPEN_UNITSRC ON}
{$WARN BAD_GLOBAL_SYMBOL ON}
{$WARN DUPLICATE_CTOR_DTOR ON}
{$WARN INVALID_DIRECTIVE ON}
{$WARN PACKAGE_NO_LINK ON}
{$WARN PACKAGED_THREADVAR ON}
{$WARN IMPLICIT_IMPORT ON}
{$WARN HPPEMIT_IGNORED ON}
{$WARN NO_RETVAL ON}
{$WARN USE_BEFORE_DEF ON}
{$WARN FOR_LOOP_VAR_UNDEF ON}
{$WARN UNIT_NAME_MISMATCH ON}
{$WARN NO_CFG_FILE_FOUND ON}
{$WARN IMPLICIT_VARIANTS ON}
{$WARN UNICODE_TO_LOCALE ON}
{$WARN LOCALE_TO_UNICODE ON}
{$WARN IMAGEBASE_MULTIPLE ON}
{$WARN SUSPICIOUS_TYPECAST ON}
{$WARN PRIVATE_PROPACCESSOR ON}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}
{$WARN OPTION_TRUNCATED ON}
{$WARN WIDECHAR_REDUCED ON}
{$WARN DUPLICATES_IGNORED ON}
{$WARN UNIT_INIT_SEQ ON}
{$WARN LOCAL_PINVOKE ON}
{$WARN MESSAGE_DIRECTIVE ON}
{$WARN TYPEINFO_IMPLICITLY_ADDED ON}
{$WARN RLINK_WARNING ON}
{$WARN IMPLICIT_STRING_CAST ON}
{$WARN IMPLICIT_STRING_CAST_LOSS ON}
{$WARN EXPLICIT_STRING_CAST OFF}
{$WARN EXPLICIT_STRING_CAST_LOSS OFF}
{$WARN CVT_WCHAR_TO_ACHAR ON}
{$WARN CVT_NARROWING_STRING_LOST ON}
{$WARN CVT_ACHAR_TO_WCHAR ON}
{$WARN CVT_WIDENING_STRING_LOST ON}
{$WARN NON_PORTABLE_TYPECAST ON}
{$WARN XML_WHITESPACE_NOT_ALLOWED ON}
{$WARN XML_UNKNOWN_ENTITY ON}
{$WARN XML_INVALID_NAME_START ON}
{$WARN XML_INVALID_NAME ON}
{$WARN XML_EXPECTED_CHARACTER ON}
{$WARN XML_CREF_NO_RESOLVE ON}
{$WARN XML_NO_PARM ON}
{$WARN XML_NO_MATCHING_PARM ON}
{$WARN IMMUTABLE_STRINGS OFF}
program TestCustomDS;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils, System.Variants, Data.Db,
  MemData,
  VirtualDataSet;

type
  TTestVirtualDataset = class(TCustomVirtualDataSet)
  private
    FADSData: TArray<String>;
  protected
    procedure DoGetRecordCount(var Count: Integer); override;
    procedure DoGetFieldValue(Field: TFieldDesc; RecNo: Integer; var Value: Variant); override;
    { Abstract overrides but not required for ReadOnly Dataset }
    procedure DoInsertRecord(var RecordNo: Integer); override;
    procedure DoUpdateRecord(var RecordNo: Integer); override;
    procedure DoDeleteRecord(RecordNo: Integer); override;
    procedure DoCancelRecord(RecordNo: Integer); override;
  public
    constructor Create; reintroduce;
  end;

{ TTestVirtualDataset }

constructor TTestVirtualDataset.Create;
var
  FieldName : string;
begin
  inherited Create(nil);
  ReadOnly := True;
  FADSData := TArray<string>.Create('One', 'Two', 'Three');
  {-- Initialize Fields }
  for FieldName in FADSData do FieldDefs.add(FieldName, ftVariant, 0);
  IndexFieldNames := FADSData[0];
end;

procedure TTestVirtualDataset.DoGetFieldValue(Field: TFieldDesc; RecNo: Integer; var Value: Variant);
begin
  {inherited; ABSTRACT}
  Value := Unassigned;
  if (Field.FieldNo = 1) then
    Value := FADSData[Pred(RecNo)];
end;

procedure TTestVirtualDataset.DoCancelRecord(RecordNo: Integer);
begin
  {inherited; ABSTRACT}
end;

procedure TTestVirtualDataset.DoDeleteRecord(RecordNo: Integer);
begin
  {inherited; ABSTRACT}
end;

procedure TTestVirtualDataset.DoGetRecordCount(var Count: Integer);
begin
  {inherited; ABSTRACT}
  Count := Length(FADSData);
end;

procedure TTestVirtualDataset.DoInsertRecord(var RecordNo: Integer);
begin
  {inherited; ABSTRACT}
end;

procedure TTestVirtualDataset.DoUpdateRecord(var RecordNo: Integer);
begin
  {inherited; ABSTRACT}
end;

begin
  try
    with TTestVirtualDataset.Create do try
      Open;  // << Errors here
      while not eof do begin
        WriteLn(Fields[0].asString);
        Next;
      end;
    finally
      Free;
    end;
  except
    on E: Exception do begin
      Writeln(E.ClassName, ': ', E.Message);
      ReadLn;
    end;
  end;
end.

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

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by MaximG » Tue 23 Jan 2018 14:47

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

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by FredS » Wed 14 Feb 2018 19:03

MaximG wrote:Thank you for the information. We have reproduced the issue and will investigate its origin. We will inform you about the results shortly.
Any findings yet?

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

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by MaximG » Fri 16 Feb 2018 16:08

We have reproduced the problem and fixed the bug. The fix will be included in the next UniDAC build. Currently, we can send you a night build of UniDAC with the fix. For this, please specify your license number and the exact version of Delphi you are using via the e-support form ( https://www.devart.com the "Support"\"Request Support" menu)

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by FredS » Sat 17 Feb 2018 16:52

MaximG wrote:We have reproduced the problem and fixed the bug. The fix will be included in the next UniDAC build. Currently, we can send you a night build of UniDAC with the fix. For this, please specify your license number and the exact version of Delphi you are using via the e-support form ( https://www.devart.com the "Support"\"Request Support" menu)
Please supply an alternate method of getting support.
Someone needs to test that setup because I received 4 errors while attempting to access it.
The last one after receiving an email with credentials was:
Error
Sorry, there was an error : server_error
Request Id: 0HLBLN3TPS694
But more important, I am a customer why do I need to register again for support then receive an email telling me I can access forums and I should use the new password to login?
Very strange setup!

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

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by MaximG » Mon 19 Feb 2018 11:50

Devart Сompany has 3 resources:
- secure.devart.com/
- devart.com/
- forums.devart.com/
Note that for all three resources different accounts are used, and you cannot access one of these accounts using credentials for another one.
In the nearest future we are going to incorporate all of them just in one to avoid such misunderstandings.
Sorry for the temporary inconveniences.

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by FredS » Mon 19 Feb 2018 16:03

MaximG wrote:Devart Сompany has 3 resources:
- secure.devart.com/
- devart.com/
- forums.devart.com/
Note that for all three resources different accounts are used, and you cannot access one of these accounts using credentials for another one.
In the nearest future we are going to incorporate all of them just in one to avoid such misunderstandings.
Sorry for the temporary inconveniences.
Really doesn't help now does it?
>>Please supply an alternate method of getting support.

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

Re: EAccessViolation in 7.2.5 (18-Jan-2018)

Post by MaximG » Tue 20 Feb 2018 13:34

Please re-send your request to our Sales Department at [email protected]
Our sales specialists will do their best to assist you in a private manner and in a proper way.
Thank you in advance.

Post Reply