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 lost context #3824

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Feb 28, 2024

Changes

@haslinghuis haslinghuis added this to the 10.10.0 milestone Feb 28, 2024
@haslinghuis haslinghuis self-assigned this Feb 28, 2024

This comment has been minimized.

This comment has been minimized.

@nerdCopter

This comment was marked as outdated.

@haslinghuis
Copy link
Member Author

Self - healing :)

Removed the class usage of Model in b6e36ac - as configurator was stuck on the [setup] tab when context was lost. Switching tab now seems to restore context as before.

@nerdCopter

This comment was marked as off-topic.

@haslinghuis haslinghuis marked this pull request as ready for review February 29, 2024 15:47
@nerdCopter

This comment was marked as outdated.

@haslinghuis
Copy link
Member Author

haslinghuis commented Feb 29, 2024

This comment has been minimized.

@haslinghuis haslinghuis marked this pull request as draft February 29, 2024 17:02
@nerdCopter

This comment was marked as outdated.

This comment has been minimized.

@haslinghuis
Copy link
Member Author

haslinghuis commented Feb 29, 2024

Found that after nulling the renderer object it was still trying to rotate on it. Mitigated and testing now.

CONTEXT_LOST_WEBGL after a hour. Switching tabs restores the rendering.

image

https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context

@haslinghuis haslinghuis marked this pull request as ready for review February 29, 2024 18:21
@HThuren HThuren self-requested a review February 29, 2024 19:27
Copy link
Member

@HThuren HThuren left a comment

Choose a reason for hiding this comment

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

I can't get any errors, and seems well done

@nerdCopter
Copy link
Member

  • i left 2813a543 running for over an hour on 2 FC/PC's. Xubuntu, no issue. Debian, blank screen similar to comment Fix lost context #3824 (comment) but without graphical grid background.

  • awaiting new commits.

This comment has been minimized.

@haslinghuis
Copy link
Member Author

Think adding event listeners to restore context would be over engineering here as switching tabs will restore context as overruns are halted now.

https://threejs.org/docs/#api/en/renderers/WebGLRenderer
https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context

@HThuren HThuren self-requested a review February 29, 2024 19:58
@nerdCopter
Copy link
Member

  • 0f1dff74 no issues seen after 50 minutes, 2 FC/ 2 PC's.
  • may need extended testing and testing other OS.

@haslinghuis
Copy link
Member Author

No issues with HP Elite 840 Pro (Intel I5-4200U with16GB SODIMM and Samsung SSD 840 Pro 256GB) using MS Windows 10 Pro.

@haslinghuis
Copy link
Member Author

haslinghuis commented Mar 1, 2024

Tested 90 minutes without issue. Only will remove the CSS change as the preview is too big for 1600x900

EDIT: Also rebased on master

Copy link

sonarcloud bot commented Mar 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

github-actions bot commented Mar 1, 2024

Do you want to test this code? Here you have an automated build:
Betaflight-Configurator-Android
Betaflight-Configurator-Linux
Betaflight-Configurator-Windows
Betaflight-Configurator-macOS
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

@haslinghuis haslinghuis merged commit 4dc3fba into betaflight:master Mar 1, 2024
8 checks passed
@haslinghuis haslinghuis deleted the fix-lost-context branch March 1, 2024 14:27
chmelevskij pushed a commit to chmelevskij/betaflight-configurator that referenced this pull request Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: COMPLETED
Development

Successfully merging this pull request may close these issues.

WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost
3 participants