Assertion Failure

Assertion Failure

Postby Costa.Magno » Mon 13 May 2013 19:15

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.
Costa.Magno
 
Posts: 4
Joined: Mon 13 May 2013 19:05

Re: Assertion Failure

Postby DemetrionQ » Tue 14 May 2013 12:33

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.
DemetrionQ
Devart Team
 
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Assertion Failure

Postby Costa.Magno » Tue 14 May 2013 13:05

Hello...
Thank you.
Which method would be more feasible in your view?

Magno.
Costa.Magno
 
Posts: 4
Joined: Mon 13 May 2013 19:05

Re: Assertion Failure

Postby DemetrionQ » Tue 14 May 2013 15:08

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.
DemetrionQ
Devart Team
 
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Assertion Failure

Postby Costa.Magno » Tue 14 May 2013 22:52

Ok thanks for the feedback.
Costa.Magno
 
Posts: 4
Joined: Mon 13 May 2013 19:05

Re: Assertion Failure

Postby DemetrionQ » Wed 15 May 2013 08:17

If any other questions come up, please contact us.

Best regards,
Demetrion
Devart Team
DemetrionQ
Devart Team
 
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Assertion Failure

Postby Costa.Magno » Tue 28 May 2013 13:53

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.
Costa.Magno
 
Posts: 4
Joined: Mon 13 May 2013 19:05

Re: Assertion Failure

Postby DemetrionQ » Wed 29 May 2013 14:33

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/using-dac-products-in-multi-tier-db-application-development.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.
DemetrionQ
Devart Team
 
Posts: 271
Joined: Wed 23 Jan 2013 11:21


Return to dbExpress driver for PostgreSQL