Subject: FVWM: multiples fvwmtabs and keeping track of position

From: xavier <[email-masked]>
Date: Wed, 4 Feb 2004 15:27:42 -0500

fvwmtabs seems to have trouble to keep track of its windows...

i have multiples desktops (10*7*4),
and it seems to keep track of only the position in the plan...,
not in the Desk...

extract of /tmp/.fvwmtabs.state :

createNewTabber();
$fvwm->send("Move 1875p 195p", $tabWin{1}{selfId});
addTab(1, 402653201);
addTab(1, 408944657);
showTab(1, 1);

the fvwmtabs window appears at the right position, but always in the current desk
instead of the desk it was before restarting fvwm

when using multiple fvwmtabs,
it appears that fvwmtabs is not able to restore them all, :

first restart :

**** .xsession-errors ********

FvwmTabs: Saving state to /tmp/.fvwmtabs.state
FvwmTabs: Got ON_EXIT event.
FvwmTabs: Couldn't create D&D icon from /usr/share/icons/mini/mini-happy.xpm
FvwmTabs: Reading state from /tmp/.fvwmtabs.state
_cdim: --- not moved 0x081e0ad8 'FvwmTabs [1]'
_cdim: --- not moved 0x081c9aa0 'FvwmTabs [2]'
Module FvwmTabs started with: X11::Protocol 0.52, Tk 800.024.
_cdim: --- not moved 0x081cd390 'FvwmTabs [3]'

*** '/tmp/.fvwmtabs.state' has been created ***

*** /tmp/.fvwmtabs.state ***
createNewTabber();
$fvwm->send("Move 72p 1024p", $tabWin{0}{selfId});
createNewTabber();
$fvwm->send("Move 54p 167p", $tabWin{1}{selfId});
addTab(1, 402653201);
addTab(1, 408944657);
showTab(1, 1);
createNewTabber();
$fvwm->send("Move 27p 543p", $tabWin{2}{selfId});
addTab(2, 436207633);
addTab(2, 438304785);
showTab(2, 1);
createNewTabber();
$fvwm->send("Move 12p 16p", $tabWin{3}{selfId});
addTab(3, 455082001);
addTab(3, 448790545);
showTab(3, 1);

*** '/tmp/.fvwmtabs.state' has been deleted ***

**** .xsession-errors ********

second restart : 

FvwmTabs: Saving state to /tmp/.fvwmtabs.state
FvwmTabs: Got ON_EXIT event.
FvwmTabs: Protocol error: bad 8 (Match); Sequence Number 158
 Opcode (42, 0) = SetInputFocus
Use of uninitialized value in unpack at /usr/share/perl5/X11/Protocol.pm line 859.
'x' outside of string in unpack at /usr/share/perl5/X11/Protocol.pm line 859.
s 21272/30270 21272/30270, g 21277/30275 21277/30275: --- not detected 0x081dd8b0 'natch'
FvwmTabs: Couldn't create D&D icon from /usr/share/icons/mini/mini-happy.xpm
FvwmTabs: Reading state from /tmp/.fvwmtabs.state
_cdim: --- not moved 0x081ddbd8 'FvwmTabs [1]'
FvwmTabs: Window doesn't exist.
FvwmTabs: Window doesn't exist.
FvwmTabs: Window doesn't exist.
FvwmTabs: Window doesn't exist.
Module FvwmTabs started with: X11::Protocol 0.52, Tk 800.024.

*** '/tmp/.fvwmtabs.state' has been created ***

*** /tmp/.fvwmtabs.state ***
createNewTabber();
$fvwm->send("Move 72p 1024p", $tabWin{0}{selfId});
createNewTabber();
$fvwm->send("Move 15p 388p", $tabWin{1}{selfId});
addTab(1, 402653201);
addTab(1, 408944657);
showTab(1, 1);
createNewTabber();
$fvwm->send("Move 22p 648p", $tabWin{2}{selfId});
addTab(2, 436207633);
addTab(2, 438304785);
showTab(2, 1);
createNewTabber();
$fvwm->send("Move 12p 16p", $tabWin{3}{selfId});
addTab(3, 455082001);
addTab(3, 448790545);
showTab(3, 1);

*** '/tmp/.fvwmtabs.state' has been deleted ***

4 windows disappeared !

i believe they are still running on my machine.

