Mantis - Croquet
Viewing Issue Advanced Details
802 Jasmine block always 01-06-05 22:55 01-11-05 01:16
elenzil  
 
normal  
feedback  
reopened  
none    
none  
0000802: Connection causes freeze
With a clean update as of today,
connecting a Mac and a PC on a LAN
causes a Squeak freeze if the mac connects first.
Have not tested pc-pc.

The image is here:
http://www.citris-uc.org/hosted/projects/ith/scratch/Croquet%20Connect%2020050106.zip [^]

and has these steps listed inside of itself:


1. open this image on PC (winxp)
2. open this image on Mac (osx)
3. on PC, 'doit' the line at the top of this workspace.
4. on Mac, 'doit' the line at the top of this workspace.
5. on PC, choose Connect from the slide-up menu.
6. on Mac, navigate avatar somewhere and then Connect.

---> Mac squeak image is frozen, PC is okay.

7. close mac squeak

---> PC squeak is frozen.


This is all on a LAN,
This is a clean croquet image, updated in the AM on 20050106.


If you reverse the order of steps 5 and 6,
the connection goes thru after several seconds,
and then all seems relatively well.
http://www.citris-uc.org/hosted/projects/ith/scratch/Croquet%20Connect%2020050106.zip [^]

Notes
(0001025)
Croqueteer   
01-07-05 23:07   
We are aware of this problem, and it so happens that I will be spending the next few days on this and the slow down that occurs when we connect, which is also driving me crazy.
(0001026)
elenzil   
01-07-05 23:17   
awesome, david.
there's also weirdness around connecting multiple instances on one machine -
sometimes it works and sometimes one of the instances gets hosed.
it seems about 50/50.
i haven't found a "steps to reproduce" for it yet tho.
it may very likely come out in the wash with your work.
(0001027)
Croqueteer   
01-07-05 23:41   
We actually know why this happens - we just haven't figured out a fix yet. What is occurring is that before you connect, both systems' avatars both have the same teaObjectName. When you connect, the current avatar is destroyed and a new one is generated. If this occurs between renderings, everything is fine. If however, one machine connects to another and succeeds in removing the local avatar and the other machine happens to render before it in turn is connected, then we have a problem, so it is a timing problem. Starting the connection from one machine vs. the other can fix this. This may also explain why you get a 50/50 chance of failure on the same machine.
(0001029)
elenzil   
01-08-05 00:37   
gotcha. thanks.
(0001033)
Croqueteer   
01-08-05 23:07   
This is a problem related to the fact that at startup, both users share the same TAvatar teaObjectName. This means that when one of the users connects, he was destroying both his local version and the remote version. This was not a problem if the remote user did not render in the mean time, as that is the first place that not having an avatar can hurt you. However, this was not always the case, and depended upon a number of factors, such as which machine you started the connection process from, latency of the network, time of day, the weather,...

I changed this so that if it is the original avatar it is not destroyed remotely. This seems to work, as I cannot replicate the bug no matter which direction I do it in. This is between a Mac and a PC where I also had this problem.
(0001051)
elenzil   
01-11-05 00:32   
In limited testing i'm still getting about 50% success when connecting between two instances of squeak running on a single WinXP box.

I'll test the PC/Mac connections now.

Also,
this seems to be a recipe for disaster:
* establish a connection between two instances of squeak on the same machine
* close the TeapotMorph in one instance (instance 'A')
* open a new TeapotMorph in that instance
* connect
---> instance 'A' displays "acceptTunnel: rejecting, already tunneled",
     various errors may occur, and Instance B may see A's avatar (connected, live) but A will not see B.

Should i open a new issue for this ?
(0001052)
elenzil   
01-11-05 01:16   
The straight-forward mac/pc connection now works in both directions for me.
Thanks David.

I wouldn't recommend straying yet from the path of one connection per Squeak session tho.

Thanks again,
Orion