AssertionFailed: DisposeBuf failed

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jbakuwel
Posts: 35
Joined: Tue 02 Feb 2010 04:47

AssertionFailed: DisposeBuf failed

Post by jbakuwel » Fri 12 Nov 2010 06:12

Hi,

UniDac 3.00.0.10 / PostgreSQL 8.3 / Delphi 2010

I'm trying to edit multiple detail records in a detail table of a master/detail relationship using a (Infopower) TwwDBGrid. I edit one field, then press the down arrow to edit the same field of the next record.

The edit of the first record always works but the edit of the second sometimes fails, sometimes shows invalid random characters (not characters I entered) and sometimes raised an EAssertionFailed exception:

(D:\Projects\Delphi\Dac\Common\Source\MemData.pas, line 7907)

I'll continue debugging trying to obtain more detailed information; in the mean time you'd help me by having a look at the source and letting me know which condition(s) trigger this assertion.

kind regards,
Jan

halenpolen
Posts: 31
Joined: Sun 27 Jun 2010 20:50

Post by halenpolen » Fri 12 Nov 2010 08:28

Same case
IF I add new record in detail table I get Error

Exception class EAssertionFailed with message 'Assertion failure (D:\Projects\Delphi\Dac\SqlServer\Source\MSServices.pas, line 726)'. Process FailOver.exe (2808)

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 12 Nov 2010 09:59

Hello,

I can not reproduce both problems.

halenpolen: Please specify the options you are using in the FailOver project and the versions of your IDE and UniDAC.

jbakuwel: Please download the latest version of UniDAC an try to reproduce the problem,if it arises again, please send me a small project to demonstrate the problem and a script to create tables to alexp*devart*com.

jbakuwel
Posts: 35
Joined: Tue 02 Feb 2010 04:47

Post by jbakuwel » Fri 03 Dec 2010 05:29

I've tested with UniDAC 350 and installed the source so I can now provide you with more information. Creating a demo project is a bit of work so I'll first try to collect more data this way. Call stack:

TMemDataSet.Cancel: Data.AddRefComplexFields(CancelBuf); //line 2267
TData.AddRefComplexFields(RecBuf: IntPtr): StringHeap.AddRef(Marshal.ReadIntPtr(RecBuf, Field.Offset)) // line 3602
TStringHeap.AddRef(Buf: IntPtr): Assert(RefCount >= RefNull, 'AddRefStr failed'); //line 7967

RefCount = 100
RefNull = 101

Please let me know if you need to more information and what information you'd be looking for in particuar.

Jan

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 03 Dec 2010 12:44

Hello,

I have installed the trial version of InfoPower Studio for Delphi 2010 and tried to reproduce the problem again, but I couldn't get the errors you described.
I have used our demo tables (emp, dept), you can create them from our demo project.
So please try to create the demo project to demonstrate the problem and send it to alexp*devart*com.

jbakuwel
Posts: 35
Joined: Tue 02 Feb 2010 04:47

Post by jbakuwel » Tue 07 Dec 2010 05:20

Hi Alex,

I've tried creating a small demo project for you but am unable to reproduce the problem there. I've also made some modifications to the code which look like have successfully circumvented the problem.

It is too much work at the moment to reduce the project I'm working on to a small project that demonstrates this problem. The problem also manifests itself with a standard TDBGrid.

I have a feeling it might have to do with calling Cancel "out of sync" with Edits and Posts on datasets (ie. for instance calling Cancel twice) even though I think UniDAC shouldn't throw an assertion. Sorry can't provide you with more detailed information at this stage.

kind regards,
Jan

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 07 Dec 2010 15:03

Hello,

Unfortunately we can't fix a bug or change some kind of behavior of our components before we can reproduce the problem, so if you succeed in creating a project that demonstrates this problem, please send it to me.

jbakuwel
Posts: 35
Joined: Tue 02 Feb 2010 04:47

Post by jbakuwel » Wed 08 Dec 2010 03:53

Hi Alex,

Fair enough. Unfortunately I currently don't have the time to start stripping the application down to create a simple project that demonstrates the problem. Since I do have the source I can however do some debugging if that is helpful. I'd need to know what to look for though - I don't intend to study the UniDAC code extensively.

It seems I've successfully circumvented the issue now so I'm happy :-)

kind regards,
Jan

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Wed 15 Dec 2010 12:07

Hello

We are interested in stability of our components so we are looking forward to receiving your sample.

Post Reply