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

Overlay sometimes freezes; stays off/white background on refresh #5

Closed
resir014 opened this issue Nov 9, 2020 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@resir014
Copy link
Owner

resir014 commented Nov 9, 2020

Some users are reporting the viz could get stuck in a certain position after a while. Refreshing shows a white background, but the viz remains off.

Removing the web source on OBS and re-adding it seems to fix the problem.

@resir014 resir014 added the bug Something isn't working label Nov 9, 2020
@resir014 resir014 changed the title Overlay sometimes freezes; shows white screen on refresh Overlay sometimes freezes; stays off/shows white background on refresh Nov 9, 2020
@resir014 resir014 changed the title Overlay sometimes freezes; stays off/shows white background on refresh Overlay sometimes freezes; stays off/white background on refresh Nov 9, 2020
@resir014
Copy link
Owner Author

resir014 commented Nov 10, 2020

This has been tracked down to a memory leak issue, caused by the way we poll the gamepad data.

Benchmark Results

Original gamepad (from https://github.com/resir014/stream-overlays)

image

Standalone gamepad (TMViz)

image

What we did

  • Dropped the framerate passed onto useInterval() and use the standard 1000ms interval instead. This means the framerate option is now deprecated.
  • Made use of requestAnimationFrame() to update gamepad input visualisation.
  • Rewritten useGamepad() to be settings-agnostic, making use of requestAnimationFrame() mentioned above as well as React Context.

A fix has been attempted in #12 with promising results. Will further dogfood our current solution.

image

@resir014
Copy link
Owner Author

resir014 commented Nov 10, 2020

Update: It seems that Chakra UI is causing the memory leak. I guess this project is a perfect way to stress-test public design systems...

What we did

  • Rewritten overlay section entirely in CSS Modules. Chakra UI is still retained for the overlay customiser.
  • Completely remove polling with useInterval. requestAnimationFrame() has already done the trick.

Update: Fix implemented in #13.

@resir014
Copy link
Owner Author

The fixes mentioned above is confirmed to be working! Closing now.

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

1 participant