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 "dead state tree node" error by creating snapshots of parent region for block calculations #3182

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Sep 13, 2022

I found a relatively reproducible procedure to create the dead state tree node error, and a probable fix for this particular case

  • Go to LGV import form
  • Enter EDEN
  • Select EDEN from the dropdown
  • Hit open

A good portion of the time, this produces the error in #3181

I found that the "parentRegion" attribute in the static/dynamic blocks were not snapshots and were instead proxies for the state tree node, creating this error

Note that this change could mildly slow down the block calculations. Note also that parentRegion is not even used anywhere in our codebase, but have some hypothetical use cases

Fixes #3181

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Sep 13, 2022
@cmdcolin cmdcolin removed the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Sep 13, 2022
@cmdcolin
Copy link
Collaborator Author

an alternative fix could consider removing parentRegion

@cmdcolin cmdcolin added the bug Something isn't working label Sep 13, 2022
@cmdcolin cmdcolin changed the title Ensure static/dynamic blocks create a snapshot of parent region to avoid dead state node error Fix "dead state tree node passed to RPC call" by creating snapshot of parent region for block calculations Sep 13, 2022
@cmdcolin cmdcolin changed the title Fix "dead state tree node passed to RPC call" by creating snapshot of parent region for block calculations Fix "dead state tree node" error by creating snapshots of parent region for block calculations Sep 13, 2022
@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Merging #3182 (9a470f2) into main (c8c79c4) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3182      +/-   ##
==========================================
+ Coverage   59.49%   59.52%   +0.02%     
==========================================
  Files         671      671              
  Lines       28644    28646       +2     
  Branches     6934     6936       +2     
==========================================
+ Hits        17043    17052       +9     
+ Misses      11279    11272       -7     
  Partials      322      322              
Impacted Files Coverage Δ
packages/core/util/calculateDynamicBlocks.ts 96.36% <100.00%> (+0.06%) ⬆️
packages/core/util/calculateStaticBlocks.ts 100.00% <100.00%> (ø)
products/jbrowse-web/src/util.ts 48.33% <0.00%> (ø)
packages/core/util/layouts/GranularRectLayout.ts 87.28% <0.00%> (+0.42%) ⬆️
...FeatureRenderer/components/ProcessedTranscript.tsx 88.73% <0.00%> (+1.40%) ⬆️
...gins/svg/src/SvgFeatureRenderer/components/util.ts 95.91% <0.00%> (+4.08%) ⬆️
...src/SvgFeatureRenderer/components/FeatureLabel.tsx 86.11% <0.00%> (+5.55%) ⬆️
...svg/src/SvgFeatureRenderer/components/Segments.tsx 92.85% <0.00%> (+7.14%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cmdcolin
Copy link
Collaborator Author

maybe can merge for now

@cmdcolin cmdcolin merged commit 563543e into main Sep 14, 2022
@cmdcolin cmdcolin deleted the snapshot_parent_region_dead_state_tree_node branch September 14, 2022 17:53
cmdcolin added a commit that referenced this pull request Sep 14, 2022
…on for block calculations (#3182)

Ensure parentRegion gets a snapshot
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

Successfully merging this pull request may close these issues.

"Dead state tree node passed to RPC call"
1 participant