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
User avatar
ShinichiYao
Advanced User
Advanced User
Posts: 262
Joined: Tue Jan 12, 2016 3:53 am

Client crash on login if your character's position changed

Post by ShinichiYao »

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
FinalDestination
Advanced User
Advanced User
Posts: 167
Joined: Wed May 09, 2012 6:18 pm
Location: Greece, Thessaloniki

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

Post by FinalDestination »

yes happens me too
User avatar
ShinichiYao
Advanced User
Advanced User
Posts: 262
Joined: Tue Jan 12, 2016 3:53 am

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

Post by ShinichiYao »

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);
		}
	}
FinalDestination
Advanced User
Advanced User
Posts: 167
Joined: Wed May 09, 2012 6:18 pm
Location: Greece, Thessaloniki

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

Post by FinalDestination »

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);
Sacrifice
Advanced User
Advanced User
Posts: 1026
Joined: Thu Aug 14, 2014 6:31 am

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

Post by Sacrifice »

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:
DevOps and Java Developer using Eclipse, Java 21, MySQL 8.0+
Sacrifice
Advanced User
Advanced User
Posts: 1026
Joined: Thu Aug 14, 2014 6:31 am

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

Post by Sacrifice »

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
DevOps and Java Developer using Eclipse, Java 21, MySQL 8.0+
Post Reply