Mega Search
23.2 Million


Sign Up

Make a donation  
FireDAC - Endless loop in the waitfor from TADTimerPool.Dest  
News Group: embarcadero.public.delphi.database.firedac

Hi everybody,

I'm experiencing an issue with my code. I'm migrating a Delphi 2007 program to XE3 and I have a problem.

In a dll project I put a TADConnection (with the ADPhysMySQLDriverLink and ADGUIxWait components) in a data module and then I launch a Thread sharing this TADConnection. The Thread is executing normally and when comes the time to destroy all, the ADTerminate procedure from the uADStanFactory finalization is called and so is the TADTimerPool.Destroy from uADStanUtil. In this destructor starts an endless loop inside of the waitfor function. I don't understand what the waitfor is actuallty waiting for and I 
don't know how to fix this problem. Of course when this happens the program is frozen and I have to stop it.

Is there anyone knowing what could be the problem and what I should do to fix it?

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 19-May-2014, at 9:55 AM EST
From: Alain MILANDRE
 
Re: FireDAC - Endless loop in the waitfor from TADTimerPool.  
News Group: embarcadero.public.delphi.database.firedac
In XE6 this code was reworked, and there is no more TADTimerPool (TFDTimerPool).
So, this issue was resolved once and forever.

I dont know what is your FireDAC version. But depending on the version try one the following:
* set TADGUIxWaitCursor.Provider to Console, save form, remove uADGUIxFormsWait from the uses clause;
* exclude uADGUIxFormsWait from the uses clause and include uADGUIxConsoleWait;
* set uADGUIxIntf.FADGUIxSilentMode to True.

Also, it is not safe to share the same TADConnection instance by several threads. More info:
http://docwiki.embarcadero.com/RADStudio/XE6/en/Multithreading_(FireDAC)

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 19-May-2014, at 10:18 AM EST
From: Dmitry Arefiev
 
Re: FireDAC - Endless loop in the waitfor from TADTimerPool.  
News Group: embarcadero.public.delphi.database.firedac
Thank you Dmitry,

I used the third method and it seems to work fine in my case.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 20-May-2014, at 4:08 AM EST
From: Alain MILANDRE