Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: RangeError: Set maximum size exceeded #7

Open
vulevukusej opened this issue Dec 7, 2023 · 7 comments
Open

[Bug]: RangeError: Set maximum size exceeded #7

vulevukusej opened this issue Dec 7, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@vulevukusej
Copy link

What happened?

Loading a file on https://platform.thatopen.com/app and i receive the error below.

Version

latest

What browsers are you seeing the problem on?

Microsoft Edge

Relevant log output

Uncaught (in promise) RangeError: Set maximum size exceeded
    at Set.add (<anonymous>)
    at aG.getAllGeometriesIDs (9249.a39bde93b4db5cf6.js:6:393264)
    at async aG.export (9249.a39bde93b4db5cf6.js:6:392019)

Anything else?

Model has been sent to [email protected]

@vulevukusej vulevukusej added the bug Something isn't working label Dec 7, 2023
@vulevukusej
Copy link
Author

@agviegas email sent. Thanks!

@agviegas
Copy link
Contributor

agviegas commented Dec 7, 2023

File privately shared here.

@beachtom
Copy link

@agviegas file does parse and generate successfully in web-ifc - so I think the bug is in components - so moving it

@beachtom beachtom transferred this issue from ThatOpen/engine_web-ifc Dec 11, 2023
@davidgtl
Copy link

I have encountered this issue too and did some investigation:

  • The issue happens when loading a file, particularly in chrome-based browsers which have a 16 million elements Set limit
  • this caused the export function to fail and never trigger onPropertiesSerialized
  • so the parent Promise in data-converter.js > getModelProperties never gets resolved or at the very least rejected

It is still a relevant issue in the latest 1.3.2

@HoyosJuan Can I just put a try catch around the export code in IfcJsonExporter and do an await this.onPropertiesSerialized.trigger({})?

@agviegas
Copy link
Contributor

Probably a cause for this issue is that we are loading everything in memory at the same time, which is not very scalable. Hopefully with the BIM tiles approach, which is around the corner, this will be solved.

@davidgtl
Copy link

Probably a cause for this issue is that we are loading everything in memory at the same time, which is not very scalable. Hopefully with the BIM tiles approach, which is around the corner, this will be solved.

Chunking the geometry ids across multiple <16M sets would indeed fix this. I'm excited to see what BIM tiles can do!

Until then, a workaround like the try catch I mentioned would be very useful to be able to notify the user that properties couldn't be loaded instead of waiting for them forever.

@HoyosJuan
Copy link
Member

Yes @davidgtl, I see why not adding the try/catch statement as a workaround for now. Will let you know when it's done.

@agviegas agviegas transferred this issue from ThatOpen/engine_components Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants