-
Notifications
You must be signed in to change notification settings - Fork 289
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
Cannot read properties of null (reading 'setRoot') #661
Comments
Thanks for brining the issue to our attention. The NPE seen here comes from the changes made by #657 that I merged a couple of days back, which was (ironically) meant to fix a similar NPE. I'll take a look at the PR, thanks! |
Nvm, this is only partially true. The issue always existed before #657, although it was only seen when |
React runs `componentWillUnmount` prior to resetting refs through ref callbacks. This caused a NPE in our ref callback since it attempted to use `_wheelHandler` which had already gotten cleaned up in `componentWillUnmount`. Fixed with a simple null guard check against _wheelHandler.
I'm closing this off since the issue is resolved, but feel free to comment/reopen if you need any help or have any questions. |
Expected Behavior
Table should not cause exception when being unmounted
Current Behavior
Table sometimes (and I mean sometimes, seems to be a difficult to reproduce race condition) throws exception
Cannot read properties of null (reading 'setRoot')
in FixedDataTable in the_onRef
function, as_wheelHandler
is already null by the time it's called. This is because of componentWillUnmount being called before the div is de-refed.Possible Solution
Check that
this._wheelHandler
isn't nullSteps to Reproduce (for bugs)
I really wish I could. It's been working fine for years in our code and just started blowing up today. I can't even get it to happen consistently on a repo.
Context
It makes our product crash. It's bad.
Your Environment
The text was updated successfully, but these errors were encountered: