View Issue Details

IDProjectCategoryView StatusLast Update
0032304FPCDatabasepublic2017-11-28 11:09
ReporterJZSAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWin64OSWindowsOS Version7
Product VersionProduct Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0032304: FBAdmin gives errors when added to an empty project
DescriptionWhen you drop FBAdmin on a new project (just empty form) you start having problems after you run the project and try to close it. Also you get errors when you try to delete that component.
Steps To ReproduceJust add FBAdmin to a new project and try to run.
After run and when closing the form you get error.
Also try to delete the FBAdmin after that.
Now try to close Lazarus.
TagsNo tags attached.
Fixed in Revision37000
FPCOldBugId
FPCTarget
Attached Files
  • project1.pas (129 bytes)
    program project1;
    
    uses FBAdmin;
    
    var
      Admin: TFBAdmin;
    
    begin
      Admin := TFBAdmin.Create(nil);
      Admin.Free;
    end.
    
    
    project1.pas (129 bytes)
  • fbadmin.pp.patch (488 bytes)
    Index: packages/fcl-db/src/sqldb/interbase/fbadmin.pp
    ===================================================================
    --- packages/fcl-db/src/sqldb/interbase/fbadmin.pp	(revision 36982)
    +++ packages/fcl-db/src/sqldb/interbase/fbadmin.pp	(working copy)
    @@ -393,8 +393,10 @@
     destructor TFBAdmin.Destroy;
     begin
       if FSvcHandle<>FB_API_NULLHANDLE then
    -  WaitInterval:=100;
    +  begin
    +    WaitInterval:=100;
         DisConnect;
    +  end;
       FOutput.Destroy;
       inherited Destroy;
     end;
    
    fbadmin.pp.patch (488 bytes)

Relationships

related to 0032732 resolvedJuha Manninen Packages TFBAdmin (SQLdb page) component not eraseable from the form or close project = access violation 

Activities

Michl

2017-08-20 22:07

reporter  

project1.pas (129 bytes)
program project1;

uses FBAdmin;

var
  Admin: TFBAdmin;

begin
  Admin := TFBAdmin.Create(nil);
  Admin.Free;
end.

project1.pas (129 bytes)

Michl

2017-08-20 22:08

reporter  

fbadmin.pp.patch (488 bytes)
Index: packages/fcl-db/src/sqldb/interbase/fbadmin.pp
===================================================================
--- packages/fcl-db/src/sqldb/interbase/fbadmin.pp	(revision 36982)
+++ packages/fcl-db/src/sqldb/interbase/fbadmin.pp	(working copy)
@@ -393,8 +393,10 @@
 destructor TFBAdmin.Destroy;
 begin
   if FSvcHandle<>FB_API_NULLHANDLE then
-  WaitInterval:=100;
+  begin
+    WaitInterval:=100;
     DisConnect;
+  end;
   FOutput.Destroy;
   inherited Destroy;
 end;
fbadmin.pp.patch (488 bytes)

Michl

2017-08-20 22:08

reporter   ~0102266

Last edited: 2017-08-20 22:10

View 2 revisions

I added a minimal example and a patch. It comes with FPC 3.0.2 and is still in trunk 3.1.1.

Michl

2017-08-20 22:08

reporter   ~0102267

Can someone move this topic to FPC?

Juha Manninen

2017-08-20 22:14

reporter   ~0102270

How to drop FBAdmin onto a form? There is no such component in Lazarus sources.

Michl

2017-08-20 22:26

reporter   ~0102271

Last edited: 2017-08-20 22:27

View 2 revisions

Install package SQLDBLaz, there you can see TFBAdmin in the SQLdb tab.

JZS

2017-08-21 04:40

reporter   ~0102275

I am afraid Michl that patch did not fix the error. At least in my environment.

When using the FBAdmin at run time no errors were triggered.
It only happens when using visual/design time component.

Michl

2017-08-21 07:26

reporter   ~0102276

Last edited: 2017-08-21 07:36

View 3 revisions

You have to rebuild FPC. After that, you have to rebuild Lazarus with option "Clean all". Then it should work.

IMHO it was simply a typo, introduced with FPC revision 33913. I assign the issue to michael, as he commited it.

Michael Van Canneyt

2017-08-21 08:43

administrator   ~0102277

Applied the patch, thank you.

Issue History

Date Modified Username Field Change
2017-08-20 15:07 JZS New Issue
2017-08-20 22:07 Michl File Added: project1.pas
2017-08-20 22:08 Michl File Added: fbadmin.pp.patch
2017-08-20 22:08 Michl Note Added: 0102266
2017-08-20 22:08 Michl Note Added: 0102267
2017-08-20 22:10 Michl Note Edited: 0102266 View Revisions
2017-08-20 22:14 Juha Manninen Note Added: 0102270
2017-08-20 22:26 Michl Note Added: 0102271
2017-08-20 22:27 Michl Note Edited: 0102271 View Revisions
2017-08-21 04:40 JZS Note Added: 0102275
2017-08-21 07:26 Michl Note Added: 0102276
2017-08-21 07:33 Michl Note Edited: 0102276 View Revisions
2017-08-21 07:36 Michl Note Edited: 0102276 View Revisions
2017-08-21 07:37 Michl Assigned To => Michael Van Canneyt
2017-08-21 07:37 Michl Status new => assigned
2017-08-21 08:40 Michael Van Canneyt Project Lazarus => FPC
2017-08-21 08:43 Michael Van Canneyt Fixed in Revision => 37000
2017-08-21 08:43 Michael Van Canneyt Note Added: 0102277
2017-08-21 08:43 Michael Van Canneyt Status assigned => resolved
2017-08-21 08:43 Michael Van Canneyt Fixed in Version => 3.1.1
2017-08-21 08:43 Michael Van Canneyt Resolution open => fixed
2017-08-21 08:43 Michael Van Canneyt Target Version => 3.2.0
2017-11-28 11:09 Juha Manninen Relationship added related to 0032732