Delphi 6 IBX Design Problem

I had a problem using Delphi 6, Firebird, and IBX components - basically Delphi 5, using IBX 5.04 components, just displays an error - but the program keeps running.
Delphi 6, using the default IBX components, stops running.

Overview | Delphi 6 IDE Failure | IBX 6.08 for Delphi 6 | New Problem | Other Data


Overview

This problem was discovered because I have a program that accesses a database on another machine. During stress tests, the program would just quit - it never exited through the normal FormClose routine that would write parameters to a file. (Normally, the program would run 1 to 4 days before quitting.)

After extinsive debug (with debug DCU's enabled), it became apparent that this was a Delphi design problem.

I hypothesize that the problem was originally caused by high network traffic - backups and the like - causing the two machines to loose communication for a short time. I know that the problem is also caused when the system administrators automatically reboot the database machine and when a network switch becomes unavailable.

Obviously, I tried wrapping the code in Try..Except blocks, but those had no effect ... the program would just crash (stop running).

For additional test, I created a simple program in Delphi 5 / IBX 5.04, and it simply displayed an error when I stopped Firebird. Recompiling the exact same source in Delphi 6 reproduced the crash.


Delphi 6 IDE Failure

This is the message produced when running from the Delphi 6 ide Of course, neither Step nor Run were of any use ... they just repeated the same message.

The debugger stopped on this in the assembler

Since stack problems are almost never caused by the programmer's code, it is an almost sure sign of a compiler design problem.


IBX 6.08 for Delphi 6

Download IBX 6.08 (29 June 2003) (available from Borland). (BTW, I consider it a serious problem that there are only 2,256 downloads of this fix.)

This is from the Read Me file.

This sounds exactly like the problem I was having.

After installation, I had problems with a few packages I had written (as warned in the Read Me file) - simply recompilling the packages fixed these.

After installation and a recompile, the crash problem fixed.


New Problem

Well, the crashed was fixed ... but the results are not acceptable.

If the database is no longer connected, then the Connected property should be automatically cleared.

I have a manual patch for that (pretty sloppy by any standard - this should be a part of the component).

There appear to be multible related errors ...


Other Data

Additional data that might be useful.

*.exe file size - same program compiled with different compilers and IBX versions

After installation, the Read Me file is at


Author: Robert Clemenzi - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / Databases / Delphi / IBX_D6_Proplem.html