i'm using fvwm 2.5.9-0.20031207
fvwmtabs  2.6
ii  perl           5.8.2-2        Larry Wall's Practical Extraction and Report
ii  perl-tk        800.024-1.1    Perl module providing the Tk graphics librar

any clues what's wrong ?

thanks

-- 
xavier
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Scott Smedley <[email-masked]>
Date: Thu, 5 Feb 2004 10:51:31 +1100

Hi Xavier,

: the fvwmtabs window appears at the right position, but always in the current
: desk instead of the desk it was before restarting fvwm

That's highly possible. I don't think I've ever tested FvwmTabs with
multiple desktops. FvwmTabs just needs to record the desk it's on & then
utilise 'MoveToDesk' when it restarts - a trivial modification I think.
I'll check it out this w/end.

: 4 windows disappeared !

This is obviously a different problem. I noticed that FvwmTabs spat
out these lines during the restart:

: FvwmTabs: Window doesn't exist.
: FvwmTabs: Window doesn't exist.
: FvwmTabs: Window doesn't exist.
: FvwmTabs: Window doesn't exist.

Just before a restart, FvwmTabs records all the windows that it's
holding & saves them to the state file. Upon restart it tries to
re-swallow these windows - if you get the above error message it means
that FvwmTabs couldn't find that window after the restart.

: i believe they are still running on my machine.

Can you confirm this? If FvwmTabs doesn't swallow them, & this is a
legitimate bug, the 4 windows should still be floating around somewhere.

There could be any number of reasons why the window was destroyed during
the restart. What app(s) did these windows belong to?

SCoTT. :)

---

From: xavier <[email-masked]>
Date: Wed, 4 Feb 2004 19:34:31 -0500

On Thu, Feb 05, 2004 at 10:51:31AM +1100, Scott Smedley wrote:
|Hi Xavier,
|
|: the fvwmtabs window appears at the right position, but always in the current
|: desk instead of the desk it was before restarting fvwm
|
|That's highly possible. I don't think I've ever tested FvwmTabs with
|multiple desktops. FvwmTabs just needs to record the desk it's on & then
|utilise 'MoveToDesk' when it restarts - a trivial modification I think.
|I'll check it out this w/end.

Thanks !

|
|: 4 windows disappeared !
|
|This is obviously a different problem. I noticed that FvwmTabs spat
|out these lines during the restart:
|
|: FvwmTabs: Window doesn't exist.
|: FvwmTabs: Window doesn't exist.
|: FvwmTabs: Window doesn't exist.
|: FvwmTabs: Window doesn't exist.
|
|Just before a restart, FvwmTabs records all the windows that it's
|holding & saves them to the state file. Upon restart it tries to
|re-swallow these windows - if you get the above error message it means
|that FvwmTabs couldn't find that window after the restart.
|
|: i believe they are still running on my machine.
|
|Can you confirm this? If FvwmTabs doesn't swallow them, & this is a
|legitimate bug, the 4 windows should still be floating around somewhere.

yes, my tests shows that they are still somewhere, unaccessible.

|
|There could be any number of reasons why the window was destroyed during
|the restart. What app(s) did these windows belong to?

xterms, freshly opened.

if there is only one fvwmtabs, i can restart without losing xterms in it.

(btw, when a window is swallowed, i don't see it's name anymore in the WindowList....)

here is my test :

2 Fvwmtabs, with 2 xterms insides :

