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

Maximum call stack size exceeded on tree selection #12171

Closed
martin-fleck-at opened this issue Feb 10, 2023 · 0 comments · Fixed by #12172
Closed

Maximum call stack size exceeded on tree selection #12171

martin-fleck-at opened this issue Feb 10, 2023 · 0 comments · Fixed by #12172
Assignees
Labels
bug bugs found in the application

Comments

@martin-fleck-at
Copy link
Contributor

Bug Description:

For large trees, the depth first iterator causes a Maximum call stack size exceeded during range selection. The main culprit is probably the stack.push(...[]) usage.

Steps to Reproduce:

  1. Have any large enough tree in the tree viewer widget. For me, the limit is hit with about 130k nodes.
  2. Select a node through mouse click and with Shift select another node to trigger a range selection
  3. In the UI nothing visibly happens but in the log you get the following error:
tree-iterator.ts:210 Uncaught RangeError: Maximum call stack size exceeded
    at Object.depthFirst (tree-iterator.ts:210)
    at depthFirst.next (<anonymous>)
    at TreeSelectionState.selectionRange (tree-selection-state.ts:195)
    at TreeSelectionState.selection (tree-selection-state.ts:82)
    at TreeSelectionServiceImpl.transiteTo (tree-selection-impl.ts:86)
    at TreeSelectionServiceImpl.addSelection (tree-selection-impl.ts:77)
    at TreeModelImpl.addSelection (tree-model.ts:436)
    at TreeModelImpl.selectRange (tree-model.ts:452)

Additional Information

  • Operating System: Ubuntu
  • Theia Version: latest master
@martin-fleck-at martin-fleck-at added the bug bugs found in the application label Feb 10, 2023
@martin-fleck-at martin-fleck-at self-assigned this Feb 10, 2023
martin-fleck-at added a commit that referenced this issue Feb 10, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Feb 10, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Feb 13, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Feb 15, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Feb 17, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Feb 17, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Feb 21, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Feb 28, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Apr 20, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Apr 21, 2023
- Provide utility to push in a callstack-safe manner
- Add tests

Fixes #12171
martin-fleck-at added a commit that referenced this issue Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant