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.
dd if=/dev/zero of=largefile count=1 bs=1000M; if this does not reproduce play around with adjusting bs and count.
Open atom and try to open largefile.
Atom Version: 0.208.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)
Atom Version: 1.0.0 System: Windows 7 Thrown From: Atom Core
Stack Trace
Uncaught RangeError: Invalid string length
At D:\xxx\Atom\resources\app.asar\node_modules\pathwatcher\lib\file.js:301
RangeError: Invalid string length
at Array.join (native)
at ReadStream.<anonymous> (D:\xxx\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)
Very annoying issue, I've to keep using Sublime Text to deal with these situations. Fix this please.
[Enter steps to reproduce below:]
Open a mid-large size file (tried with 324MB)
Atom Version: 1.2.4 System: Mac OS X 10.11.1 Thrown From: Atom Core
Stack Trace
Uncaught RangeError: Invalid string length
At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/pathwatcher/lib/file.js:317
RangeError: Invalid string length
at Array.join (native)
at ReadStream.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/pathwatcher/lib/file.js:317:38)
at emitNone (events.js:72:20)
at ReadStream.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:893:12)
at doNTCallback2 (node.js:441:9)
at process._tickCallback (node.js:355:17)
After a bit of research (source) I think that I've found the cause:
RangeError: Invalid string length meant that the String.prototype.length property was not representable in 32Bit. The IncrementalStringBuilder's part_length property is using a simple int to represent the length of a String.
Quoting @mraleph here, v8 has a String length limitation of (1 << 28) - 16. I assume this limitation is due to sign and pointer allocations (or reserved types that is checked against inside the VM).
(1 << 28) - 16
268435440
This is the actual maximum size of all String lengths. As even the Buffer implementation in IOJS is using Strings to represent binary data, you can't exceed that limit with a single String. So, if you try to read or write a file synchronously that is larger than ~268.44MB, you know that you will get an error message.
An alternative solution would be either splitting up the database with a mask (easiest method) or implementing an asynchronous pointer-manager and Stream writer implementation that uses String chunks smaller than 268435440 bytes and has an own virtual memory stack with chunks.
Atom Version: 1.5.4 System: Mac OS X 10.11.3 Thrown From: Atom Core
Stack Trace
Uncaught RangeError: Invalid string length
At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/pathwatcher/lib/file.js:317
RangeError: Invalid string length
at Array.join (native)
at ReadStream.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/pathwatcher/lib/file.js:317:38)
at emitNone (events.js:72:20)
at ReadStream.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:893:12)
at doNTCallback2 (node.js:441:9)
at process._tickCallback (node.js:355:17)
@MitchellCash The issue has been fixed, it just hasn't reached a stable version of Atom yet. We close issues as soon as the fix is merged into the master branch, not when it is released.
The same issue has happened. The .csv fIle is 278M.
Atom: 1.18.0
macOS: 10.12.5
Uncaught RangeError: Invalid string length
/Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/lib/file.js:314
Hide Stack Trace
RangeError: Invalid string length
at Array.join (native)
at ReadStream.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/lib/file.js:314:44)
at emitNone (events.js:91:20)
at ReadStream.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Also, it tells me: This is likely a bug in Atom. This issue has already been reported. and gives me link to the issue #14229
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
Raynes commentedon Jun 24, 2015
Just got this as well.
izuzak commentedon Jun 26, 2015
There's another report of this and more details in #7417.
/cc @nathansobo
arindell commentedon Jul 10, 2015
[Enter steps to reproduce below:]
Atom Version: 1.0.0
System: Windows 7
Thrown From: Atom Core
Stack Trace
Uncaught RangeError: Invalid string length
Commands
Config
{ "core": {}, "editor": { "fontSize": 13 } }Installed Packages
ButchDean commentedon Aug 2, 2015
Tried to open a 360MB text file and got this too.
cutecreep commentedon Aug 19, 2015
76 MB file broke it
karolis-sh commentedon Sep 22, 2015
336MB file, also broke
ssbarnea commentedon Sep 29, 2015
Anyone working on this? It does limit the use of ATOM, a lot.
wismill commentedon Oct 6, 2015
Wow, I did not expect such limitation. Also broke here with 277MB.
magic890 commentedon Dec 1, 2015
Very annoying issue, I've to keep using Sublime Text to deal with these situations. Fix this please.
[Enter steps to reproduce below:]
Atom Version: 1.2.4
System: Mac OS X 10.11.1
Thrown From: Atom Core
Stack Trace
Uncaught RangeError: Invalid string length
Commands
Config
{ "core": { "projectHome": "/Users/xxx/yyy/" }, "editor": { "invisibles": {}, "showIndentGuide": true, "softWrap": true, "tabLength": 4, "tabType": "soft", "showInvisibles": true, "fontSize": 12 } }Installed Packages
magic890 commentedon Dec 1, 2015
After a bit of research (source) I think that I've found the cause:
RangeError: Invalid string lengthmeant that theString.prototype.lengthproperty was not representable in 32Bit. The IncrementalStringBuilder's part_length property is using a simpleintto represent the length of aString.Quoting @mraleph here, v8 has a
Stringlength limitation of(1 << 28) - 16. I assume this limitation is due to sign and pointer allocations (or reserved types that is checked against inside the VM).This is the actual maximum size of all
Stringlengths. As even theBufferimplementation in IOJS is using Strings to represent binary data, you can't exceed that limit with a singleString. So, if you try to read or write a file synchronously that is larger than ~268.44MB, you know that you will get an error message.An alternative solution would be either splitting up the database with a mask (easiest method) or implementing an asynchronous pointer-manager and
Streamwriter implementation that usesStringchunks smaller than 268435440 bytes and has an own virtual memory stack with chunks.MitchellCash commentedon Mar 11, 2016
Steps to reproduce below:
Atom Version: 1.5.4
System: Mac OS X 10.11.3
Thrown From: Atom Core
Stack Trace
Uncaught RangeError: Invalid string length
Commands
Config
{ "core": {}, "editor": { "fontSize": 11, "invisibles": {} } }Installed Packages
magic890 commentedon Mar 11, 2016
@kevinsawicki please have a look into this.
MitchellCash commentedon Jun 9, 2017
If I follow the steps in my previous comment (#7210 (comment)) I still get the same issue, so it doesn't seem like this issue is solved.
Atom now seems to be directing me to issue #11690, so I have added 'Steps to Reproduce' there as well.
winstliu commentedon Jun 9, 2017
@MitchellCash The issue has been fixed, it just hasn't reached a stable version of Atom yet. We close issues as soon as the fix is merged into the master branch, not when it is released.
MitchellCash commentedon Jun 9, 2017
@50Wliu sorry! I do realise that now, I shouldn't be posting so late at night!
iamtodor commentedon Jul 24, 2017
The same issue has happened. The .csv fIle is 278M.
Atom:
1.18.0macOS:
10.12.5Also, it tells me:
This is likely a bug in Atom. This issue has already been reported.and gives me link to the issue #14229maxbrunsfeld commentedon Jul 24, 2017
@iamtodor You might want to try opening this file with the Beta version of Atom, Atom 1.19. This issue should be fixed already.
iamtodor commentedon Jul 24, 2017
@maxbrunsfeld thank you for the reply, for the suggestion. Could you please help me to update from stable
1.18.0to1.19.beta5?winstliu commentedon Jul 26, 2017
@iamtodor You can install the Atom Beta at https://atom.io/beta. You'll be able to freely switch between Atom and Atom Beta whenever you want (your existing Atom installation will not be overridden).
lock commentedon Mar 31, 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!