Treestyletab: Tree gets scrambled sometimes

Created on 29 Nov 2017  路  7Comments  路  Source: piroor/treestyletab

Short description

Upon restart and reloading previous session, some tabs are assigned to wrong parents.

Steps to reproduce

I cannot figure out reliable steps to reproduce 馃槥
I have some 40 tabs open and I only notice a few days later that a tab totally unrelated to the tree is there, when it is obvious it should have been to some other tree.

Please adivse me how to debug this. I tried to uncompress the .lz4json session file and inspect the stuff assigned to tabs, but to no avail.

Is there an easier way to see what's assigned in each tab, rather than uncompressing the session file ?

Environment

  • Platform (OS): MacOS High Sierra
  • Version of Firefox: 57
  • Version (or revision) of Tree Style Tab: 2.2.11

This is in relation to #1623, I believe, because I started with a session since before FF 57.

Also, I can't seem to find which version of Firefox introduces openerTabId 馃槥 . Do you know it?

I assume that having openerTabId built into Firefox will result in correct behaviour, always. Although I spotted a potential problem: openerTabId "disappears" upon closing the parent tab:

This property is only present if the opener tab still exists.

So If I have

* tabA
   * tabAa
       * tabAb
* tabB

And I close tabAa then tabAb becomes an orphan ?


TL;DR: how can I debug what is the parent of a tab to help debugging messed up tree after Firefox restart ?

help wanted

Most helpful comment

I'm seeing the same thing. After a crash and restart, the parent of each (expanded) tree becomes the last tab (leaf) of the immediately preceding tree.

All 7 comments

I'm seeing the same thing. After a crash and restart, the parent of each (expanded) tree becomes the last tab (leaf) of the immediately preceding tree.

@cipri-tom @WanderingDanny Could you make clear the steps to reproduce? I really need 100%-reproducible condition.

So If I have

  • tabA

    • tabAa



      • tabAb



  • tabB

And I close tabAa then tabAb becomes an orphan ?

If you close the tabAa while TST's sidebar is visible, tabAb will be attached to tabA automatically. But if you close it while TST is not available, Firefox don't do such "auto-repairing relations of tabs". If you restored tabs from a crash and you intentionally unchecked some items in the list of to-be-restored tabs, you were in this situation. However, in general cases, partially-missing tabs won't happen on Firefox's built-in session restoration, like "Restore Previous Session" under the hamburger menu.

BTW, Components.utils.crashIfNotInAutomation() from the browser console (Ctrl-Shift-J, you need to set devtools.chrome.enabled to true) is available to crash Firefox safely. If the problem you saw is appear only after crash recovery, it will useful for narrowing conditions down.

@piroor I can't seem to reproduce with a new profile :( . Maybe it should have quite some tabs open... or a "long" session, with complex opening and closing order. Is there any chance that it is related to having the top tabs hidden ? Because in the new profile I don't hide them.

@cipri-tom Even if you see both top tab bar and TST sidebar, you'll see no difference about their order. I think only the invisible background page is broken. You can inspect the raw DOM tree of background page via about:debugging => Debug.

Hi again,

I think I have come up with a use case, though I still can't reproduce with a new profile.

I had a completely new profile that was growing for like 2-3 weeks. Then, I tried to drag a tab into its own window and TST entered this "loading" state, showing the little animated dot swinging left-right. It never finished. This is reproducible with a clean profile.

To force a reload, I pressed F1 to hide and re-show TST, which recovered from the "loading" state, but now all tree roots were assigned to the tree above them and their first child became the root.

I'm seeing same issue once in a while. Yesterday I quit firefox and powered off my pc. Today all tabs got scrambled. They got shifted for 5 tabs or something, so now everything is a complete mess. There should be history to restore to previous state - would be quickest way to fix this.

PS: I just disabled and enabled addon back, and seems it got it in order automatically. I also noticed that Gesturefy stopped working, but now it also works again (I haven't touched that one)

I close this because outdated.

@cipri-tom The problem looks another topic. If it appears on the latest version of TST, please file it as a new issue.

Was this page helpful?
0 / 5 - 0 ratings