#1 2017-11-01 20:05:06

mapes
Member
Registered: 2016-10-30
Posts: 16

SyNode Delphi XE3 AV

Hi,

I have tried to compile Example 2 in Delphi XE3, but got AV.

The problem is related to

https://synopse.info/forum/viewtopic.php?id=1733

To make it work, following functions must be used instead of Properties:

SpiderMonkey 45:

JSRuntime 
    function GetPrivate: Pointer;
    procedure SetPrivate(const Value: Pointer);
    function GetOptions: PJSRuntimeOptions;
    function GetGCParameter(key: JSGCParamKey): uint32;
    procedure SetGCParameter(key: JSGCParamKey; const Value: uint32);
    function GetErrorReporter: JSErrorReporter;
    procedure SetErrorReporter(er: JSErrorReporter);
    function GetInterruptCallback: JSInterruptCallback;
    procedure SetInterruptCallback(callback: JSInterruptCallback);
 
JSRuntimeOptions
    function getOptions(const Index: Integer): Boolean;
    procedure setOptions(const Index: Integer; const Value: Boolean);

SpiderMonkey 52:

  JSContext
  function GetPrivate: Pointer; {$ifdef HASINLINE}inline;{$endif}
  procedure SetPrivate(const Value: Pointer);   
 
  JSContextOptions
  function getOptions(const Index: Integer): Boolean;
  procedure setOptions(const Index: Integer; const Value: Boolean);

For some reason  SM52 fRt.GCParameter[] works, in SM45 need fRt.SetGCParameter

Offline

#2 2017-11-02 13:39:25

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

Re: SyNode Delphi XE3 AV

IMHO, this is a some kind of dark magic. AV appear only in XE3, with other compiler versions everything is OK ( we even compile for linux using FPC). I don't think we need to fix a XE3 specific on the library level. You can compile with XE2 - in case you buy a XE3 XE2 is free for you as far as i remember.

Offline

#3 2017-11-02 22:16:25

mapes
Member
Registered: 2016-10-30
Posts: 16

Re: SyNode Delphi XE3 AV

I can have only Delphi 7, so FPC for windows is the only way for me I suppose.
I really don't know why, when using Properties instead of Parameter there is allways nil.

And FPC for linux is what I'm looking forward.

Offline

#4 2017-11-10 09:42:49

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

Re: SyNode Delphi XE3 AV

I've created a dedicated forum entry for SyNode.
See https://synopse.info/forum/viewforum.php?id=22
Don't hesitate to create multiple threads in this new forum category!

Offline

Board footer

Powered by FluxBB