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.

[GWT] Java heap exception during compilation

See original GitHub issue

Issue details

It’s not possible to have big assets in the assets folder for html. GWT throws a Java heap exception during compilation.

@mgsx-dev was very kind and found the problem, it is happening during md5 calculation, specifically this line: https://github.com/libgdx/libgdx/blob/665f920902e543856fdd7d496f6ec422affd46d1/backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/PreloaderBundleGenerator.java#L170

Reproduction steps/code

Create a libGDX project and add a huge asset to the assets folder (I tried with a 300MB gltf file with 4k textures) and run ./gradlew html:dist

Version of libGDX and/or relevant dependency

1.10.0 and probably older versions too

Please select the affected platforms

  • Android
  • iOS
  • HTML/GWT
  • Windows
  • Linux
  • macOS

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
MobiDevelopcommented, Apr 20, 2022

I just tried it… I dropped a 6.5GB file into assets and ran a build with no issues (aside from it being exceedingly slow to copy a 6.5GB file multiple times but I wanted to try a ridiculously large file, because why not. I can put up a PR for review, it’s pretty simple.

1reaction
tommyettingercommented, Apr 12, 2022

Ah, OK, that explains a good usage for HTML here. I’ve been very cautious about using large files on GitHub Pages after a few of my repos had to be basically wiped because there was too much storage space used.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Out of Memory Error During GWT compilation - Google Groups
I am using GWT in my application. My system is having 2GB RAM and I have around 2000 Java files to compile. During...
Read more >
GWT 2.5.1 Compile always throws Java Heap Space Error
Whenever I compile GWT 2.5.1 application. by right click on project and doing Run As-> Web Application (GWT Super Dev Mode), it never...
Read more >
FAQ - Troubleshooting - [GWT] -
OutOfMemoryError: Java heap space. When compiling a project in GWT 1.5 or later, you may encounter problems with running out of memory. Compiling...
Read more >
Compile / Unit Test error (java.lang.OutOfMemoryError
[gwt.javac] Consult the following stack trace for details. [gwt.javac] java.lang.OutOfMemoryError: Java heap space [gwt.javac] at com.sun.tools.javac.comp.
Read more >
GWT Compiler Is Running Out of Memory - Ted Vinke's Blog
Add some permgen space, which is used when GWT compiles Java into Javascript. E.g. -XX:MaxPermSize=1024m. 3. Try lowering the number of workers ...
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