Carnaux / NFT-Marker-Creator

This editor creates NFT markers for ARTOOKIT 5.x

Home Page:https://carnaux.github.io/NFT-Marker-Creator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't create feature/image sets - JavaScript heap out of memory.

TadghW opened this issue · comments

Running into an issue where every time I try to generate an NFT set from an image using the Node.js app, the application functions as normal, generates features for 76 to 0.736 DPI images, before spitting out the following error:

emscripten_realloc_buffer: Attempted to grow heap from 536870912 bytes to 1073741824 bytes, but got error: RangeError: WebAssembly.Memory.grow(): Unable to grow instance memory.

I've run the process with 3GBs of ram with the flag --max-old-space-size=3000, but am unable to allocate it any more memory as --max-old-space-size 4096 throws the error:

<--- Last few GCs --->

[6216:0460C490]       37 ms: Mark-sweep 1.0 (3.0) -> 0.7 (3.3) MB, 1.7 / 0.0 ms  (average mu = 0.912, current mu = 0.912) allocation f
ailure GC in old space requested
[6216:0460C490]       61 ms: Mark-sweep 1.2 (3.3) -> 1.0 (3.3) MB, 2.1 / 0.0 ms  (average mu = 0.913, current mu = 0.914) allocation f
ailure GC in old space requested


<--- JS stacktrace --->

FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory

The image I'm using is attached to this post. I know it's kind of a funny marker, but it's for an experiment for a local historical venue so if we can the marker we'd want to use would likely be entire walls.

Thanks in advance.
testImage

Hi @TadghW thanks to post this issue. Which device do you used for generating the NFT marker? What OS and node version?
If think the image is ok, i see that has a lot of detail, i will try to build with my own desktop machine.

Hello again @kalwalt! Thank you for responding. I'm using Windows 10 Build 2004, and Node.js v14.16.1 on my computer, which has a Ryzen 7 1700 and 16GBs of RAM.

@TadghW the image is wide in pixels, both on width and height, but with a low dpi value (72) that is bad because you will get weird results while tracking. It's recommended at least 200 dpi, optimum 300 dpi. I suggest to you to reduce a bit the dimensions of the image and increasing the dpi in your favourite Image software. I tried with our NFT_Marker_Creator and i had to stop the process it takes 30 minute ONLY to build the 72 dpi stage. I will try to make these modifications and test it again.

@kalwalt any idea what I might be able to do to fix the memory allocation issues I have with Node? I have a lot of compute power available and am happy to spend the time rendering out the full image in 300dpi. My only real problem is the crashing when I try with the aforementioned messages.

Regardless, I'll compress the image, user a higher DPI value and start again. I suspect that may fix it :)

@kalwalt any idea what I might be able to do to fix the memory allocation issues I have with Node? I have a lot of compute power available and am happy to spend the time rendering out the full image in 300dpi. My only real problem is the crashing when I try with the aforementioned messages.

Regardless, I'll compress the image, user a higher DPI value and start again. I suspect that may fix it :)

I would test it again but i'm out of my desktop pc. Whith my old notebook i can not do so much. I highly reccomend to you to try to build it with 300 DPI. A 72 DPI NFT marker is not so useless. Yes, maybe could also fix the issue...