Assertion Failure
-
- Posts: 4
- Joined: Mon 13 May 2013 19:05
Assertion Failure
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.
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.
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Assertion Failure
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.
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.
-
- Posts: 4
- Joined: Mon 13 May 2013 19:05
Re: Assertion Failure
Hello...
Thank you.
Which method would be more feasible in your view?
Magno.
Thank you.
Which method would be more feasible in your view?
Magno.
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Assertion Failure
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.
If you want to work with DB really in parallel, then it will be suitable for you to create separate TSQLConnections for each thread.
-
- Posts: 4
- Joined: Mon 13 May 2013 19:05
Re: Assertion Failure
Ok thanks for the feedback.
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Assertion Failure
If any other questions come up, please contact us.
Best regards,
Demetrion
Devart Team
Best regards,
Demetrion
Devart Team
-
- Posts: 4
- Joined: Mon 13 May 2013 19:05
Re: Assertion Failure
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.
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.
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Assertion Failure
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.
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.