Page 1 of 1

Assertion Failure

Posted: Mon 13 May 2013 19:15
by Costa.Magno
I have the component in version Version 3.1.2, recently acquired.
But I'm having a lot of problems in Delphi XE3 with error "assertion failure":
First chance exception at $ 74F2C41F. EAssertionFailed class Exception with message 'Assertion failure (D: \ Projects \ Delphi \ Dac \ PostgreSql \ Source \ PgSQLProtocol.pas, line 2244)'.

I have an example, if not able to reproduce the error.

Re: Assertion Failure

Posted: Tue 14 May 2013 12:33
by DemetrionQ
Hello.

I have tested your example.
The problem is due to the fact that you are using the same TSQLConnection in different threads without synchronization. To solve the problem, you should either create its own TSQLConnection for each thread, or perform access to the DB from threads via the Synchronize method. You can read more detailed information about thread synchronization in the Embarcadero documentation.

Re: Assertion Failure

Posted: Tue 14 May 2013 13:05
by Costa.Magno
Hello...
Thank you.
Which method would be more feasible in your view?

Magno.

Re: Assertion Failure

Posted: Tue 14 May 2013 15:08
by DemetrionQ
The difference between the specified methods is that, on synchronization of threads, the operations executed via Synchronize are executed in the main threads, freezing the thread, that called Synchronize, while synchronization is being performed.
If you want to work with DB really in parallel, then it will be suitable for you to create separate TSQLConnections for each thread.

Re: Assertion Failure

Posted: Tue 14 May 2013 22:52
by Costa.Magno
Ok thanks for the feedback.

Re: Assertion Failure

Posted: Wed 15 May 2013 08:17
by DemetrionQ
If any other questions come up, please contact us.

Best regards,
Demetrion
Devart Team

Re: Assertion Failure

Posted: Tue 28 May 2013 13:53
by Costa.Magno
Good day.
I'm using a server datasnap for my application and the concomitant use of forms still having the same problem, and almost impossible to use the system.

Re: Assertion Failure

Posted: Wed 29 May 2013 14:33
by DemetrionQ
Hello.

I couldn't reproduce the problem.
I created datasnap server and client applications (similar to the ones described in the blog: http://blogs.devart.com/dac/index.php/u ... pment.html ) and used dbExpress Driver for PostgreSQL to connect to the database - everything works fine.

Please describe the problem in more details or send a simple sample demonstrating the problem to dmitryk*devart*com.