question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes while looking for helper files in huge project subdirectories

See original GitHub issue

Currently, ava looks for helper files in all project subdirectories excluding node_modules:

https://github.com/avajs/ava/blob/master/lib/ava-files.js#L90-L95

This can overwhelm ava when there exists subdirectories that are huge and/or with complicated fs hierarchies:

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [ava]
 2: 0x126389c [ava]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [ava]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [ava]
 5: v8::internal::Factory::NewInternalizedStringImpl(v8::internal::Handle<v8::internal::String>, int, unsigned int) [ava]
 6: v8::internal::StringTable::LookupString(v8::internal::Isolate*, v8::internal::Handle<v8::internal::String>) [ava]
 7: v8::internal::LookupIterator::PropertyOrElement(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, bool*, v8::internal::LookupIterator::Configuration) [ava]
 8: v8::internal::Runtime_KeyedGetProperty(int, v8::internal::Object**, v8::internal::Isolate*) [ava]
 9: 0x126964c063a7
Aborted (core dumped)

Allowing the specification of exclusion globs for helper files would help prevent this. We reverted back to v0.17.0 for now.

Environment: node v7.4.0 linux 4.2.0-34-generic ava v0.18.1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wmertenscommented, Jan 17, 2018

There are a number of issues related to this and the fix is very simple: clear/customize the helper matcher patterns.

Would it not be possible to roll out a quick fix for this by making a helperPatterns option that replaces the default one? For people that transpile everything they can then clear that array.

0reactions
maschwenkcommented, Apr 20, 2019

I see this is a thoroughly discussed issue. Is there any workaround outside of forking and emptying that const array?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crashing code helper 100% CPU on mac (#79405) - GitHub
Issue Type: Performance Issue VScode is crashing frequently. Reliably replicates when I do a search in all files. No plugins enabled. Occ...
Read more >
Long file paths crash File Explorer when accessing files on ...
The issue here is that File explorer crashes and restarts whenever browsing to a long path with a file that has a long...
Read more >
Create Directory and sub directories crashing - Stack Overflow
The issue is the spaces you have on the set final = %path%\%folder% line; if you take those extra spaces out you should...
Read more >
git commit crashes with Quarto presentations in subdirectories
When I put a single presentation in a subdirectory, it caused the Git tab to freeze. I removed the offending directory and was...
Read more >
Exercise 6.pdf - Exercise 6: Directories and subdirectories In this ...
Exercise 6: Directories and subdirectories In this exercise, you'll learn to write programs ... Now search the documentation for“cs111/file-operations”.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found