Skip to content

Frontend crashes due to infinite loop in Tooltip library #1830

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

Open
DannyDelott opened this issue Mar 20, 2025 · 0 comments
Open

Frontend crashes due to infinite loop in Tooltip library #1830

DannyDelott opened this issue Mar 20, 2025 · 0 comments

Comments

@DannyDelott
Copy link
Contributor

DannyDelott commented Mar 20, 2025

Describe the bug
Floating-UI (formerly Popper.js) is triggering infinite loops and crashing the frontend intermittently.

While profiling re-renders (#1829), we found that having multiple pool rows on the screen (i.e., more than two Reward tooltips) can trigger the crash. It occurs after navigating the UI for some time, likely as an unstable state builds up.

A related issue in Radix UI (built on Floating-UI) was reported but never fixed:
(radix-ui/primitives#2717 (comment))
It includes a reproducible example:
https://codesandbox.io/p/sandbox/maximum-update-depth-exceeded-crash-forked-slxmkz

Refreshing the sandbox browser triggers the following error:

Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but with no dependency array.

Image

Since we were originally using radix-ui, we migrated to a vanilla Floating-UI implementation in #1822. However the crash was still happening.

While building a repro sandbox for the Floating-UI implementation, does not crash. 😵‍💫
https://codesandbox.io/p/sandbox/maximum-update-depth-exceeded-crash-forked-4qx4zq

Next Steps

We need to refine our repro sandbox by incrementally adding structures from our app until the crash is reproducible. This should help pinpoint the underlying cause.

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

No branches or pull requests

1 participant