Assertion failure

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
LarsGeisler
Posts: 10
Joined: Fri 25 Jun 2010 09:00
Location: Denmark

Assertion failure

Post by LarsGeisler » Wed 04 Jan 2012 09:45

What could cause this message:

Assertion failure (D:\Projects\Delphi\Dac\Common\Source\CRVio.pas, line 244)

I do not have the source, so I'm unable to look it up.

Best Regards

Lars Geisler

AndreyZ

Post by AndreyZ » Wed 04 Jan 2012 15:33

Hello,

It is an odd situation, this error must not occur. We cannot reproduce this problem. Please try creating a small sample that demonstrates this problem and send it to andreyz*devart*com , including a script to create all needed server objects. Also please specify the following:
- the exact version of UniDAC. You can learn it from the About sheet of TUniConnection Editor;
- the exact version of your IDE;
- the exact version of database server you are working with. You can learn it from the Info sheet of TUniConnection Editor.

LarsGeisler
Posts: 10
Joined: Fri 25 Jun 2010 09:00
Location: Denmark

Post by LarsGeisler » Wed 04 Jan 2012 15:42

Yes I now it's very odd.
I can not create the error in our company, only at a customer, with some other mysterious errors.

Could you tell me what the assertion is - it might give us a clue, as to what is wrong.

Regards Lars Geisler

AndreyZ

Post by AndreyZ » Thu 05 Jan 2012 13:16

Please specify the way you deploy your application, with UniDAC packages built into your application, or you supply UniDAC packages with your application.

AndreyZ

Post by AndreyZ » Mon 09 Jan 2012 09:47

I have answered you by e-mail.

cymonx
Posts: 3
Joined: Wed 19 Sep 2012 05:12

Re: Assertion failure

Post by cymonx » Wed 19 Sep 2012 05:24

Dear AndreyZ,
Please send your solution to me([email protected]), or anwser for solv in this case.
Causing to I got it.

Best Regard,
Cmx.

LarsGeisler
Posts: 10
Joined: Fri 25 Jun 2010 09:00
Location: Denmark

Re: Assertion failure

Post by LarsGeisler » Wed 19 Sep 2012 11:06

Hi, The problem was that I reused a connection in both the main thread and a thread I created.

Regards Lars Geisler

AndreyZ

Re: Assertion failure

Post by AndreyZ » Wed 19 Sep 2012 11:39

Yes, the problem was caused by usage of one connection in several threads. The right way to work in a multi-threaded application is to have a connection (the TUniConnection component) in each thread.

cymonx
Posts: 3
Joined: Wed 19 Sep 2012 05:12

Re: Assertion failure

Post by cymonx » Wed 19 Sep 2012 12:25

Manny Thanks for quick respond.
That mean TSQLConnection does't work on DMServerContainer?(DataSnap), should be use TUniConnection instead?

Best regards,
CMX.

AndreyZ

Re: Assertion failure

Post by AndreyZ » Wed 19 Sep 2012 13:22

It does not mean that you should use TUniConnection instead of TSQLConnection. It means that, if your application uses several threads, you should have a connection (in your case the TSQLConnection component) in each thread.

cymonx
Posts: 3
Joined: Wed 19 Sep 2012 05:12

Re: Assertion failure

Post by cymonx » Fri 21 Sep 2012 11:17

Dear AndreyZ,
Manny thanks for your awnser. I'm use TSQLConnection, If create TSQLconnection on each thread that mean database connection is not single(DataSnap M-Tier Concept is wrong).
Ok fine!, I found something wrong in my code, I'm refresh log dataset every time when client connect to server. if remove this code cdsLog.Refresh, error is gone.

Best Regards,
CMX.

AndreyZ

Re: Assertion failure

Post by AndreyZ » Fri 21 Sep 2012 12:50

It's good to see that you have found the solution. If any other questions come up, please contact us.

Post Reply