#1 2016-09-22 02:20:08

ComingNine
Member
Registered: 2010-07-29
Posts: 294

Exception raised in TestSynSM: TSMEngine error: [JSError 110] mustache

Using mORMot '1.18.2923', TestSynSM gives "TSMEngine error: [JSError 110] mustache.js (533): function renderSection does not always return a value" at certain circumstances. Could you help to check ?

2. SynSM

 2.1. Syn SM:
  - Create sm engine: 9 assertions passed  13.39ms
  - External object: 43 assertions passed  17.96ms
  - Sm value transformation: 90,020 assertions passed  998.53ms
  - Script evaluation: 14 assertions passed  1.15ms
! Syn SM - Load mustache template
! Exception ESMException raised with messsage:
!  TSMEngine error: [JSError 110] mustache.js (533): function renderSection does not always return a value
! Syn SM - Run mustache template
! Exception ESMException raised with messsage:
!  TSMEngine.MakeObject(value: not an object)
  - Run techempower template: no assertion  3.14ms
  - Array buffer support: 1,698 assertions passed  5.17ms
  - Abort on timeout: 4 assertions passed  2.00s
  Total failed: 1 / 91,790  - Syn SM FAILED  3.77s

The log files are given in gist:

TestSynSM.exe compiled by Delphi 7 and run in IDE  ======= OK
d_7_inIDE

https://gist.github.com/anonymous/8bbae1353fc7648ad14458ad889e203d

TestSynSM.exe compiled by Delphi 7 and run in CMD  ======= Exception
d_7_inCMD

https://gist.github.com/anonymous/bced428013a81af71bf36dfbd4195ff8

TestSynSM.exe compiled by Delphi Berlin and run in IDE with debugger  ======= OK
d_berlin_inIDE_debugger

https://gist.github.com/anonymous/b74fb5cc637a2764c8709091ee71d2f1

TestSynSM.exe compiled by Delphi Berlin and run in IDE without debugger  ======= Exception
d_berlin_inIDE_nodebugger

https://gist.github.com/anonymous/a8d35aa5a75317191ef987dc2ad589dd

Last edited by ComingNine (2016-09-22 02:24:02)

Offline

#2 2016-09-22 06:25:53

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

Re: Exception raised in TestSynSM: TSMEngine error: [JSError 110] mustache

Did you try at least to use latest revision 1.18.2983 ?

Offline

#3 2016-09-22 06:59:57

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: Exception raised in TestSynSM: TSMEngine error: [JSError 110] mustache

@ab,

So I also tried running the test, with xe4, and I've just updated to the latest rev: https://github.com/synopse/mORMot/commi … 5e58e8bd2b

Same as the op, the result shows the error also:

1. SynSMAPI

 1.1. Syn SMAPI:
  - Runtime creation: 10 assertions passed  28.64ms
  - Compilation routines: 11 assertions passed  6.33ms
  - Basic type delphi sm interop: 400,031 assertions passed  139.82ms
  - Spidermonkey objects: 16 assertions passed  118us
  - String and garbage collection: 3,017 assertions passed  15.05ms
  - Native functions and object: no assertion  123us
  - Multiple threads: no assertion  92us
  - Basic sm structure wrappers: no assertion  85us
  - Jslint support: 1 assertion passed  8.88ms
  - External object: 44 assertions passed  330us
  - Finalize: 1 assertion passed  1.21ms
  Total failed: 0 / 403,131  - Syn SMAPI PASSED  203.05ms


2. SynSM

 2.1. Syn SM:
  - Create sm engine: 9 assertions passed  8.90ms
  - External object: 43 assertions passed  11.97ms
  - Sm value transformation: 90,020 assertions passed  1.73s
  - Script evaluation: 14 assertions passed  2.86ms
! Syn SM - Load mustache template
! Exception ESMException raised with messsage:
!  TSMEngine error: [JSError 110] mustache.js (533): function renderSection does
 not always return a value
! Syn SM - Run mustache template
! Exception ESMException raised with messsage:
!  TSMEngine.MakeObject(value: not an object)
  - Run techempower template: no assertion  245us
  - Array buffer support: 1,698 assertions passed  2.02ms
  - Abort on timeout: 4 assertions passed  2.10s
  Total failed: 1 / 91,790  - Syn SM FAILED  3.87s


Generated with: Delphi XE4 compiler

Time elapsed for all tests: 4.07s
Tests performed at 2016/9/22 14:55:11

Total assertions failed for all test suits:  1 / 494,921
! Some tests FAILED: please correct the code.
Done - Press ENTER to Exit

BTW, So currently mORMot includes two versions of SpiderMonkey, thd old SM24, and the new SM45 recently announced by @MPV, is this correct? Which version do you and MPV suggest to use then? Thanks.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#4 2016-09-22 15:45:26

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

Re: Exception raised in TestSynSM: TSMEngine error: [JSError 110] mustache

There is two problems here:
1) bad function mustache.js renderSection on line 533. SiderMonkey raise a warning
2) our binding consider warning is a error and throw

Offline

#5 2016-09-22 16:05:26

ComingNine
Member
Registered: 2010-07-29
Posts: 294

Re: Exception raised in TestSynSM: TSMEngine error: [JSError 110] mustache

Thank you very much for your efforts !
Can you help to comment : (1) Why the exception only is raised for certain circumstances (for D7, outside IDE; for latest versions, without debugger) ? (2) Is this test-failing expected ?

Offline

#6 2016-09-22 17:12:50

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

Re: Exception raised in TestSynSM: TSMEngine error: [JSError 110] mustache

I fix a warning - actually this is a bug in our test. See [a30165310f]
I'm totally not understand why it raised only if debugger is off. AFAIR autotest do some hack for errors handling in debuger mode, but can't find where

Offline

#7 2016-09-22 17:15:32

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

Re: Exception raised in TestSynSM: TSMEngine error: [JSError 110] mustache

About SM versions - we use the old SM24, and the new SM45 in production. But I suggest to use a SM45 (SyNode).

Offline

#8 2016-09-23 07:16:08

ComingNine
Member
Registered: 2010-07-29
Posts: 294

Re: Exception raised in TestSynSM: TSMEngine error: [JSError 110] mustache

mpv wrote:

I fix a warning - actually this is a bug in our test. See [a30165310f]
I'm totally not understand why it raised only if debugger is off. AFAIR autotest do some hack for errors handling in debuger mode, but can't find where

Thank you for fixing the code and committing the change to trunk!

About the exception when debugger is off: do you mean ab might know all the details ? big_smile

Offline

Board footer

Powered by FluxBB