-
Notifications
You must be signed in to change notification settings - Fork 212
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
"exhausted heap space, trying to allocate ..." during auto generate *.g.dart files #2559
Comments
What builders are you using? Most likely one of them has a bug. |
I don't think it's a bug because some months ago the command run successfully. My colleague also uses the same build_runner version without problems |
I think there had been a change that limited the heap size of the VM somewhat recently. Although, based on dart-lang/sdk#27883 (comment) that change may have only affected linux. If the build had been using a high amount of heap space before a change to add a limit in the SDK could cause it to start failing. Can you check how much memory the build process uses before it fails? In the short term you could check if the |
The
|
Is that about what is available on your computer? If it is this might be because of a memory leak somewhere that was recently introduced. If your computer has more memory than that it's a signal that the VM might be setting an artificially low limit. |
When the build process fails, 8.4 GB of memory are still available. |
That points strongly to a memory leak in one of the builders you are using. Maybe in a specific version of the builder package. |
How do i resolve this? Here is the program: void main() {
|
@adityaoswal77 that looks unrelated to the this repo, and more a general flutter issue. |
I am going to close this issue as it is quite stale, we can re-open if we get some actionable information. |
Hello, I'm trying to auto-generate the *.g.dart file using build_runner package command, but the command ends with a series of "Exhausted heap space, trying to allocate.." messages.
The command I've used is
flutter packages pub run build_runner build
The other build_runner commands have also the same result.
I browsed for the problem on the Internet (git, stackoverflow, etc.) but I didn't find any solution.
Do you have any suggestions or solutions? Thanks!
Dart SDK Version : 2.5.0
package from this repo I'm using and the version: build_runner 1.6.5
IDE: VS code on Windows
The text was updated successfully, but these errors were encountered: