moo-man / FVTT-DD-Import

Allows Importing Dungeondraft map files into FoundryVTT
MIT License
59 stars 27 forks source link

Import bug: ddimport.js:252 Uncaught TypeError: Cannot read property 'arrayBuffer' of null at ddimport.js:252 #74

Open Merudo opened 3 years ago

Merudo commented 3 years ago

When I try to import a large map, the import stops after a while. If I look into the console, I see the following error:

ddimport.js:252 Uncaught TypeError: Cannot read property 'arrayBuffer' of null at ddimport.js:252

m42e commented 3 years ago

Well that is somehow a known issue. The reliability of the browser canvas to handle large images is not always granted. Sometimes maps are partly missing, sometimes it does not work at all. I currently have no idea to work around that.

stillday commented 2 years ago

image

image i have the same problem with a map.

i get this information at console image

ThePhosphorus commented 1 year ago

I had the same issue and found this thread.

After looking into it, the problem seems to come from the image being too bing and surpassing the limit size for the canvas.

(see https://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element for limit per browser)

the quick fix is to reduce grid ppi (aka scale down the image so it fits inside a 16,384 x 16,384 image for modern browsers.

I think there should be an error specifying that the image is too big though