(pstree -a output)
      |               |   |-xterm -sl 5000 -bg white 
      |               |   |   `-zsh 
      |               |   |       `-xtail /tmp/test1 
      |               |   |-xterm -sl 5000 -bg white 
      |               |   |   `-zsh 
      |               |   |       `-xtail /tmp/test2 
      |               |   |-xterm -sl 5000 -bg white 
      |               |   |   `-zsh 
      |               |   |       `-xtail /tmp/test4 
      |               |   `-xterm -sl 5000 -bg white 
      |               |       `-zsh 
      |               |           `-xtail /tmp/test3 

xsession-errors :
1rst restart : 

FvwmTabs: Got ON_EXIT event.
FvwmTabs: Couldn't create D&D icon from /usr/share/icons/mini/mini-happy.xpm
FvwmTabs: Reading state from /tmp/.fvwmtabs.state
_cdim: --- not moved 0x08169828 'FvwmTabs [0]'
Module FvwmTabs started with: X11::Protocol 0.52, Tk 800.024.
_cdim: --- not moved 0x0815e7d0 'FvwmTabs [1]'

### 2nd

FvwmTabs: Saving state to /tmp/.fvwmtabs.state
FvwmTabs: Got ON_EXIT event.
s -14824/ 43 -15449/-257, g -14819/ 48 -15444/-252: --- not detected 0x0815e750 
'test2'
s -12156/221 -12781/-79, g -12151/226 -12776/-74: --- not detected 0x0816a178 't
est1'
FvwmTabs: Couldn't create D&D icon from /usr/share/icons/mini/mini-happy.xpm
FvwmTabs: Reading state from /tmp/.fvwmtabs.state
_cdim: --- not moved 0x0816aa70 'FvwmTabs [0]'
Module FvwmTabs started with: X11::Protocol 0.52, Tk 800.024.
_cdim: --- not moved 0x0815e750 'FvwmTabs [1]'

######### 3

FvwmTabs: Saving state to /tmp/.fvwmtabs.state
FvwmTabs: Got ON_EXIT event.
s -12156/221 -12781/-79, g -12151/226 -12776/-74: --- not detected 0x08169f88 'test1'
FvwmTabs: Couldn't create D&D icon from /usr/share/icons/mini/mini-happy.xpm
FvwmTabs: Reading state from /tmp/.fvwmtabs.state
_cdim: --- not moved 0x0816a2b0 'FvwmTabs [0]'
Module FvwmTabs started with: X11::Protocol 0.52, Tk 800.024.
_cdim: --- not moved 0x08164a68 'FvwmTabs [1]'

######## 4

FvwmTabs: Saving state to /tmp/.fvwmtabs.state
FvwmTabs: Got ON_EXIT event.
FvwmTabs: Couldn't create D&D icon from /usr/share/icons/mini/mini-happy.xpm
FvwmTabs: Reading state from /tmp/.fvwmtabs.state
_cdim: --- not moved 0x0816b100 'FvwmTabs [0]'
Module FvwmTabs started with: X11::Protocol 0.52, Tk 800.024.
_cdim: --- not moved 0x081603c8 'FvwmTabs [1]'

###########  5

FvwmTabs: Saving state to /tmp/.fvwmtabs.state
FvwmTabs: Got ON_EXIT event.
s -10220/287 -10845/-224, g -10215/292 -10840/-219: --- not detected 0x081696f0 'test3'
s -19934/ 53 -20559/-247, g -19929/ 58 -20554/-242: --- not detected 0x0815eba0 'test2'
s -14711/226 -15336/-74, g -14706/231 -15331/-69: --- not detected 0x08169f38 'test1'
FvwmTabs: Couldn't create D&D icon from /usr/share/icons/mini/mini-happy.xpm
FvwmTabs: Reading state from /tmp/.fvwmtabs.state
_cdim: --- not moved 0x0816a3f0 'FvwmTabs [0]'
Module FvwmTabs started with: X11::Protocol 0.52, Tk 800.024.
_cdim: --- not moved 0x0815eba0 'FvwmTabs [1]'

##############  6

FvwmTabs: Saving state to /tmp/.fvwmtabs.state
FvwmTabs: Got ON_EXIT event.
s -10220/287 -10845/-224, g -10215/292 -10840/-219: --- not detected 0x08169308 'test3'
s -19934/ 53 -20559/-247, g -19929/ 58 -20554/-242: --- not detected 0x0815e7b8 'test2'
s -14711/226 -15336/-74, g -14706/231 -15331/-69: --- not detected 0x08169b50 'test1'
FvwmTabs: Couldn't create D&D icon from /usr/share/icons/mini/mini-happy.xpm
FvwmTabs: Reading state from /tmp/.fvwmtabs.state
_cdim: --- not moved 0x0815da38 'FvwmTabs [0]'
Module FvwmTabs started with: X11::Protocol 0.52, Tk 800.024.
_cdim: --- not moved 0x0815e7b8 'FvwmTabs [1]'

################# 7

at the 7 restart, the 4 windows disapeared (strangely, 
there is only 2 lines "Window doesn't exist" in the xsession error.
it is faster to get this when you have more fvwmtabs opened.
(say, 3, 4)

i can still list the process by pstree :

      |               |   |-xterm -sl 5000 -bg white
      |               |   |   `-zsh 
      |               |   |       `-xtail /tmp/test1 
      |               |   |-xterm -sl 5000 -bg white
      |               |   |   `-zsh 
      |               |   |       `-xtail /tmp/test2 
--
      |               |   |-xterm -sl 5000 -bg white
      |               |   |   `-zsh 
      |               |   |       `-xtail /tmp/test4 
      |               |   `-xterm -sl 5000 -bg white
      |               |       `-zsh 
      |               |           `-xtail /tmp/test3 

