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

Fix leaked JNI local reference in GeckoSurfaceTexture #2772

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

MortimerGoro
Copy link
Contributor

I hit a JNI reference overflow when working on exit from WebXR. This happens because exit is not working yet and the ExternalBlitter->cancelFrame() is called every frame, leading to a crash after some seconds.

The leak also happens in WebVR but in a slower pace

@MortimerGoro MortimerGoro changed the title Fix leaked JNI local references in GeckoSurfaceTexture Fix leaked JNI local reference in GeckoSurfaceTexture Feb 10, 2020
@MortimerGoro MortimerGoro self-assigned this Feb 10, 2020
Comment on lines 162 to +163
surface = GeckoSurfaceTexture::Create(aSurfaceHandle);
m.surfaceMap[aSurfaceHandle] = surface;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What condition causes us to have a aSurfaceHandle value with out it being in the m.surfaceMap?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new texture that hasn't been used before or StopPresenting() call which cleared the surfaces

Copy link
Contributor

@bluemarvin bluemarvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@bluemarvin bluemarvin merged commit 42892aa into master Feb 10, 2020
@bluemarvin bluemarvin deleted the surface_leak branch February 10, 2020 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants