1

For a reason unknown to me, Arduino IDE 2.0.3 opens two tabs with the same name for this sketch. I'm not able to reproduce how to get into this situation.

Changes in one tab immediately changes the other tab as well.

How can I get rid of the second tab?

Duplicate tab

Things I tried:

  • File / Close (Ctrl+W) closes the whole sketch, i.e. Arduino IDE exists.
  • The usual key combination to close tabs (Ctrl+F4) does not work either.
  • I deleted all %AppData%\Local\Temp\.arduinoIDE-unsaved*.gfv2 folders
  • I deleted all %AppData%\Local\Temp\arduino-sketch-* folders
  • I deleted all %AppData%\Local\Temp\arduino-language-server* folders
  • I deleted all %AppData%\Local\Temp\arduino-ide2-* folders
  • I used Streams to check the INO file for alternate data streams
  • I deleted the folder %UserProfile%\.arduinoIDE

Maybe interesting: when I rename the sketch to HelloWorld2.ino, it opens only one tab. If I rename it back, I have two tabs again.

When I change the preferences to show the files in Sketchbook view, I only see one file: Sketchbook view

The other sketches have been created when trying to reproduce the problem. They are not affected

The tooltip which shows the full file name is identical on both files:

Identical tooltips

The Registry does not contain suspicious information. I found only one occurrence of HelloWorld in

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths
Thomas Weller
  • 851
  • 6
  • 17
  • Can give exact instructions on reproducing this? I downloaded 2.0.3 (though on Linux) and tried creating and opening essentially blank sketches in various ways and didn't observe this problem. – timemage Dec 28 '22 at 14:28
  • @timemage: unfortunately I can't (yet). I have also created a virtual machine and wanted to reproduce it, but it didn't happen. – Thomas Weller Dec 28 '22 at 14:31
  • @jsotola: the content changes in both tabs (seemingly instant) – Thomas Weller Dec 28 '22 at 16:21
  • @jsotola: updated the question: it shows only one file – Thomas Weller Dec 28 '22 at 16:36
  • @timemage: I have recorded a video when this issue occurred. From that video I can see that it started with a duplicate file name called `sketch_dec27a.ino` https://i.stack.imgur.com/IgHxa.png However, the video just shows this right after starting the IDE, nothing done. – Thomas Weller Dec 28 '22 at 16:39
  • @jsotola: the other one has a space in the name. It's a different sketch which is not affected and has no impact one the one without space. I deleted it and updated the screenshot. The problem still persists – Thomas Weller Dec 28 '22 at 16:44
  • search the windows registry for all instances of the text `HelloWorld` if you feel comfortable exploring the registry – jsotola Dec 28 '22 at 16:53
  • For what it's worth I believe you. But, until I can reproduce the problem I don't think I'm going to have much luck finding a solution. The IDE seems to have had a recurring problem with this stemming from different causes some of which have supposedly been fixed. The IDE 2.0.X IDE definitely still has a lot of problems. In fact I just noticed another (unrelated) one trying to reproduce yours. – timemage Dec 28 '22 at 17:04
  • It seems there is a new bug for this issue: https://github.com/arduino/arduino-ide/issues/1791 I can't recall having used libraries yet, though. – Thomas Weller Dec 29 '22 at 16:52

1 Answers1

4

How can I get rid of the second tab?

  • Press F1,
  • Type: View: Reset Workbench Layout into the Command Palette,
  • Press Enter,
  • IDE reloads.

If it does not help, get the layout data from the logs.

  • Open the DevTools with Ctrl/⌘+Alt+I built-in command,
  • Open the Console if it's not opened with Esc,
  • Right-click in the console and Save as...,
  • Share the data with the devs.

For example:

{"version":5,"mainPanel":{"main":{"type":"tab-area","widgets":[{"constructionOptions":{"factoryId":"code-editor-opener","options":{"counter":0,"kind":"navigatable","uri": ...
dankeboy36
  • 80
  • 4