Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Uncaught Error: toString failed #11554

Closed

Description

@kasikasi2014

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.7.2
System: Mac OS X 10.11.4
Thrown From: Atom Core

Stack Trace

Uncaught Error: toString failed

At buffer.js:378

Error: toString failed
    at Buffer.toString (buffer.js:378:11)
    at Object.fs.readFileSync (fs.js:496:33)
    at Object.fs.readFileSync (ATOM_SHELL_ASAR.js:427:29)
    at File.module.exports.File.readSync (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/node_modules/pathwatcher/lib/file.js:266:36)
    at File.module.exports.File.getDigestSync (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/node_modules/pathwatcher/lib/file.js:167:14)
    at TextBuffer.module.exports.TextBuffer.serialize (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:231:68)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/project.js:137:27
    at Array.map (native)
    at Project.module.exports.Project.serialize (/Applications/Atom.app/Contents/Resources/app.asar/src/project.js:135:41)
    at AtomEnvironment.module.exports.AtomEnvironment.serialize (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:769:31)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:984:27

Commands

Config

{}

Installed Packages

# User
No installed packages

# Dev
No dev packages

Activity

  1. lee-dohm commented on Apr 21, 2016

    @lee-dohm
    Contributor

    What were you doing at the time of the exception?

  2. tntim96 commented on Apr 26, 2016

    @tntim96

    I got directed to here when opening a log file of size 288339043 bytes.

  3. d-Pixie commented on May 31, 2016

    @d-Pixie

    I got the same error trying to load a log file of 755,3 MB.

  4. lukec11 commented on Jun 4, 2016

    @lukec11

    I got this error trying to load a .sh file of 289669397 bytes

  5. kurtismullins commented on Jul 19, 2016

    @kurtismullins

    +1 -- The file I am reading is huge (570M JSON File). Even Chrome has trouble opening it, although it doesn't crash and burn.

  6. kaftw commented on Sep 10, 2016

    @kaftw

    +1 840MB CSV

  7. manthis commented on Sep 18, 2016

    @manthis

    Crashes when trying to read a > 2GB file or > 10GB file. That would be nice to have a fix. If I can help, let me kow.

  8. QuentinDela commented on Nov 3, 2016

    @QuentinDela

    +1

  9. fracalo commented on Dec 2, 2016

    @fracalo

    Same issue for a 124k js build , even in safe mode.

  10. a-abella commented on Dec 22, 2016

    @a-abella

    I've experienced hangs on a text file only 4.7MB in size, with 39,000 lines (unix find output). It loaded with time, but any form of manipulation (particularly, a find and replace) caused the window to become completely unresponsive. Version 1.13.0-beta8.

  11. winstliu commented on Dec 22, 2016

    @winstliu
    Contributor

    @a-abella Large file performance should be greatly increased in Atom 1.14, as long as the file does not also contain very long lines. Though your issue is unrelated to this one.

  12. joedaniels29 commented on May 2, 2017

    @joedaniels29

    Still seeing this in 1.16.

  13. pietrovismara commented on May 19, 2017

    @pietrovismara

    Is anyone even working on this issue?
    This should be a primary matter.
    I got to the point where, having atom open on a project folder, if a script creates a big file in the folder or changes it atom will freeze and hang until i'm forced to close it.

    All this without even opening the file. This problem seriously compromise the usability of this editor.

  14. suryaavala commented on May 22, 2017

    @suryaavala

    I think the problem is not only with opening large files (in size), but also with files (of any size) containing long single lines. Atom either crashes or gets hung when I try to open files like the ones described above.

    Example: I have a file of ~800KB and one of its lines is of 279768 characters length. Trying to edit/save the file is extremely slow (in the order of 30-45sec per operation). Other text editors (text wrangler) seem to deal with files like this without any problem.

    Atom Version: 1.18.0-beta0

  15. winstliu commented on May 23, 2017

    @winstliu
    Contributor

    I think #14435 will fix at the very least this uncaught exception. @maxbrunsfeld?

  16. maxbrunsfeld commented on May 23, 2017

    @maxbrunsfeld
    Contributor

    Yes, there are several separate issues that can cause poor behavior with large files, some in Atom core, and some in packages. #14435 will fix a very fundamental issue relating to large files and will ship in either Atom 1.19 or 1.20.

  17. prfxn commented on Jun 5, 2017

    @prfxn

    Suggestion: There could be a setting called "Editor for large files" in Atom, that'd make atom automatically open files larger than it can handle (or larger than a value defined by the user) in a different text editor. That'll save users the hassle of checking file size before they can decide whether to use Atom or another editor for that file, or trying to open it in Atom, failing and then switching to a different editor

  18. lock commented on Apr 1, 2018

    @lock

    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!

  19. locked and limited conversation to collaborators on Apr 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions