Carcassonne Central

Carc Central Community => Online Games and Competitions => JCloisterZone FAQ, Suggestions & Bug Reports => Topic started by: rfielder on December 13, 2017, 07:40:47 AM

Title: "Connection Lost" on local game
Post by: rfielder on December 13, 2017, 07:40:47 AM
I am getting the red banner with "Connection Lost" text when playing a local game against the computer.

Why is this happening?  I am not connected to anything - i am only playing a local game.
Title: Re: "Connection Lost" on local game
Post by: farin on December 13, 2017, 01:43:07 PM
I don't know. Network layer is rare case of code which is almost untouched from 3.x.
So I would not expect problems just here.

On the other hand java-websocket dependency was upgraded, and it can be related to it.

As far as I remeber I observed similar behaviour when laptop was sleep for a while. I am going to experiment with it.
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 13, 2017, 01:47:34 PM
farin - thanks!

it leave the game hung, so that I have to Leave the game to get anything happening.
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 13, 2017, 03:36:11 PM
Just did it to me again!!   :-X
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 14, 2017, 03:25:47 PM
Happened again, but with a new message.

After the "Connection Lost" message, a "NullPointerException" message appeared.  That one stayed.

The other difference - I could still interact with the game, to a point.  The boxes to show  potential tile placement appeared, which did not happen before.  However, I am unable to place the tile - clicking a valid location does nothing.

Title: Re: "Connection Lost" on local game
Post by: MrNumbers on December 14, 2017, 10:48:13 PM
Which Java version do you use, rfielder?
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 15, 2017, 04:56:30 AM
Which Java version do you use, rfielder?
Latest available - which has been out since mid-October 2017.

java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)

Just re-installed it, and it verified OK.  Have not played any games yet to know if reinstalling Java makes any difference.
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 15, 2017, 10:14:27 AM
Just happened again, playing against the computer on my laptop.

Reinstalling Java and rebooting did not help.
Title: Re: "Connection Lost" on local game
Post by: TheSteveAllen on December 15, 2017, 10:53:03 AM
Robert, this is a real shot in the dark, but I have had strange things happen when plugins have been activated, especially the catapult tiles. It probably has nothing to do with your problem, but I suggest that you check that only the classic tiles are enabled and try again. At least it will eliminate another possibility even if there is no improvement.

Good luck!
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 15, 2017, 12:41:42 PM
Robert, this is a real shot in the dark, but I have had strange things happen when plugins have been activated....
A good point!

Unfortunately i have none activated.  Using the basic default configuration, and have been playing only with the expansions for the current Worlds since instlalling v4.
Title: Re: "Connection Lost" on local game
Post by: Fizanko on December 15, 2017, 07:05:58 PM
Hello,

I just got this "connection lost" error while playing against 1 ai , once the error happens it is not possible to continue playing.
This was completely default game settings as i had just downloaded the latest JCloisterZone, it happened on the 2nd consecutive game , the first one had no problem.

This never happened before when i was on a previous version ( 3.xx as this version is the first 4.xx i downloaded ).

edit : oh happened again, fortunately older version is still availble.
Title: Re: "Connection Lost" on local game
Post by: farin on December 17, 2017, 12:24:53 AM
Hi guys

at least whole 4.x branch behaves badly when messages are lost network. That something which needs some care too.
Which shouldn't be you case when you are playing locally.

I looked at JavaWebsocket library, and since 3.x there is many many changes. I would like to rather not revert it to version used in 3.x
Instead I am just trying to make it work smoothly on recent version (an truth is that 4.0.2 wan't built with latest)

Current checlist:
- use really latest JavaWebsocet
- disable hearthbeat
- solve lost message bug

then I am going to rebuild it and you can try if it helps. It should happen tomorrow.

Sorry for these troubles, 4.x is rather complete rewrite then just app update. Which causes all regression bugs. But i was needed if I can be able to make new great things.

Title: Re: "Connection Lost" on local game
Post by: farin on December 17, 2017, 03:11:49 PM
hmmm my connection lost handling is terribly broken.

Good news is that I know what to do :-) New hotfix release will be needed asap.
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 18, 2017, 12:26:54 PM
farin - I am being prompted to download 4.0.2.

