Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 7 of 7 total |
Session close results in EAbort |
Wed, Jul 25 2012 5:08 AM | Permanent Link |
Philip Luke | The app I'm working on is split into custom DBISAM DB Server and a Win32 client app using v4.30 Build 5.
If for some reason the client loses connection to the DB Server it attempts to close the current global session by calling Session.Active := False. For some cases this code executes perfectly and all is well, however in some circumstances (when there are many datasets open) calling Session.Active := False results in a silent EAbort being thrown and thus resulting in the rest of my disconnect code not being run. I've tried calling Database.CloseDatasets before it and I've also tried calling Session.Close in place of Session.Active := False, but they all result in the silent EAbort being called. I've traced the EAbort to dbisamen.TDataCursor.CloseCursor, but then get stuck as I can't follow the stack trace further. Any ideas? |
Wed, Jul 25 2012 8:39 AM | Permanent Link |
Raul Team Elevate | The only suggestion i have is to try the latest DBISAM (4.33 b3) and see
if the issue still occurs. I know relative to 4.29 new builds fix some disconnect issues so might be case for 4.30 as well. How is the dbsrvr customized? Are you able to try stock version of the server and does that have the issue? Raul On 7/25/2012 5:08 AM, Philip Luke wrote: > The app I'm working on is split into custom DBISAM DB Server and a Win32 client app using v4.30 Build 5. > > If for some reason the client loses connection to the DB Server it attempts to close the current global session by calling Session.Active := False. For some cases this code executes perfectly and all is well, however in some circumstances (when there are many datasets open) calling Session.Active := False results in a silent EAbort being thrown and thus resulting in the rest of my disconnect code not being run. > > I've tried calling Database.CloseDatasets before it and I've also tried calling Session.Close in place of Session.Active := False, but they all result in the silent EAbort being called. > > I've traced the EAbort to dbisamen.TDataCursor.CloseCursor, but then get stuck as I can't follow the stack trace further. > > Any ideas? > |
Wed, Jul 25 2012 9:10 AM | Permanent Link |
Philip Luke | Thanks for your reply.
I have since posting tried the latest version, but it doesn't change my issue. I have also looked at the standard server, however the DB server that we use is very heavily customised that it discounts being an option. Still at a loss as to what is happening and of course I'm still open to the idea that it's not the fault of DBISAM at all. |
Wed, Jul 25 2012 10:20 AM | Permanent Link |
Raul Team Elevate | If we can't use the standard server then it would be difficult for any
of us to try to duplicate the issue. I assume the app is single-threaded as you're using the global session. Do you have any data bound controls (especially grids) as those have been known to cause problems. Same for any events that are triggered whenever dataset tries to post or cancel. The key is to be able to reproduce the EAbort on demand. You can email elevate support as they might be willing to take a look but you'd definitely need an easily reproducible issue in that case since you have a customized dbserver. Raul On 7/25/2012 9:10 AM, Philip Luke wrote: > Thanks for your reply. > > I have since posting tried the latest version, but it doesn't change my issue. I have also looked at the standard server, however the DB server that we use is very heavily customised that it discounts being an option. > > Still at a loss as to what is happening and of course I'm still open to the idea that it's not the fault of DBISAM at all. > |
Thu, Jul 26 2012 4:53 AM | Permanent Link |
Philip Luke | OK, I found the problem. I include the answer here for future searchers.
In my instance, the app uses table components in a master child relationship. In some cases the creation order of these components was such that the child was created before the master. As a shot in the dark I changed the creation order of these tables so that the master was created first and the child tables after and my problem went away. I'm still not sure why it fixed it, I would've thought the code (VCL or otherwise) could cope with any creation order, but it seems not in this particular instance. Thanks for your efforts. |
Thu, Jul 26 2012 12:08 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Philip
>I'm still not sure why it fixed it, I would've thought the code (VCL or otherwise) could cope with any creation order, but it seems not in this particular instance. Its probably the destruction order rather than the creation order. I have code in my apps to make sure certain events don't fire when a form / the app is being closed. Roy Lambert [Team Elevate] |
Thu, Aug 2 2012 3:00 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Philip,
<< I've traced the EAbort to dbisamen.TDataCursor.CloseCursor, but then get stuck as I can't follow the stack trace further. >> A silent abort exception is raised in three situations: 1) A remote session reconnect is attempted, and an OnRemoteReconnect event handler is defined and returns False for the Continue parameter. 2) A remote session reconnect is attempted, and an OnRemoteReconnect event handler is defined and returned True for the StopAsking parameter prior to the current reconnection attempt. 3) A remote session times out, and an OnRemoteTimeout event handler is defined and returns False for the StayConnected parameter. I suspect that you're seeing 1) or 2). If you have any other questions, please let me know. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, September 20, 2024 at 05:39 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |