#1 2015-10-31 00:19:41

alpinistbg
Member
Registered: 2014-11-12
Posts: 124

DocVariantData trouble

Hi ab,

The following code works on Delphi7 but fails with SIGSEGV on FPC 3.1.1

{$MODE DELPHI}
uses
  SynCommons;
var
  VPay: Variant;
  S: String;
begin
  S := 'pos';
  VPay := _Obj([]);
  if not VPay.Exists(S) then
    DocVariantData(VPay).AddValue(S, _Obj(['Count', 0, 'Sum', 0]));
  VPay.Value(S).Count := VPay.Value(S).Count + 1;
  VPay.Value(S).Sum := VPay.Value(S).Sum + Int64(1000);
end.

The fault is on DocVariantData.AddValue(). What is wrong?

Offline

#2 2015-11-21 13:07:35

AOG
Member
Registered: 2014-02-24
Posts: 488

Re: DocVariantData trouble

I did encounter the same failure with FPC.

The latest working commit is 1.18.1575. Dated: 2015-06-28 19:23:33. Named: "new TDynArrayHashed methods".

After this commit, there are some TDocVariantData changes and enhancements that are not working anymore with FPC.

So, if you use this commit, all is working as expected, including mustache templates (my current problem).

Offline

#3 2015-11-22 12:00:08

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,189
Website

Re: DocVariantData trouble

Could you please create a ticket?

Offline

#4 2015-11-23 21:21:36

ma64
Member
Registered: 2011-01-27
Posts: 10

Re: DocVariantData trouble

Hello ab,
how can one get registered for accessing the fossil system? I haven't been able to login there with my forum user id and password and hence couldn't open a ticket for the FPC 3.1.1 DocVariant issue that is mentioned in this post.
Regards, Michael

Offline

#5 2015-11-24 07:27:24

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,299
Website

Re: DocVariantData trouble

Michael, yes, users on forum and on fossil is a different users. You can login to fossil as anonymous user (user name: anonymous, password from picture on the fossil login page) and create a ticket

Offline

#6 2015-11-24 21:09:24

ma64
Member
Registered: 2011-01-27
Posts: 10

Re: DocVariantData trouble

Thank you, mpv.
I've now been able to create a ticket for this DocVariant issue.

Offline

#7 2015-11-27 14:48:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,189
Website

Re: DocVariantData trouble

Offline

#8 2015-11-28 08:17:45

AOG
Member
Registered: 2014-02-24
Posts: 488

Re: DocVariantData trouble

All working 100% after your commit !
Thanks !!

Offline

#9 2015-11-28 19:41:15

ma64
Member
Registered: 2011-01-27
Posts: 10

Re: DocVariantData trouble

Works for me too!
Thank you, ab, for your extraordinary support.

Offline

Board footer

Powered by FluxBB