so they are somewhere, but not on my display, neither on the 
windowlist. so i can't get them back. i don't know where they are.
(very frustrating... :-/ )

FvwmTabs: Saving state to /tmp/.fvwmtabs.state
FvwmTabs: Protocol error: bad 3 (Window); Sequence Number 70
 Opcode (40, 0) = TranslateCoordinates
 Bad resource 60818863 (0x3a005af)
Use of uninitialized value in unpack at /usr/share/perl5/X11/Protocol.pm line 1106.
'x' outside of string in unpack at /usr/share/perl5/X11/Protocol.pm line 1106.
        (in cleanup) Can't call method "name" on an undefined value at /usr/lib/fvwm/2.5.9/FvwmTabs line 569 during global destruction.
FvwmTabs: Couldn't create D&D icon from /usr/share/icons/mini/mini-happy.xpm
FvwmTabs: Reading state from /tmp/.fvwmtabs.state
FvwmTabs: Window doesn't exist.
FvwmTabs: Window doesn't exist.
Module FvwmTabs started with: X11::Protocol 0.52, Tk 800.024.

################## 8

# nothing left : 

######################## now the 8 /tmp/.fvwmtabs.state
*** '/tmp/.fvwmtabs.state' has been created ***

2

*** /tmp/.fvwmtabs.state ***
createNewTabber();
$fvwm->send("Move 708p 99p", $tabWin{0}{selfId});
addTab(0, 31457297);
addTab(0, 398458897);
showTab(0, 1);
createNewTabber();
$fvwm->send("Move 663p 375p", $tabWin{1}{selfId});
addTab(1, 467664913);
addTab(1, 463470609);
showTab(1, 1);

3

*** /tmp/.fvwmtabs.state ***
createNewTabber();
$fvwm->send("Move 708p 99p", $tabWin{0}{selfId});
addTab(0, 31457297);
addTab(0, 398458897);
showTab(0, 1);
createNewTabber();
$fvwm->send("Move 663p 375p", $tabWin{1}{selfId});
addTab(1, 467664913);
addTab(1, 463470609);
showTab(1, 1);

4

*** /tmp/.fvwmtabs.state ***
createNewTabber();
$fvwm->send("Move 708p 99p", $tabWin{0}{selfId});
addTab(0, 31457297);
addTab(0, 398458897);
showTab(0, 1);
createNewTabber();
$fvwm->send("Move 663p 375p", $tabWin{1}{selfId});
addTab(1, 467664913);
addTab(1, 463470609);
showTab(1, 1);

5

*** /tmp/.fvwmtabs.state ***
createNewTabber();
$fvwm->send("Move 708p 99p", $tabWin{0}{selfId});
addTab(0, 31457297);
addTab(0, 398458897);
showTab(0, 1);
createNewTabber();
$fvwm->send("Move 663p 375p", $tabWin{1}{selfId});
addTab(1, 467664913);
addTab(1, 463470609);
showTab(1, 1);

6

*** /tmp/.fvwmtabs.state ***
createNewTabber();
$fvwm->send("Move 708p 99p", $tabWin{0}{selfId});
addTab(0, 31457297);
addTab(0, 398458897);
showTab(0, 1);
createNewTabber();
$fvwm->send("Move 663p 375p", $tabWin{1}{selfId});
addTab(1, 467664913);
addTab(1, 463470609);
showTab(1, 1);

7

*** /tmp/.fvwmtabs.state ***
createNewTabber();
$fvwm->send("Move 708p 99p", $tabWin{0}{selfId});
addTab(0, 31457297);
addTab(0, 398458897);
showTab(0, 1);
createNewTabber();
$fvwm->send("Move 663p 375p", $tabWin{1}{selfId});
addTab(1, 467664913);
addTab(1, 463470609);
showTab(1, 1);

8

