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

Memory leak and crash in 3D mode when using roll #5073

Open
ssokol opened this issue Nov 19, 2024 · 4 comments
Open

Memory leak and crash in 3D mode when using roll #5073

ssokol opened this issue Nov 19, 2024 · 4 comments
Labels
need more info Further information is requested

Comments

@ssokol
Copy link

ssokol commented Nov 19, 2024

The new camera roll feature appears to have introduced a memory leak which quickly results in degraded performance and a crashes due to resource exhaustion.

Version and Browser

I've been testing with Version 5.0.0-pre 5 running on Safari on Mac, Chrome on Mac, and also in WkWebView containers within a Swift application on iOS. The speed at which the system becomes unstable and crashes depends on available memory and browser memory limitations.

I've tested with and without terrain and the results appear to be similar or identical. The leak appears to occur when the map is in 3D mode (any pitch outside of 0) when the camera roll value is varied.

Steps to Trigger Behavior

  1. Launch a browser and instrument to monitor memory consumption
  2. Navigate the browser instance to the demo page
  3. Wait, observing the memory consumed by the browser instance

Link to Demonstration

http://demo.falkenavionics.com:5173/rollbug.html?ip=demo.falkenavionics.com

I've also attached an Xcode project that allows you to toggle on the pitch and roll variation independently. If run on actual iOS hardware this quickly and dramatically demonstrates the leak and crash (though it is rather more of a challenge to debug while running in a WkWebView container on a separate device).

Expected Behavior

System runs within the memory limits of the browser and underlying hardware.

Actual Behavior

System quickly runs low on free memory, becomes unstable, and either crashes or is terminated by the supervising system (OS or browser management layer).

WebViewMapDemo.zip

@HarelM
Copy link
Collaborator

HarelM commented Nov 19, 2024

Can you check if

Solves this issue? It is reported here:

You should be able to use patch-package to verify the fix if you can't wait a few days for a new pre-release.

@HarelM HarelM added the need more info Further information is requested label Nov 19, 2024
@ssokol
Copy link
Author

ssokol commented Nov 19, 2024

I'm sure I can, but I do need a bit of a primer on "patch-package" and how to use it.

@HarelM
Copy link
Collaborator

HarelM commented Nov 19, 2024

Super easy, check out their docs.
You take the code from the branch, build it, copy it into node modules folder, run patch package, and add it to prepare script.

@ssokol
Copy link
Author

ssokol commented Nov 19, 2024

Ok, done. Unfortunately, I'm still seeing the memory leak and instability with the patch from 5072 applied.

I believe @ibesora was looking into this and had some ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants