Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out of memory error with simple test, happens before calling any commands #199

Open
Darker opened this issue Nov 22, 2016 · 3 comments
Open

Comments

@Darker
Copy link

Darker commented Nov 22, 2016

This is the full error:

PyPy failed: out of memory

This is the relevant code:

  <script src="http://pypyjs.org/pypyjs-release/lib/Promise.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="http://pypyjs.org/pypyjs-release/lib/FunctionPromise.js" type="text/javascript" charset="utf-8"></script>
  <script src="http://pypyjs.org/pypyjs-release/lib/pypyjs.js" type="text/javascript" charset="utf-8"></script>
  <script>
      // Send all VM output to the console.
      pypyjs.stdout = pypyjs.stderr = function(data) {
        console.log("[PYTHON] ", data);
      }
      // Display a helpful message and twiddle thumbs as it loads.
      pypyjs.stdout("Loading PyPy.js.\n\n");
      pypyjs.stdout("It's big, so this might take a while...");

      pypyjs.ready().then(function() {
        pypyjs.stdout('Welcome to PyPy.js!\n') ;

        return pypyjs.repl(function (ps1) {
          // wtf is this?
          console.log(ps1);
          return new Promise(function (resolve, reject) {
              // if DOM event is raised, the text will go to stdin
              // provided this is stdin, I mean, the hell I know?
              function pypy_text(e) {
                  resolve(e.text);
                  window.removeEventListener("pypy_stdin", pypy_text);
              }
              window.addEventListener("pypy_stdin", pypy_text);
          });
        });
      }).then(null, function(err) {
        //jqconsole.Reset();
        console.error("PyPy failed: ", err);
      });

Here's the full file, as it appears on my disk: https://gist.github.com/Darker/4202e9c45d4386370f9b7adaed8b479d

I open it directly in the browser, without using http server.

@Darker
Copy link
Author

Darker commented Nov 22, 2016

del
It actually happens even on your website. I wonder, what the hell is that? Maybe connection issues?

@albertjan
Copy link
Contributor

Must be a browser thingy, works fine for me.

@Darker
Copy link
Author

Darker commented Nov 22, 2016

I can confirm that this randomly happens and is only fixed by restarting the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants