You are not logged in.
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
@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
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
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
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
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 ?
Offline