vcl app not exiting upon closing the main form

vcl app not exiting upon closing the main form

Postby costa » Tue 28 Jan 2014 02:02

costa
 
Posts: 30
Joined: Thu 27 Aug 2009 20:30

Re: vcl app not exiting upon closing the main form

Postby AlexP » Wed 29 Jan 2014 09:36

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.
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: vcl app not exiting upon closing the main form

Postby costa » Wed 29 Jan 2014 23:48

Hello:

Here is a project that you can use to reproduce this: https://dl.dropboxusercontent.com/u/35370420/TestError.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
costa
 
Posts: 30
Joined: Thu 27 Aug 2009 20:30

Re: vcl app not exiting upon closing the main form

Postby AlexP » Thu 30 Jan 2014 13:42

We couldn't reproduce the problem. Please send an application that stably (on the first button click desirably) reproduces the problem
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: vcl app not exiting upon closing the main form

Postby costa » Thu 30 Jan 2014 20:41

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.
costa
 
Posts: 30
Joined: Thu 27 Aug 2009 20:30

Re: vcl app not exiting upon closing the main form

Postby costa » Fri 31 Jan 2014 18:58

Hello:

We made a slight change to the app which makes more reproducible. You can get it here: https://dl.dropboxusercontent.com/u/35370420/TestError.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
costa
 
Posts: 30
Joined: Thu 27 Aug 2009 20:30

Re: vcl app not exiting upon closing the main form

Postby dataplan » Thu 15 May 2014 07:57

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! :!:
dataplan
 
Posts: 8
Joined: Thu 02 May 2013 08:16

Re: vcl app not exiting upon closing the main form

Postby AlexP » Mon 19 May 2014 14:09

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.
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: vcl app not exiting upon closing the main form

Postby fulvion » Mon 16 Jun 2014 10:42

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
fulvion
 
Posts: 18
Joined: Fri 06 Oct 2006 09:47

Re: vcl app not exiting upon closing the main form

Postby AlexP » Mon 16 Jun 2014 13:36

DBXOracle is a module of the standard dbExpress driver. Make sure you are using our driver.
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35


Return to dbExpress driver for Oracle