*** /tmp/.fvwmtabs.state ***
createNewTabber();
$fvwm->send("Move 708p 99p", $tabWin{0}{selfId});
createNewTabber();
$fvwm->send("Move 622p 0p", $tabWin{1}{selfId});

thanks !

---

From: Scott Smedley <[email-masked]>
Date: Thu, 5 Feb 2004 16:39:30 +1100

Hi Xavier,

: (btw, when a window is swallowed, i don't see it's name anymore in the WindowList....)

Yup, in essence it's not really a toplevel window when it gets swallowed
by FvwmTabs (it gets reparented to FvwmTabs instead of the root window).

I can see it would be nice to be able to (optionally) have swallowed
windows appear in the windowlist but I don't think this is possible.
[If anyone knows a way I'll be happy to code it up.]

: (pstree -a output)
:       |               |   |-xterm -sl 5000 -bg white 
:       |               |   |   `-zsh 
:       |               |   |       `-xtail /tmp/test1 

Do you still get the problem if you're not running xtails?
ie. just a shell in an xterm.

I love zsh by the way. :)

: s -10220/287 -10845/-224, g -10215/292 -10840/-219: --- not detected 0x081696f0 'test3'
: s -19934/ 53 -20559/-247, g -19929/ 58 -20554/-242: --- not detected 0x0815eba0 'test2'
: s -14711/226 -15336/-74, g -14706/231 -15331/-69: --- not detected 0x08169f38 'test1'

These messages are output by Fvwm, not FvwmTabs. I don't know what they
mean. They're making me suspicious.

: FvwmTabs: Protocol error: bad 3 (Window); Sequence Number 70
:  Opcode (40, 0) = TranslateCoordinates
:  Bad resource 60818863 (0x3a005af)

This is suspicious too. But it's an FvwmTabs message. FvwmTabs is trying
to determine the position of a window but the window doesn't exist!

SCoTT. :)

---

From: xavier <[email-masked]>
Date: Thu, 5 Feb 2004 10:43:18 -0500

On Thu, Feb 05, 2004 at 04:39:30PM +1100, Scott Smedley wrote:
|Hi Xavier,
|
|: (btw, when a window is swallowed, i don't see it's name anymore in the WindowList....)
|
|Yup, in essence it's not really a toplevel window when it gets swallowed
|by FvwmTabs (it gets reparented to FvwmTabs instead of the root window).
|
|I can see it would be nice to be able to (optionally) have swallowed
|windows appear in the windowlist but I don't think this is possible.
|[If anyone knows a way I'll be happy to code it up.]

would be nice, i might be able to get them back...

|
|: (pstree -a output)
|:       |               |   |-xterm -sl 5000 -bg white 
|:       |               |   |   `-zsh 
|:       |               |   |       `-xtail /tmp/test1 
|
|Do you still get the problem if you're not running xtails?
|ie. just a shell in an xterm.

yes ; i ran xtail to be able to track the xterm.
(ps aux|grep xterm |wc -l = 197)

it works too with perl or anything else.

|I love zsh by the way. :)

<lame mode> do you mean there is others shells ? </lame>

|
|: s -10220/287 -10845/-224, g -10215/292 -10840/-219: --- not detected 0x081696f0 'test3'
|: s -19934/ 53 -20559/-247, g -19929/ 58 -20554/-242: --- not detected 0x0815eba0 'test2'
|: s -14711/226 -15336/-74, g -14706/231 -15331/-69: --- not detected 0x08169f38 'test1'
|
|These messages are output by Fvwm, not FvwmTabs. I don't know what they
|mean. They're making me suspicious.
|
|: FvwmTabs: Protocol error: bad 3 (Window); Sequence Number 70
|:  Opcode (40, 0) = TranslateCoordinates
|:  Bad resource 60818863 (0x3a005af)
|
|This is suspicious too. But it's an FvwmTabs message. FvwmTabs is trying
|to determine the position of a window but the window doesn't exist!

are you able to reproduce the bug ?

thanks

---

From: Scott Smedley <[email-masked]>
Date: Sun, 8 Feb 2004 10:47:47 +1100

Hi Xavier,

> are you able to reproduce the bug ?

No. I just tried it on my RH7.3 system.

I've fixed FvwmTabs so it "remembers" which desk each tab-manager is on,
(new version on the web site now) but I can't get it to lose windows
doing something a simple as restarting it a few times.

SCoTT.