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

Uncaught Range Error #207

Closed
miklb opened this issue Jan 25, 2017 · 28 comments
Closed

Uncaught Range Error #207

miklb opened this issue Jan 25, 2017 · 28 comments
Labels

Comments

@miklb
Copy link

miklb commented Jan 25, 2017

Attempting to load task board for project, finds number of files, and while parsing for tasks, it locks up and throws error Uncaught RangeError: Maximum call stack size exceeded

Atom then gives unresponsive error and closing is the only way to get back to the app, so can not copy full trace, posting screenshot of the app and error message.

Not this was taken with latest Atom Beta(1.14.0-beta2), however same behavior with latest stable (1.13.0).

Let me know if there's anything else I can provide.

imdone_atom_time_out

@piascikj
Copy link
Member

So it looks like you weren't able to get a stack trace. What OS are you on?

@miklb
Copy link
Author

miklb commented Jan 25, 2017

Mac 10.12.3, but this was occurring before updating today.

@piascikj
Copy link
Member

Really having a hard time figuring this one out. Is this in a project you can grant me access to? Have you tried other projects?

@miklb
Copy link
Author

miklb commented Jan 25, 2017

That was going to be next idea. I'm starting a new project based off the work in the repo I was having an issue with, so will try with a fresh project without a bunch of nested directories to see if I can narrow down the issue.

I really want to get this working and be able to use it.

@peterwilli
Copy link

peterwilli commented Jan 26, 2017

I have the same issue, it says it's trying to scan 932 files. Here is my stack trace (snipped because it was unusually long)

Blocks the GUI entirely, I also have big folders added to imdoneignore.

RangeError: Maximum call stack size exceeded
    at Config.module.exports.Config.deepClone (/usr/share/atom/resources/app.asar/src/config.js:699:11)
    at /usr/share/atom/resources/app.asar/src/config.js:697:32
    at Object.mapObject (/usr/share/atom/resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:287:17)
    at Config.module.exports.Config.deepClone (/usr/share/atom/resources/app.asar/src/config.js:695:18)
    at Config.module.exports.Config.getRawValue (/usr/share/atom/resources/app.asar/src/config.js:591:22)
    at Config.module.exports.Config.get (/usr/share/atom/resources/app.asar/src/config.js:181:21)
    at Object.getSettings (/home/peter/.atom/packages/imdone-atom/lib/services/imdone-config.coffee:9:34)
    at Repository.imdoneRepo.shouldExclude (/home/peter/.atom/packages/imdone-atom/lib/services/imdone-helper.coffee:30:74)
    at Repository.repo.fileOK (/home/peter/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:14)
    at /home/peter/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /home/peter/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/home/peter/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /home/peter/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /home/peter/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /home/peter/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11
    at Repository.repo.fileOK (/home/peter/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:42)
    at /home/peter/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /home/peter/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/home/peter/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
 
   .......

@miklb
Copy link
Author

miklb commented Jan 26, 2017

@piascikj I tried with a new, small project and works like a charm, so definitely a problem with scanning a big project, ignores or not. Wondering if I can limit the scan to just TODO, as in my case, I don't see using any other tags.

@piascikj
Copy link
Member

That's interesting. How many files are there in your project folder?

Can you both run this command in your projects directory and send me the output?

find -maxdepth 1 -type d | while read -r dir; do printf "%s:\t" "$dir"; find "$dir" -type f | wc -l; done

@miklb
Copy link
Author

miklb commented Jan 26, 2017

find: illegal option -- m
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]

Doesn't play nice in macOS

@piascikj
Copy link
Member

I might have a fix for this. Seems I'm trying to run a stat on up to 1024 files at one time. Let me cut that back to about 256.

@piascikj
Copy link
Member

ok, ready to go! 2.1.4 has the new limit. Let me know how it works

@piascikj
Copy link
Member

@peterwilli Thanks for the stack trace

@miklb
Copy link
Author

miklb commented Jan 26, 2017

OK, give me a minute. Need to sign up for paid account 😉

@miklb
Copy link
Author

miklb commented Jan 26, 2017

No dice. Same call stack size error and locking up.

@piascikj
Copy link
Member

ok, were you able to get a stack trace?

@miklb
Copy link
Author

miklb commented Jan 26, 2017

It's huge, but this seems to be the relevant part (almost like it repeats in the trace…)

