engine_components icon indicating copy to clipboard operation
engine_components copied to clipboard

Complete Browser Crash on platform.thatopen.com

Open NiklasPor opened this issue 1 year ago • 8 comments

Describe the bug 📝

When opening specific models, the whole Chrome browser crashes (all tabs are closed). If I enable verbose logging, there's nothing valuable to debug.

To be honest I'm not sure if this is an OBC or web-ifc issue. I'm at least experiencing it on platform.thatopen.com and also on my local IFC viewer built with OBC.

Also it's quite critical because all progress in every tab is lost. The crash sometimes only comes after minutes, so might be doing something completely different by that time.

Reproduction ▶️

https://platform.thatopen.com/app

Steps to reproduce 🔢

  1. Go to https://platform.thatopen.com/app
  2. Open the attached model
  3. Wait for 10s to 8min and the browser completely crashes

I can only reproduce this on MacOS and only with a few models, which are exported from Revit to IFC into Desite and then back to IFC.

Download crash-model.ifc

System Info 💻

System:
    OS: macOS 14.1
    CPU: (14) arm64 Apple M3 Max
    Memory: 205.73 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/Library/pnpm/node
    npm: 10.2.3 - ~/Library/pnpm/npm
    pnpm: 8.12.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 120.0.6099.199
    Safari: 17.1
  npmPackages:
    openbim-components: 1.2.0 => 1.2.0

Used Package Manager 📦

pnpm

Error Trace/Logs 📃

Attached chrome debug log does not show anything to worry about
[29790:259:0103/201406.416530:WARNING:chrome_main_delegate.cc(667)] This is Chrome version 120.0.6099.129 (not a warning)
[29790:259:0103/201406.498783:VERBOSE1:statistics_recorder.cc(647)] Collections of all histograms
Histogram: Chrome.ProcessSingleton.NotifyResult recorded 1 samples, mean = 1.0 (flags = 0x41)
0  O                                                                         (0 = 0.0%)
1  -O                                                                        (1 = 100.0%) {0.0%}
2  ... 

Histogram: Chrome.ProcessSingleton.TimeToNotify recorded 1 samples, mean = 9.0 (flags = 0x41)
0  -O                                                                        (1 = 100.0%)
10 ... 

Histogram: UMA.PersistentAllocator.BrowserMetrics.Errors recorded 0 samples (flags = 0x41)
0 ... 

Histogram: UMA.PersistentAllocator.BrowserMetrics.UsedPct recorded 0 samples (flags = 0x41)
0 ... 

Histogram: UMA.PersistentHistograms.InitResult recorded 1 samples, mean = 2.0 (flags = 0x41)
0  ... 
2  -O                                                                        (1 = 100.0%) {0.0%}
3  ... 

Validations ✅

  • [X] Read the docs.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • [X] Check that this is a concrete bug. For Q&A join our Community.
  • [X] The provided reproduction is a minimal reproducible example of the bug.

NiklasPor avatar Jan 07 '24 19:01 NiklasPor

Hey @NiklasPor!

Just to let you know I have tested the browser crash, and it didn't in my case. I have opened your model in both the platform app and a local app and in neither case the browser crashed. I let the tab opened for like 2 hours (in fact, I forget it at one moment). The most obvious different thing is that I'm on Windows, not Mac. I'm not able to test it on Mac, are you able to test it on Windows?

HoyosJuan avatar Jan 09 '24 23:01 HoyosJuan

We checked it on windows and can only replicate it on MacOS.

NiklasPor avatar Jan 10 '24 06:01 NiklasPor

Well, I can't access a Mac to test it, so it's pretty hard to debug for me. Let's hope some other person help us with this 🙏

HoyosJuan avatar Jan 10 '24 19:01 HoyosJuan

No worries, it largely seems to appear after I had worked for a longer time, so maybe some memory leak. Nearly all of our users are also on Windows, so I'm not worried, just wanted to document so that we can get it fixed at some point 😆

NiklasPor avatar Jan 10 '24 19:01 NiklasPor

https://github.com/IFCjs/web-ifc/releases/tag/0.0.49 includes "fixes a memory leak" – I'll check if my chrome is still crashing on macos 👀

NiklasPor avatar Jan 20 '24 19:01 NiklasPor

The 0.0.49 memory-leak fix does not seem to affect the crashing behaviour, but I also tested in Firefox and got no crashes there ever (while chrome crashes mostly in minutes) 😁

NiklasPor avatar Jan 21 '24 09:01 NiklasPor

Hey Niklas!

Knowing it doesn't crashes on Windows, and in MacOS only seems to crash in Chrome, I did a quick search on Google and it seems that many people report Chrome crashes on Mac.

Would it be something related to the MacOS version of Chrome?

HoyosJuan avatar Jan 23 '24 19:01 HoyosJuan

I really don't know what it is (this is also the only page which crashes my browser) and I'm working with chrome about 9+ hours per day 😁

So I sure think that the bug is exclusive Chrome on MacOS (probably also only on the ARM macs?). No idea how to validate and fix this – might even be a bug in Chrome and not in OB components 👀

NiklasPor avatar Jan 23 '24 19:01 NiklasPor

This is a bit hard for us to reproduce, so I'm closing this for now. We have made a huge update to the libraries lately, so hopefully that has solved the issue. Let us know otherwise!

agviegas avatar Jun 20 '24 19:06 agviegas