However, I don't see any announcements here of this version.

Might 4.0.2 address any of the lost connection issues? Or is that issue with lost connections still lost in coding, for even more lost time and lost games?

 :)
Title: Re: "Connection Lost" on local game
Post by: farin on December 19, 2017, 12:28:35 AM
4.0.2 doesn't help you, wait with update.

I am going to replace it with 4.1.0 in few days, hopefully tomorrow.
Shame on me. Making it stable it's top priority for me now. Current release it unsatisfying.
Title: Re: "Connection Lost" on local game
Post by: farin on December 24, 2017, 03:11:19 PM
rfielder - please try 4.1.0. and let me know

At least it uses latest websocket library + fixes some important issues related to networking on my side
Eg reconnecting really means reconnection and not crash ;-)

I still wonder why you have troubles on local network, but if remains we can continue with investigation.
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 25, 2017, 09:12:38 AM
rfielder - please try 4.1.0. and let me know
farin - thanks!

One game played, no issues.  Far from conclusive, but a good start.

Will let you know in  a day or two how it goes.

Merry Christmas!
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 26, 2017, 04:13:59 AM
farin - JCZ 4.1 has been good for a few games.

Last game ended up hung, kind of.  Screen capture is attached.

I am playing green.  The arrow shows that it is my move.  However, there are no possible locations outlined.

There is a "1" showing, right side of the board, but it is showing on an unused space.

I can more the board around, and interact with the menus, but I can not place the tile, or otherwise play the game.

Only way out was to Leave the game.
Title: Re: "Connection Lost" on local game
Post by: rfielder on December 29, 2017, 10:30:54 AM
Farin - using 4.1.0, received a new error message, please see attached image.  Could not place the tile without the message appearing.  Had to kill the game.

Also - the AI seems to be running slower at times.  I even had one game where the AI froze.  I left it for about 90 minutes, then killed the game.  That was yesterday, different game than the screen capture is from.
Title: Re: "Connection Lost" on local game
Post by: ilgabbiano on January 12, 2018, 04:26:29 AM
It happened to me too (v. 4.0.2).

I have to save the game, restart jcloister and then reload the game, to continue.
Title: Re: "Connection Lost" on local game
Post by: farin on January 12, 2018, 02:40:46 PM
Anybody who suffer from connection issues (which may include reported message above)
please try
http://jcloisterzone.com/builds/JCloisterZone-4.1.X.7z

It is just 4.1.0 repacked with old version of Java-Websockers. With exact same version used in JCZ 3.x
Nothing else change. Which should make pretty clear answer if these troubles are cause by networking lib or not.
Because it looks like some messages are lost sometimes. And JCZ network layer was almost unchaged from JCZ 3 to 4, except
lib update to much newer version.

I would be glad for any observation. Thx
Title: Re: "Connection Lost" on local game
Post by: Durbs on January 18, 2018, 05:49:59 AM
Downloaded 4.1.x today and it's fixed all the bugs we were having with 4.1.0: No connection lost, no null pointer exception and no random barn errors.

Only issue they both show is when placed, barns no longer show field control colour - they return to grey.

Title: Re: "Connection Lost" on local game
Post by: farin on January 19, 2018, 12:48:08 PM
Durbs, bug thanks for confirmation

It really looks that new JavaWebsocket sucks. I am going to use old one (and put it out officially asap)
In long term horizont I will probably migrate to different websocket library, but seems not big issue now.
Title: Re: "Connection Lost" on local game
Post by: Durbs on January 23, 2018, 02:24:37 AM
Great stuff thanks - out of interest, I couldn't see a "Donate" section on your website?