View Issue Details

IDProjectCategoryView StatusLast Update
0001555Database Comparer VCL[All Projects] Generalpublic2019-08-29 09:43
ReportershirokovAssigned Tobarry 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version[Database Comparer] 7.1.0.1686 
Target Version[Database Comparer] 7.1.0.1686Fixed in Version 
Summary0001555: Access Violation when loading a script using TIBSQLExec.LoadFromFile
DescriptionThe problem occurs within the TIBSQLExec.LoadScript method. The fParser.IBServerOptions property returns nil.

Probably, GetIBServerOptions should create an instance of TIbServerOptions in case if Objs = nil.

function TIbParser.GetIBServerOptions(): TIbServerOptions;
begin
  Result := nil;
  if Assigned(Objs) then
    Result := Objs.IBServerOptions;
end;


BTW: please add the try-finally block to the TCustomSQLExec.LoadFromStream method. Otherwise, a memory leak occurs in case of exception.
Steps To Reproduce  fScriptSQL := TIBSQLExec.Create(Self);
  fScriptSQL.IBServerOptions.SQLServerVersion := st_Firebird_30;
  fScriptFileName := ExtractFilePath(Application.ExeName) + cScriptFileName;
  fScriptSQL.LoadFromFile(fScriptFileName);
TagsNo tags attached.

Activities

barry

2019-08-29 09:43

administrator   ~0004191

git

Issue History

Date Modified Username Field Change
2019-08-27 22:22 shirokov New Issue
2019-08-27 22:22 shirokov Status new => assigned
2019-08-27 22:22 shirokov Assigned To => barry
2019-08-29 09:43 barry Status assigned => resolved
2019-08-29 09:43 barry Resolution open => fixed
2019-08-29 09:43 barry Note Added: 0004191