[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[E8] Confirmation that the bug is still present (Nov and Dec 2016)

Status: CONFIRMED (also Dec 2016)

The issue is present in all platforms where we run using JSC
The bug emerges as a fast exit (crash) in mobile devices (free memory 1Gb) after a number of iterations, or running at very slow execution speed (free memory +2Gb)

Steps taken to reproduce the bug

  1. Download the E8 project file - E8.zip
  2. We use current S8 console snapshot (to reduce the image to S8 kernel classes) included in the project as default.snapshot.js
  3. The expression run to expose the bug is equivalent to the following Smalltalk code:
    | code |
    code := '1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0'.
    500 timesRepeat: [:i| self print: '#' ,i ,' ' ,[ code doIt ] ms ,#ms ].

    The expression will evaluate the code string and print time spent in each evaluation.
  4. The javascript code used for testing is embedded in file default.app:
    var code = "1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0";
    (500).timesRepeat_(function(i){
        print("#"+i+" "
               +(function(){code.doIt()}).ms()
               +"ms");
    });

  5. The code for print function send the argument to debugger console (it is defined in file prologue.js)

Results of running the test in multiple execution environments


Running as iOS application

Built with XcodeVersion 8.2 beta (8C23)
ObjectiveC codeUsing Apple's new Objective-C to Javascript Bridge.
See ViewController.m file in Xcode project (E8.zip)

iPhone 6s - iOS 10.1.1 (14B150)Crash (fast exit) in step #28 eval time=3500 to 6000ms
iPad - iOS 10.2 (14C5077b)Finished OK, eval time=3000 to 7000ms

Running in web

To test how it runs in web, using Safari & Chrome
  1. open the UI8 page in a new window, with Safari and Chrome
  2. Open a workspace and copy the following code
    | code |
    code := '1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0'.
    50 timesRepeat: [:i| self print: '#' ,i ,' ' ,[ code doIt ] ms ,#ms ].
  3. Press the U8 icon (right bottom of the page) to show the basic U8 Tools
    or open the Transcript (third icon from left of the U8 toolbar)
  4. Select the code to evaluate and press doIt button (2nd button of the workspace's toolbar)
  5. The Transcript will show the results of evaluating the code

Results of run in macOS Sierra (version 10.12.1); Mac mini (Late 2014) 8GB
Safari 10.0.1 (12602.2.14.0.7)Freeze for long time, but finished, eval time=2500 to 5000ms
Chrome 54.0.2840.98 (64-bit)Finished OK, eval time=30 to 45ms

Run with Coco8 (ver 1.A.F)

iPhone 6s - iOS 10.1.1 (14B150)Crash (Terminated due to memory issue) in step #3 eval time=4600 to 5700ms
iPad - iOS 10.2 (14C5077b)Finished OK, eval time=1900 to 2400ms

Run with jx8-ios (ver nov2016 - spidermonkey VM)

iPhone 6s - iOS 10.1.1 (14B150)Finished OK, eval time=370 to 420ms
iPad - iOS 10.2 (14C5077b)Finished OK, eval time=100 to 220ms

Run with jx8-android (ver nov2016 - v8 VM)

Sony Xperia Z3 - Android 5.1.1Finished OK, eval time=630 to 1070ms