RangeError: Maximum call stack size exceeded
    at Config.module.exports.Config.deepClone (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:699:11)
    at Config.module.exports.Config.getRawValue (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:591:22)
    at Config.module.exports.Config.get (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:181:21)
    at Object.getSettings (/Users/miklb/.atom/packages/imdone-atom/lib/services/imdone-config.coffee:9:34)
    at Repository.imdoneRepo.shouldExclude (/Users/miklb/.atom/packages/imdone-atom/lib/services/imdone-helper.coffee:30:74)
    at Repository.repo.fileOK (/Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:14)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11

The bottom of the trace

at Repository.repo.fileOK (/Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:42)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:117:9
    at FSReqWrap.oncomplete (fs.js:123:15)

@piascikj
Copy link
Member

Try 2.1.15. I reduced the async limit to 10. If that doesn't work, I have a couple more things to try.

'Maximum call stack size exceeded' using async.forEachLimit · Issue #75 · caolan/async

Or maybe we can do a live debug session later. I have to run out to the grocery.

@miklb
Copy link
Author

miklb commented Jan 26, 2017

Related #78

@miklb
Copy link
Author

miklb commented Jan 26, 2017

RangeError: Maximum call stack size exceeded
    at Config.module.exports.Config.deepClone (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:699:11)
    at Config.module.exports.Config.getRawValue (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:591:22)
    at Config.module.exports.Config.get (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/config.js:181:21)
    at Object.getSettings (/Users/miklb/.atom/packages/imdone-atom/lib/services/imdone-config.coffee:9:34)
    at Repository.imdoneRepo.shouldExclude (/Users/miklb/.atom/packages/imdone-atom/lib/services/imdone-helper.coffee:30:74)
    at Repository.repo.fileOK (/Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:14)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11

End

    at Repository.repo.fileOK (/Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:42)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11
    at Repository.repo.fileOK (/Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:108:42)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:253:14
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:181:20
    at replenish (/Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:319:21)
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:326:29
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/async/lib/async.js:44:16
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:273:11
    at /Users/miklb/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:115:51
    at FSReqWrap.oncomplete (fs.js:123:15)

2.1.15

@piascikj
Copy link
Member

OK, I fixed up the error handling on the isBinary check in imdone-core/repo-fs-store.js. It's now async and just returning false on error. Give 2.1.16 a try and let me know what happens. Thanks for your business @miklb!

@miklb
Copy link
Author

miklb commented Jan 27, 2017

Unfortunately that didn't resolve the issue. This particular project has a lot of binary files and isn't a priority. I've actually spun out the part that I'm working on into a new repo and it works fine there.

Going forward, I will watch bigger projects and perhaps getting ahead of all of non-code elements in the ignore files will help.

Unfortunately, it's a private repo that I wouldn't have opportunity to share access. I appreciate your work on it, hopefully the fixes will help others experiencing the error.

@piascikj
Copy link
Member

ok, that sounds like a good idea. I'll also try testing with more binary files.

@piascikj
Copy link
Member

I just published another release to simplify the binary check. Let me know if it helps. This one is tough for me, since I'm unable to reproduce it.

@UtamaruMonster
Copy link

UtamaruMonster commented Feb 14, 2017

Same problem:
Big project, error on config.js:699.
Atom: 1.14.1
OS: macOS 10.12.3
imdone-atom: 2.1.18
event if i use .imdoneignore, finds 8 files but same error

Workaround is to ignore all *
and put tasks in todo.txt

@peterwilli
Copy link

@piascikj I just updated to the latest imdone and atom version on Ubuntu, it gives me the same error, it seems. I added 2 shots so you can tell by yourself.

I'm interested in why you can't reproduce, what kind of system are you running? I'm using Ubuntu with SSD which should be fast enough to can 600+ files.
screenshot from 2017-02-15 16 55 18
screenshot from 2017-02-15 16 55 28

@marconn
Copy link

marconn commented Feb 21, 2017

Default config make the app crash, the exclude paths in config.json are not working.
In my case using .imdoneignore and adding the excluded folders to it, made the package works at least

@piascikj
Copy link
Member

piascikj commented Mar 2, 2017

Anyone experiencing the range error please try 2.1.20 and let me know if you're still experiencing the issue. If you are, please attach a fresh stack trace.

@piascikj
Copy link
Member

piascikj commented Mar 3, 2017

Try v2.1.21. I filtered the files before calling async.each. I think it's fixed.

@piascikj piascikj closed this as completed Mar 3, 2017
@peterwilli
Copy link

@piascikj thanks, it works over here! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants