You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
I opened a very large (591.0 MB (591,032,444 bytes)) JSON file.
Atom Version: 1.0.0 System: Ubuntu 15.04 Thrown From: Atom Core
Stack Trace
Uncaught RangeError: Invalid string length
At /usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:301
RangeError: Invalid string length
at Array.join (native)
at ReadStream.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:301:43)
at emitNone (events.js:72:20)
at ReadStream.emit (events.js:163:7)
at _stream_readable.js:891:16
at process._tickCallback (node.js:357:13)
For me this happens with any file above 268,435,440 characters, which is suspiciously close to 228 = 268,435,456. Anyway, here's how I reproduce on OS X 10.10.3:
% python -c "with open('broken.txt', mode='w') as f: f.write('1'*268435441)"
% open Atom.app --args broken.txt
This puts a limit on the maximally possible allocation request in 32-bit versions of 2^27-1. The maximal flat string length is ~2^28 (512MB space), and the maximal string length is 2^29-1 ...
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
mnquintana commentedon Jun 25, 2015
Was this a one-line file by any chance? Is there any way you could post this (or a similar file that triggers the same error) as a Gist?
/cc @nathansobo @maxbrunsfeld
ZenHarbinger commentedon Jun 25, 2015
It is not all one line.
https://www.dropbox.com/s/2jcdqso36rb014a/large.json.gz?dl=0
Not sure how to get a file like this anywhere except dropbox. If you need it somewhere else, let me know.
3zzy commentedon Jun 26, 2015
Had the exact same error opening a large (570mb) XML file.
robmcl4 commentedon Jun 26, 2015
For me this happens with any file above 268,435,440 characters, which is suspiciously close to 228 = 268,435,456. Anyway, here's how I reproduce on OS X 10.10.3:
% python -c "with open('broken.txt', mode='w') as f: f.write('1'*268435441)" % open Atom.app --args broken.txtClick proceed, and observe error.
kubetz commentedon Jun 26, 2015
@robmcl4 thanks for providing an easy way how to reproduce this issue 👍
I am getting same error under Windows 8.1 .
robmcl4 commentedon Jun 26, 2015
I feel like this is related to nodejs/node-v0.x-archive/issues/14170. If so, what this error is really saying is out of memory.
kubetz commentedon Jun 26, 2015
It seems that the issue is caused by V8 as it is not able to allocate string with given size.
More information in this V8 issue comment:
Note: 2^28 is not 512MB, but 256MB.
robmcl4 commentedon Jun 26, 2015
👍 That seems to be the problem. Additionally, this seems to be a duplicate of #7210.
izuzak commentedon Jun 26, 2015
Yeah, closing in favor of #7417. Thanks for the report and the details, everyone.
lock commentedon Apr 10, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!