engine_web-ifc icon indicating copy to clipboard operation
engine_web-ifc copied to clipboard

Memory access out of bounds

Open pbbr opened this issue 3 years ago • 5 comments

We getting the following error for several different IFC files (usually with a size > 10mb) when we try to convert them on a node.js server with the web-ifc version 0.0.36:

"RuntimeError: memory access out of bounds at wasm://wasm/003b7ec2:wasm-function[232]:0xd4bf at wasm://wasm/003b7ec2:wasm-function[232]:0xdc45 at wasm://wasm/003b7ec2:wasm-function[491]:0x2f219 at wasm://wasm/003b7ec2:wasm-function[675]:0x6f8c7 at wasm://wasm/003b7ec2:wasm-function[1047]:0xca84a ...

We've compile the web assembly with emscripten on the target machine, but that doesn't help. This even happens when FAST_BOOLS is enabled (not on all models, but on some of them). With the version 0.0.34 this didn't happend.

Any ideas why this happend and what we could change to make this work?

Thanks for support!

pbbr avatar Dec 09 '22 14:12 pbbr

Maybe related to https://github.com/IFCjs/web-ifc/issues/209, https://github.com/IFCjs/web-ifc/issues/216 and https://github.com/IFCjs/web-ifc/issues/232

pbbr avatar Dec 12 '22 08:12 pbbr

Hi!

Upon following the code and procedures as discussed in IFC.js Crash Course -> IFC.js -> Hello world WIT, I am encountering the same error when I load my sample ifc file (6.7Mb). It throws RuntimeError: memory access out of bounds:

https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F8c9b032a-ce86-425a-839f-c380d092afe6%2FScreenshot_from_2023-02-02_16-08-31.png?table=block&id=f2cf57d0-80c0-402d-9055-540148972107&spaceId=13e932d3-3d6d-4447-9cba-cf4a60855911&width=2000&userId=d8087bb3-2af0-4301-b682-eb1764e0eaf7&cache=v2

I am sure that the ifc file is not the culprit as I was able to load my ifc inside the sample viewer in notion.

[https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F30af1aee-6172-4b83-a8db-e9bf447f668d%2FScreenshot_from_2023-02-02_16-09-51.png?table=block&id=e26fe529-9418-453d-b948-ac1bb04856cd&spaceId=13e932d3-3d6d-4447-9cba-cf4a60855911&width=2000&userId=d8087bb3-2af0-4301-b682-eb1764e0eaf7&cache=v2](IFC loaded in the sample viewer)

I am using Ubuntu 22.04.1 LTS RAM 16gb 2133 Intel core i3 9100F GPU GTX 1650 Node v16.19.0

zidlier avatar Feb 02 '23 11:02 zidlier

This issue seems to be solved with the latest changes.

pbbr avatar Feb 08 '23 12:02 pbbr

Resolved it by setting USE_FAST_BOOLS to true in applyWebIfcConfig settings

https://ifcjs.github.io/info/docs/Guide/web-ifc-three/api#applywebifcconfig

zidlier avatar Feb 08 '23 14:02 zidlier

通过在 applyWebIfcConfig 设置中将 USE_FAST_BOOLS 设置为 true 来解决这个问题

https://ifcjs.github.io/info/docs/Guide/web-ifc-three/api#applywebifcconfig

这个链接404了

daLeiStrive avatar Dec 04 '24 13:12 daLeiStrive