question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug while expanding nodes with more than 32766 children - v3

See original GitHub issue

Frist of all, thanks for the amazing work put into the lib. It’s very awesome.

Conditions for reproducing:

  • You need to have a node (lets call A) with 32767 children or more (do not know if they need to be direct children, I think not)
  • And you need to have one of more nodes after node A.
  • All my testing was done in latest chrome, using windows 10 and MacOs

I prepared a reproduction of the bug here: https://github.com/sirgallifrey/react-vtree/tree/openning-lots-of-nodes

How to reproduce:

  • Checkout my fork on the branch called: openning-lots-of-nodes
  • run storybook:dev script
  • Go to story called Big List Issue
  • Scroll all the way to the bottom and observe that everything renders properly so far.
  • Scroll back up and collapse the node called Root.2
  • Observe that everything still works as expected.
  • Expand the node called Root.2 and scroll all the way to the bottom
  • Observe that some nodes appear missing, some may be duplicated.
  • From now on, collapsing and expanding Root.2 will not fix the issue.
  • Collapsing and then expanding the node Root will fix the issue end render everything properly, but issue can comeback by expanding Root.2

There is one extra glitch that I’m seeing in this reproduction that I didn’t saw when I first used the lib: If you keep collapsing and expanding Root.2 you will end up with a ghost floating element that will not go away even by collapsing and expanding the parent. But the following workaround prevents that

Workaround:

Since opening the root node fixes the issue, it is possible to use recomputeTree instead of setOpen and always open the root node with every instruction, an example of the workaround can be found on my fork, in the story named: Big List Issue workaround

I didn’t had time yet to try find the bug on the code, but since the issue happens at such specific number of itens it’s probably happening inside the updateExistingTree https://github.com/Lodin/react-vtree/blob/master/src/Tree.tsx#L402

Pictures / videos:

https://user-images.githubusercontent.com/2331645/106302660-881ac800-6259-11eb-8e29-8965973707e7.mov

Screen Shot 2021-01-29 at 17 36 53

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Lodincommented, Apr 30, 2021

Hey, @sirgallifrey. I think I fixed the bug: there was a miscalculation in the array length. Could you please check if the fix/max-args-bug branch works for you?

1reaction
sirgallifreycommented, Mar 22, 2021

Hello @Lodin I merged the new changes on my reproduction branch and the issue is still reproducible https://github.com/sirgallifrey/react-vtree/tree/openning-lots-of-nodes

I’ll give a shot at trying to fix it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while indexing fulltext fields with values larger than ...
When you are trying to index a fulltext field, like attachments with ... original message: bytes can be at most 32766 in length; ......
Read more >
The graph fly out of screen when the child number per node is ...
I find that when the number of children is greater than 5 and expand a node, the whole graph fly out of screen....
Read more >
ORA-29250 to ORA-32799 - Oracle Help Center
Cause: An error occurred while compressing or uncompressing input source. Action: Verify that source data is a valid compressed or uncompressed data set....
Read more >
Fix List for DB2 Version 9.7 for Linux, UNIX and Windows - IBM
APAR Sev. Abstract IT06632 2 INSTANCE TRAPPED AT SQLRH_FREE_CSO WITH SIG#11 IT09175 2 DB2 CRASH AT SQLNGMEMBLOCKLOOKUP IT03500 3 LOW PERFORMANCE OF QUERIES ON ADMSINTABINFO
Read more >
Elasticsearch version 8.2.0 | Elasticsearch Guide [8.5] | Elastic
Fix Stacktraces Taking Memory in ILM Error Step Serialization #84266 ... Avoiding watcher validation errors when a data stream points to more than...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found