HTML5 - out of memory

My HTML5 project run in Firefox takes about 750MB of browser memory (checked in Task Manager). After changing page to a one that does not contain the embeded UE4 project it takes a while to free the browser’s memory and when I come back to the page containing embeded UE4 project, there are no errors. But, when I refresh the page containing embeded UE4 project, the browser’s memory peaks to about 1500MB and after a while it falls back to 750MB. Sometimes it exceeds 1500MB and then an error occurrs.

FMallocAnsi::Malloc(unsigned long, unsigned int)
FMallocAnsi::Realloc(void*, unsigned long, unsigned int)
FMallocThreadSafeProxy::Realloc(void*, unsigned long, unsigned int)
FMemory::Realloc(void*, unsigned long, unsigned int)
FHeapAllocator::ForAnyElementType::ResizeAllocation(int, int, unsigned long)
__ZN6TArrayIw17FDefaultAllocatorE11CopyToEmptyIwS0_EEvRKS_IT_T0_Ei?
FEmscriptenHttpFileRequest::Process()
int TTypeWrapper<>? TBaseFunctorDelegateInstance?Z()
void TBaseFunctorDelegateInstance(int)
int TBaseDelegate()
FEmscriptenHttpFileRequest::OnError(unsigned int, void*, int)
dynCall_viii

Heap size in project settings is set to , 4096. What else can I do to prevent this from happening? I am pretty sure the project will take up even more memory in the future.

Thank you for any help!

Hey Kosmo,

Does this happen on all web browsers you’ve viewed your game on? When you packaged your project, did you make sure to not include any files that are not currently used in your game? With that being said, did you create your game with the idea in mind that HTML5 is on the same development basis as a mobile device?

Here is some documentation that may be of use to you:

  • [HTML5 Developing][1]
  • [Mobile Game Development][2]

Thanks!

Sharing and Releasing Projects for Unreal Engine | Unreal Engine 5.1 Documentation
[2]: General Mobile Development for Unreal Engine | Unreal Engine 5.1 Documentation

Hey ,

from my experience, HTML5 project works only on Firefox… has it recently changed? The project was created with mobile and HTML5 in mind. As I said it works well, untill I try to load it again before the browser wipes the previous instance from its memory.

HTML5 projects work on FireFox, , Chrome and Chromium. Do you have a link that I can look at where your game is uploaded to?

Thanks!

Hey Kosmo,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you!