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

RangeError: Maximum call stack size exceeded #63

Closed
betimer opened this issue Feb 14, 2017 · 2 comments
Closed

RangeError: Maximum call stack size exceeded #63

betimer opened this issue Feb 14, 2017 · 2 comments

Comments

@betimer
Copy link

betimer commented Feb 14, 2017

Log as below:

RangeError: Maximum call stack size exceeded
at EncodeBuffer.reserve (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\flex-buffer.js:109:19)
at Array. (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-uint8.js:11:26)
at obj_to_map (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-type.js:234:16)
at object (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-type.js:165:5)
at encode (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-core.js:23:5)
at C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-type.js:239:7
at Array.forEach (native)
at obj_to_map (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-type.js:237:10)
at object (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-type.js:165:5)
at encode (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-core.js:23:5)
at array (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-type.js:192:7)
at object (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-type.js:153:33)
at encode (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-core.js:23:5)
at C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-type.js:239:7
at Array.forEach (native)
at obj_to_map (C:\Repo\rtcio-signaller\node_modules\msgpack-lite\lib\write-type.js:237:10)
2017-02-14T22:45:10.197Z - error: Ouch, an unhandled exception

@kawanet
Copy link
Owner

kawanet commented Feb 15, 2017

Show your input data which may have a circular structure (self reference).

var a = [];
var b = {a: a};
a.push(b);
JSON.stringify(a); // => TypeError: Converting circular structure to JSON
msgpack.encode(a); // => RangeError: Maximum call stack size exceeded

@betimer
Copy link
Author

betimer commented Feb 19, 2017

that is the root cause. after I use another package to fix the circular obj, it begins to work.

happy to close this issue.

Thanks

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