#1 2013-03-10 21:21:30

colbert
Member
Registered: 2013-03-02
Posts: 38
Website

Assertion Failure

Hello,

I was using Batch Update with SQlite and I found this error on the file mORMot.pas. This just happens with BatchUpdate all the others work perfectly.

In this command I'm trying to Update 67 records.

procedure TSQLRecordProperties.SetSimpleFieldsExpandedJSONWriter(
  W: TJSONWriter; withID: boolean; Occasion: TSQLOccasion);
var i, id, n: integer;
begin
  ...
  assert(id=length(W.ColNames)); //error happens here
end;

Last edited by colbert (2013-03-10 21:31:28)

Offline

#2 2013-03-11 09:17:48

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Assertion Failure

I was not able to reproduce the problem, with BatchUpdate.
It is already part of the regression tests, and there is no error trigerred with

assert(id=length(W.ColNames));

Are you using the latest unstable 1.18 release from http://synopse.info/fossil ?
What is your TSQLRecord definition?
Do you have some simple code to reproduce the problem?
Or at least could you step into the debugger, and say why id<>length(W.ColNames) ? (what is in W.ColNames[] ?)

Offline

#3 2013-03-11 11:49:36

colbert
Member
Registered: 2013-03-02
Posts: 38
Website

Re: Assertion Failure

I'm using the latest unstable 1.18 release

The value of W.ColNames is:

('"RowID":', '"IDEmpresa":', '"Excluido":', '"DataAlteradao":', '"IDUsuarioCadastro":', '"IdPerfil":', '"ActionName":', '"DescricaoMenu":', '"Ativo":', '')

Offline

#4 2013-03-11 13:58:36

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Assertion Failure

The latest W.ColNames[] = '' which sounds not as expected.
Weird.
W.Fields bits should map SimpleFields[] array.

I'm not able to reproduce it here.

Do you have a TCreateTime published field type in your TSQLRecord?

Do you have some simple code to reproduce the problem?

Try this: http://synopse.info/fossil/info/4a6f8c4016

Offline

#5 2013-03-11 16:28:10

colbert
Member
Registered: 2013-03-02
Posts: 38
Website

Re: Assertion Failure

Perfect, problem solved with this new update.

Thank you.

May God have mercy of our souls.

Offline

#6 2013-03-11 16:43:33

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Assertion Failure

Thanks for the feedback!

Offline

Board footer

Powered by FluxBB