We moved our repositories to BitBucket!

If you can't login or you can't register to the forums do not rise an issue, instead please write to support (at) l2jserver.com

Check our wiki!

Report server issues here

Forum has been updated to phpBB 3.2, let's see if this fixes some minor bugs we had.

Thank you for visiting http://www.l2jserver.com/

Client crash on login if your character's position changed

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
User avatar
ShinichiYao
Advanced User
Advanced User
Posts: 246
Joined: Tue Jan 12, 2016 3:53 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Client crash on login if your character's position changed

Post by ShinichiYao » Mon Oct 09, 2017 7:52 am

For example if you logout in an instance, and after the instance finished you would login at the exitpoint of the instance. In this case Client crashes.

Image

User avatar
FinalDestination
Advanced User
Advanced User
Posts: 166
Joined: Wed May 09, 2012 6:18 pm
Location: Greece, Thessaloniki
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Client crash on login if your character's position changed

Post by FinalDestination » Mon Oct 09, 2017 9:28 am

yes happens me too
Image

User avatar
ShinichiYao
Advanced User
Advanced User
Posts: 246
Joined: Tue Jan 12, 2016 3:53 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Client crash on login if your character's position changed

Post by ShinichiYao » Tue Oct 10, 2017 11:11 am

Also happened in NoRestartZone. If player.teleToLocation execute too fast after spawnMe in EnterWorld could cause this issue.

Code: Select all

	@Override
	public void onPlayerLoginInside(L2PcInstance player)
	{
		if (!_enabled)
		{
			return;
		}
		
		if (((System.currentTimeMillis() - player.getLastAccess()) > getRestartTime()) && ((System.currentTimeMillis() - GameServer.dateTimeServerStarted.getTimeInMillis()) > getRestartAllowedTime()))
		{
			player.teleToLocation(TeleportWhereType.TOWN);
		}
	}

User avatar
FinalDestination
Advanced User
Advanced User
Posts: 166
Joined: Wed May 09, 2012 6:18 pm
Location: Greece, Thessaloniki
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Client crash on login if your character's position changed

Post by FinalDestination » Sun Dec 02, 2018 9:19 am

Code: Select all

// we need to add delay here in case of critical error on player login.
			ThreadPoolManager.getInstance().scheduleGeneral(() -> player.teleToLocation(TeleportWhereType.TOWN), 1000);
Image

User avatar
Sacrifice
Advanced User
Advanced User
Posts: 1019
Joined: Thu Aug 14, 2014 6:31 am
Location: Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Client crash on login if your character's position changed

Post by Sacrifice » Tue Dec 04, 2018 6:18 pm

FinalDestination wrote:
Sun Dec 02, 2018 9:19 am

Code: Select all

// we need to add delay here in case of critical error on player login.
			ThreadPoolManager.getInstance().scheduleGeneral(() -> player.teleToLocation(TeleportWhereType.TOWN), 1000);
Always ThreadPool general must to do all jobs... :lol:
Retail GameMaster and Developer using Eclipse for Java Developers (64 bits), OpenJDK11 (64 bits), MySQL 8.0+ (64 bits).

User avatar
Sacrifice
Advanced User
Advanced User
Posts: 1019
Joined: Thu Aug 14, 2014 6:31 am
Location: Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Client crash on login if your character's position changed

Post by Sacrifice » Tue Dec 04, 2018 6:19 pm

ShinichiYao wrote:
Tue Oct 10, 2017 11:11 am
Also happened in NoRestartZone. If player.teleToLocation execute too fast after spawnMe in EnterWorld could cause this issue.

Code: Select all

	@Override
	public void onPlayerLoginInside(L2PcInstance player)
	{
		if (!_enabled)
		{
			return;
		}
		
		if (((System.currentTimeMillis() - player.getLastAccess()) > getRestartTime()) && ((System.currentTimeMillis() - GameServer.dateTimeServerStarted.getTimeInMillis()) > getRestartAllowedTime()))
		{
			player.teleToLocation(TeleportWhereType.TOWN);
		}
	}
That's "better solution"... don't know if is correctly expelled, but as concept... Can be useful
Retail GameMaster and Developer using Eclipse for Java Developers (64 bits), OpenJDK11 (64 bits), MySQL 8.0+ (64 bits).

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable