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

TabAPI throws Error when Closing #12392

Closed
tsmaeder opened this issue Apr 11, 2023 · 2 comments · Fixed by #12400
Closed

TabAPI throws Error when Closing #12392

tsmaeder opened this issue Apr 11, 2023 · 2 comments · Fixed by #12400
Labels
bug bugs found in the application vscode issues related to VSCode compatibility

Comments

@tsmaeder
Copy link
Contributor

Bug Description:

I get exceptions in the browser log when closing editor tabs:

rpc-message-encoder.ts:184 Uncaught (in promise) Error: Tab close updated received for index 4 which does not exist
    at TabGroupExt.acceptTabOperation (C:\Users\thomas\code\EclipseSource\theia\packages\plugin-ext\lib\plugin\tabs.js:156:23)
    at TabsExtImpl.$acceptTabOperation (C:\Users\thomas\code\EclipseSource\theia\packages\plugin-ext\lib\plugin\tabs.js:286:27)
    at C:\Users\thomas\code\EclipseSource\theia\packages\plugin-ext\lib\common\proxy-handler.js:91:71
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RpcProtocol.handleRequest (C:\Users\thomas\code\EclipseSource\theia\packages\core\lib\common\message-rpc\rpc-protocol.js:167:28)

Steps to Reproduce:

  1. Open 4 editors
  2. Close the second-to-last (third) tab
  3. Close the last tab
  4. Observe: you get the above exception

From a cursory inspection of the code, it seems that the TabInfo.tabIndex field is not updated upon deletion. So when I delete for the second time, it notifies the deletion with index 3, which doesn't exist.

Additional Information

  • Operating System: Windows Electron
  • Theia Version: master
@tsmaeder tsmaeder added bug bugs found in the application vscode issues related to VSCode compatibility labels Apr 11, 2023
@tsmaeder
Copy link
Contributor Author

Tagging @jonah-iden, because he might know what's up.

@jonah-iden
Copy link
Contributor

oh yeah, that seems like an inconsistency arises between the model in tabs-main and the actual tabs from phosphor. I can probably take a look at it tomorrow. Should be easy to fix

jonah-iden added a commit to jonah-iden/theia that referenced this issue Apr 12, 2023
after deleting and moving a tab

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
jonah-iden added a commit to jonah-iden/theia that referenced this issue Apr 12, 2023
after deleting and moving a tab

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
jonah-iden added a commit to jonah-iden/theia that referenced this issue Apr 20, 2023
after deleting and moving a tab

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
msujew pushed a commit to jonah-iden/theia that referenced this issue Apr 21, 2023
after deleting and moving a tab

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
vince-fugnitto pushed a commit to jonah-iden/theia that referenced this issue Apr 26, 2023
after deleting and moving a tab

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
vince-fugnitto pushed a commit to jonah-iden/theia that referenced this issue Apr 27, 2023
after deleting and moving a tab

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
vince-fugnitto pushed a commit to jonah-iden/theia that referenced this issue May 2, 2023
after deleting and moving a tab

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
vince-fugnitto pushed a commit to jonah-iden/theia that referenced this issue May 8, 2023
after deleting and moving a tab

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
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 vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants