init-requires throws Range Error maximum call stack exceeded

130 views
Skip to first unread message

John Chijioke

unread,
May 6, 2015, 10:53:07 AM5/6/15
to clojur...@googlegroups.com
I get the above error when initializing cljs repl.

Has anyone got the same issue?


David Nolen

unread,
May 6, 2015, 10:56:41 AM5/6/15
to clojur...@googlegroups.com
Haven't seen this. Will need more a lot information about what you attempted.

Thanks,
David

On Wed, May 6, 2015 at 10:53 AM, John Chijioke <johnb...@gmail.com> wrote:
I get the above error when initializing cljs repl.

Has anyone got the same issue?


--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

John Chijioke Umeasiegbu

unread,
May 6, 2015, 11:23:15 AM5/6/15
to David Nolen
Okay I'll send in more details in while. Thanks.

Sent from my BlackBerry 10 smartphone.
From: David Nolen
Sent: Wednesday, May 6, 2015 3:56 PM
Subject: Re: [ClojureScript] init-requires throws Range Error maximum call stack exceeded

You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/ewRpTfSOYq8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.

John Chijioke

unread,
May 8, 2015, 2:32:32 AM5/8/15
to clojur...@googlegroups.com
Hello,

I tried to be sure this was not a fault of piggieback therefore I spent days tracing this issue. As it turns out it is not and has more to do with the init require calls that happens in the browser.

I tried the cljs repl with and without piggieback and it returned the same error in both cases.

The actual code from piggieback is

```clojure
(ns cljs.user
(:require [cljs.repl :refer-macros (source doc find-doc
apropos dir pst)]))
```

I also trief adding the code from -repl-options of browser env to the above it only resulted in several more calls from browser to the server and still ended with the Range Errors.


Regardless of whether it happens before the browser has connected or not the above code throws the folowing error:

```
RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at cljs$core$_EQ_ (http://localhost:30000/generated-js/cljs/core.js:4812:42)
at Object.clojure.browser.repl.bootstrap.goog.require [as require__] (http://localhost:30000/generated-js/clojure/browser/repl.js:207:19)
at Object.clojure.browser.repl.bootstrap.goog.require [as require__] (http://localhost:30000/generated-js/clojure/browser/repl.js:227:16)
at Object.clojure.browser.repl.bootstrap.goog.require [as require__] (http://localhost:30000/generated-js/clojure/browser/repl.js:227:16)
at Object.clojure.browser.repl.bootstrap.goog.require [as require__] (http://localhost:30000/generated-js/clojure/browser/repl.js:227:16)
at Object.clojure.browser.repl.bootstrap.goog.require [as require__] (http://localhost:30000/generated-js/clojure/browser/repl.js:227:16)
at Object.clojure.browser.repl.bootstrap.goog.require [as require__] (http://localhost:30000/generated-js/clojure/browser/repl.js:227:16)
at Object.clojure.browser.repl.bootstrap.goog.require [as require__] (http://localhost:30000/generated-js/clojure/browser/repl.js:227:16)
at Object.clojure.browser.repl.bootstrap.goog.require [as require__] (http://localhost:30000/generated-js/clojure/browser/repl.js:227:16)
at Object.clojure.browser.repl.bootstrap.goog.require [as require__] (http://localhost:30000/generated-js/clojure/browser/repl.js:227:16)
```

As a side effect this creates a bug in piggieback where the print function does not get called in order to set the *cljs-compiler-env* var on first call.

Regards,
John

N/B: I tried to format the codes but I don't know if it will work. David can you tell me how you do it?

David Nolen

unread,
May 8, 2015, 7:17:36 AM5/8/15
to clojur...@googlegroups.com
I will a need a way to reproduce the issue without piggieback. Do you have a complete minimal case that I can look at?

Thanks,
David

John Chijioke

unread,
May 9, 2015, 10:42:01 AM5/9/15
to clojur...@googlegroups.com
I've tried to think of some minimal reproducible case but can't come up with any. The only additional info I can add at this point is my chrome version. Also important to note is that this does not happen in firefox but it still makes extraordinary many calls to the repl server. I think chrome is failing for this many calls to the server but firefox manages to see it through.

To give you an idea of how much calls it makes I pasted the log from chrome in github. I don't know whether it's expected behavior and it's just my chrome version giving the issue.

Chrome Version: 40.0.2214.115 (64-bit)
ClojureScript Version: 0.0-3230

Github gist for logs: https://gist.github.com/johnbendi/2f7071b4392e97ca8ba3

As you can see the call are very many and that's just for chrome because it fails halfway with the Range Error.

What I did in my project without piggieback from the command line:

1. cd to my project root
2. lein repl
3. (cljs.repl/repl (browser/repl-env {}))
4. connect from browser to repl

Then the behavior is observed in my case.

As a workaround I just removed the require call. So that I can continue with what I was doing before trying to upgrade piggieback and then noticing these issues.

HTH. Let me know if there is any other info you need.

Regards,
John.

David Nolen

unread,
May 9, 2015, 10:53:13 AM5/9/15
to clojur...@googlegroups.com
I don't use piggieback and that's really outside the scope of anything I'd look into. piggieback users will have to chime in.

David

John Chijioke Umeasiegbu

unread,
May 9, 2015, 1:41:28 PM5/9/15
to David Nolen
I thought I gave the steps I tried without piggieback?



Sent from my BlackBerry 10 smartphone.
From: David Nolen
Sent: Saturday, May 9, 2015 3:53 PM
Subject: Re: [ClojureScript] init-requires throws Range Error maximum call stack exceeded
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/ewRpTfSOYq8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.

David Nolen

unread,
May 9, 2015, 1:51:34 PM5/9/15
to clojur...@googlegroups.com
Sorry it wasn't clear to me what you gave were actual steps. I need a complete minimal case that I can actually try and run. If you cannot come up with this there really isn't much I can do.

As a side note the only time I've seen something like this is if you don't defonce your REPL connection and you then try to require the namespace that makes the REPL connection. Note all this is covered in the new Quick Start.

David
Reply all
Reply to author
Forward
0 new messages