Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Browser can't open HTML5


I've packaged a project in HTML5, and when opening it with Firefox I get this message:

Range Error: invalid array length

The way I understand this, the bundle of assets is too large for Firefox to handle. The size of the assets is 4 GB. Is there any way to get around this problem? Does it make a difference whether you select or deselect the use of a PAK file, or use file compression? If you need to reduce the file size of the assets to make the presentation work with Firefox, what would be the best way to make the file lighter, and what would be the size of a asset file that does work with Firefox?

Product Version: UE 4.17
more ▼

asked Sep 28 '17 at 12:30 PM in Using UE4

avatar image

1 2 4 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

The maximum array length in Firefox is 2GB - 16MB (2130706432 bytes) for asm.js, and 2GB-64KB (2147418112 bytes) for WebAssembly. Allocating these maximum sizes works only for 64-bit browser. If you are running on a 32-bit Firefox browser, you may be able to get to that ~2GB limit if you use the Large-Allocation header hint on the web server: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Large-Allocation. Make sure you set the Total heap memory to less than these amounts.

Chrome seems to have lower limits from my experience, so what works for Firefox, might still be too large for Chrome. In particular, Chrome seems to sometimes AwwSnap crash, rather than throwing an exception, if one attempts to allocate too large an array. Though this might also be operating system specific.

Firefox is looking at lifting its 2GB restriction even further, see https://bugzilla.mozilla.org/show_bug.cgi?id=1392234.

Additionally, the Emscripten compiler project is working on enabling the new ASMFS filesystem to be used for UE4, which will ultimately remove the asset sizes from contributing to this 2GB limit at all.

If you use a PAK file, and use compression, that should get the smallest sizes, I believe. You can measure that by checking the size of the .data file on disk. Compressing the .data file to a .datagz file does not reduce this limit (since PAK compression already has compressed the size).

more ▼

answered Sep 29 '17 at 10:49 AM

avatar image

1.2k 15 4 17

avatar image George_Totoro Jan 17 '19 at 03:37 AM

so, the only way to overcome this error is to delete some content from project before compiling for html5, is that correct?

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question