2.0 Beta RC9 - duplicate tabs

Using RC9. Project has multiple tabs. Out of the blue, IDE is now showing DUPLICATES. For example, the tab titles as well as the code within the tab are repeated. IDE shows tab1, tab2, tab3, then repeats: tab1, tab2, tab3.

If I make a change to the code in a tab I can save it, either immediately or when I compile. The tab content of the other duplicate is not changed. If not careful, I can lose the changes I just made if I go to the wrong tab.

I never experienced this with previous beta rc versions; nor did it happen using any version 1.x of the IDE.

Sorry - I meant RC8

Hi @davycastle. Thanks for your report.

There have been multiple reports of this issue:

The developers made fixes for them:

After those fixes, I have no longer been able to reproduce the issues and we didn't receive any other reports of such issues. However, all those fixes are in the Arduino IDE 2.0.0-rc8 version you are using.

Does this occur even if you open a new sketch via File > New, or does it only occur with specific sketches?

The posts above mention that there was a fix delivered a few months ago, but I'm here to say that I have experienced it myself for the first time today, on a fresh Windows 10 install with an (obviously fresh) Arduino IDE 2.0.3, so the problem is far from being fixed :frowning: No matter what I do, I get duplicated tabs on "example sketches" or my own, either saved on the disk or newly created sketches on the fly. It really must be fixed, cause changes in one tab do NOT get ported to the other, duplicate tab, so you'll easily lose your changes if you don't always use the same tab.

Make Sure there are NO SPACES in sketch directory and file. I renamed mine and problem solved no duplicate tabs

Hi @otringal. It seems there may have been a regression since the time of that fix. The Arduino IDE developers are tracking the new incarnation of this bug here:

If you have a GitHub account, you can subscribe to that issue to get notifications of any new developments related to this subject.

Thanks for sharing your observation @FlyingCanuck! I did some experiments with sketches containing spaces in directory and file names and was not able to reproduce the fault. So unfortunately it seems the bug is not so straightforward as a universal incompatibility with spaces in sketch paths.

An alternative explanation for this result is that Arduino IDE stores data about the UI state associated with a given sketch project separately from the sketch files. That data is keyed to the sketch path. So if the bad duplicate tabs state is stored for the sketch at one path, when you move the sketch, you also disassociate it from that previous data and the IDE instead creates a new data entry for the project at that new location.

If my hypothesis is correct, we would expect the duplicate tabs to go away even if you renamed it to some name that still contained spaces as it is the renaming alone that restores the sketch to the correct state.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.