Page 1 of 1

vcl app not exiting upon closing the main form

Posted: Tue 28 Jan 2014 02:02
by costa
Have you guys seen this before:

https://forums.embarcadero.com/thread.j ... 92&#629292


Thanks

Re: vcl app not exiting upon closing the main form

Posted: Wed 29 Jan 2014 09:36
by AlexP
Hello,

We haven't been reported such a problem with using our driver. Please send a small sample reproducing the problem to alexp*devart*com, also please specify the exact versions of the IDE and our driver.

Re: vcl app not exiting upon closing the main form

Posted: Wed 29 Jan 2014 23:48
by costa
Hello:

Here is a project that you can use to reproduce this: https://dl.dropboxusercontent.com/u/353 ... tError.rar.

Please note the following:
  • - I used XE5 Update 2, version 6.3.4 of the devart dbexpress oracle driver, and version 11.2.0 of the oracle client (the version of the oci.dll is 11.2.0.1)
    - before you run the project you need to update the connection information
    - The issue occurs intermittently, but to reproduce it quicker, you need to run the app in debug mode. I also had the devart dbmonitor app running to see what was executed. After the main window is visible and the grid has data, click on the Refresh button multiple times (I clicked, for instance, 11 times) then close the window (after waiting for the queries to be done). Sometimes the application hangs even though the main window was closed. Go to View->Debug Windows->Threads. One of the threads in the window will be blocked. Double-click on the thread to view the stack trace.
If you cannot reproduce the issue right away please be patient and keep trying. I've been able to reproduce it and my colleague reproduced it as well. Also, the issue occurred even when I run the app outside the IDE, or within the IDE but not in debug mode. Based on our observations it might have something to do the SQLMonitor object, i.e. disconnecting the monitor from the sql connection object seems to get rid of the problem.

Thanks

Re: vcl app not exiting upon closing the main form

Posted: Thu 30 Jan 2014 13:42
by AlexP
We couldn't reproduce the problem. Please send an application that stably (on the first button click desirably) reproduces the problem

Re: vcl app not exiting upon closing the main form

Posted: Thu 30 Jan 2014 20:41
by costa
The problem is that this issue is intermittent, it doesn't always occur and that's what's making it frustrating. That's why I suggested that you patiently try it multiple times if the error doesn't occur the first time.

Just curious, what operating system did you use, and did you try to test using the same versions of the driver? We develop using Windows 7 64 bit and the target app is 32 bit.

Re: vcl app not exiting upon closing the main form

Posted: Fri 31 Jan 2014 18:58
by costa
Hello:

We made a slight change to the app which makes more reproducible. You can get it here: https://dl.dropboxusercontent.com/u/353 ... tError.zip

I also included a screenshot of the delphi IDE so you can see the error.

Again this error has something to do with the TSQLMonitor object. If it is disconnected from the connection, the app always exists.

Could you please investigate and don't give up on this?

Image

Re: vcl app not exiting upon closing the main form

Posted: Thu 15 May 2014 07:57
by dataplan
I can confirm that this is a major problem since at least version 6.2.3, both for SQL Server and Oracle drivers:

If you exit the application normally sometimes the application hangs while unloading dbexpoda40.dll or dbexpsda40.dll

We use Delphi 2007, but this has nothing to do with Delphi version, since obviously the problem persists using XE5.

The problem occurs more frequently when you start SQL tracing using SQLConnection.SetTraceEvent. Manually detaching the event handler using SQLConnection.SetTraceEvent(nil) reduces the frequency of application hangs, but somehow it occurs randomly, so it is impossible for us to provide an example application to safely reproduce the problem.

This is a disaster for applications or services in server environment!

I declare this problem as urgent, because we bought the new drivers several month ago, adapted our applications and now want to release it to our customers. Devart has to resolve this major issue, no matter what, there are no excuses for this severe problem! :!:

Re: vcl app not exiting upon closing the main form

Posted: Mon 19 May 2014 14:09
by AlexP
Even on multiple application launches with running SQLMonitor and DBMonitor - we can't reproduce the problem. Until we completely reproduce the problem, we won't be able to fix it.

Re: vcl app not exiting upon closing the main form

Posted: Mon 16 Jun 2014 10:42
by fulvion
Hello costa,
i had a similiar problem writing a win32 service. It simply couldn't stop correctly.

looking through my old code i found this comment in my include list.
i don't really know if this can help you and i'm not even 100% sure that it really helped me out at that time!

RAD 2009 and dbxoda 4.40.16
#include <vcl.h>
#include <Classes.hpp>
#include <Provider.hpp>
#include <DBXpress.hpp>
#include <SqlExpr.hpp>
#include <DBXOracle.hpp> //If this unit is not included then, the application, cannot properly end and the main process keeps running.

Reference post:
http://forums.devart.com/viewtopic.php?f=9&t=16031

Re: vcl app not exiting upon closing the main form

Posted: Mon 16 Jun 2014 13:36
by AlexP
DBXOracle is a module of the standard dbExpress driver. Make sure you are using our driver.