Jump to content
  • 0

Need Help To Fix In Exception In Thread "aistpool-5".


Question

Posted

L2J aCis.

Error:

Exception in thread "AISTPool-5" java.lang.StackOverflowError
    at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.startWaterTask(L2PcInstance.java:9109)
    at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.checkWaterState(L2PcInstance.java:9122)
    at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.revalidateZone(L2PcInstance.java:1540)
    at net.sf.l2j.gameserver.ai.L2CharacterAI.onEvtArrived(L2CharacterAI.java:626)
    at net.sf.l2j.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:373)
    at net.sf.l2j.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:296)

    at net.sf.l2j.gameserver.model.actor.L2Character.moveToLocation(L2Character.java:3586)
    at net.sf.l2j.gameserver.model.actor.L2Character$AIAccessor.moveTo(L2Character.java:2819)
    at net.sf.l2j.gameserver.ai.AbstractAI.moveTo(AbstractAI.java:538)
    at net.sf.l2j.gameserver.ai.AbstractAI.moveToPawn(AbstractAI.java:494)
    at net.sf.l2j.gameserver.ai.L2CharacterAI.maybeMoveToPawn(L2CharacterAI.java:877)
    at net.sf.l2j.gameserver.ai.L2PlayerAI.thinkCast(L2PlayerAI.java:235)
    at net.sf.l2j.gameserver.ai.L2PlayerAI.onEvtThink(L2PlayerAI.java:312)
    at net.sf.l2j.gameserver.ai.L2CharacterAI.onEvtArrived(L2CharacterAI.java:641)
    at net.sf.l2j.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:373)
    at net.sf.l2j.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:296)

    at net.sf.l2j.gameserver.model.actor.L2Character.moveToLocation(L2Character.java:3586)
    at net.sf.l2j.gameserver.model.actor.L2Character$AIAccessor.moveTo(L2Character.java:2819)
    at net.sf.l2j.gameserver.ai.AbstractAI.moveTo(AbstractAI.java:538)
    at net.sf.l2j.gameserver.ai.AbstractAI.moveToPawn(AbstractAI.java:494)
    at net.sf.l2j.gameserver.ai.L2CharacterAI.maybeMoveToPawn(L2CharacterAI.java:877)
    at net.sf.l2j.gameserver.ai.L2PlayerAI.thinkCast(L2PlayerAI.java:235)
    at net.sf.l2j.gameserver.ai.L2PlayerAI.onEvtThink(L2PlayerAI.java:312)
    at net.sf.l2j.gameserver.ai.L2CharacterAI.onEvtArrived(L2CharacterAI.java:641)
    at net.sf.l2j.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:373)
    at net.sf.l2j.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:296)

and 100 same error like last block

L2Character.java:3586 i marked it with plus "+"

....
if (offset > 0 || distance < 1)
		{
			// approximation for moving closer when z coordinates are different
			// TODO: handle Z axis movement better
			offset -= Math.abs(dz);
			if (offset < 5)
				offset = 5;
			
			// If no distance to go through, the movement is canceled
			if (distance < 1 || distance - offset <= 0)
			{
				if (Config.DEBUG)
					_log.fine("already in range, no movement needed.");
				
				// Notify the AI that the L2Character is arrived at destination
+				getAI().notifyEvent(CtrlEvent.EVT_ARRIVED);
				
				return;
			}
....

L2Character.java:2819

		public void moveTo(int x, int y, int z, int offset)
		{
+			moveToLocation(x, y, z, offset);
		}

AbstractAI.java:538

protected void moveTo(int x, int y, int z, int offset)
	{
		// Check if actor can move
		if (_actor.isMovementDisabled())
		{
			_actor.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		
		// Set AI movement data
		_clientMoving = true;
		
		if (_accessor == null)
			return;
		
		// Calculate movement data for a move to location action and add the actor to 
+		_accessor.moveTo(x, y, z, offset);
		
		if (!_actor.isMoving())
		{
			_actor.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
		
		// Send a Server->Client packet CharMoveToLocation to the actor and all L2PcInstance in
		_actor.broadcastPacket(new MoveToLocation(_actor));
	}

AbstractAI.java:494

	protected void moveToPawn(L2Object pawn, int offset)
	{
		if (_clientMoving && _target == pawn && _actor.isOnGeodataPath() && GameTimeController.getGameTicks() < _moveToPawnTimeout)
			return;
		
		_target = pawn;
		if (_target == null)
			return;
		
		_moveToPawnTimeout = GameTimeController.getGameTicks() + 20;
		
+		moveTo(_target.getX(), _target.getY(), _target.getZ(), offset = offset < 10 ? 10 : offset);
		
	}

L2CharacterAI.java:877

protected boolean maybeMoveToPawn(L2Object target, int offset)
	{
		if (target == null || offset < 0) // skill radius -1
			return false;
		
		offset += _actor.getTemplate().getCollisionRadius();
		if (target instanceof L2Character)
			offset += ((L2Character) target).getTemplate().getCollisionRadius();
		
		if (!_actor.isInsideRadius(target, offset, false, false))
		{
			if (getFollowTarget() != null)
			{
				int foffset = offset + (((L2Character) target).isMoving() ? 100 : 0);
				
				// allow larger hit range when the target is moving (check is run only once per second)
				if (!_actor.isInsideRadius(target, foffset, false, false))
				{
					if (!_actor.isAttackingNow() || _actor instanceof L2Summon)
+						moveToPawn(target, offset);
					
					return true;
				}
				
				stopFollow();
				return false;
			}
			
			if (_actor.isMovementDisabled() && !(_actor instanceof L2Attackable))
			{
				if (getIntention() == CtrlIntention.ATTACK)
					setIntention(CtrlIntention.IDLE);
				
				return true;
			}
			
			// If not running, set the L2Character movement type to run and send Server->Client packet ChangeMoveType to all others L2PcInstance
			if (!(this instanceof L2PlayerAI) && !(this instanceof L2SummonAI))
				_actor.setRunning();
			
			if ((target instanceof L2Character) && !(target instanceof L2DoorInstance))
				startFollow((L2Character) target, offset);
			else
			{
				// Move the actor to Pawn server side AND client side by sending Server->Client packet MoveToPawn (broadcast)
				moveToPawn(target, offset);
			}
			return true;
		}
		
		stopFollow();
		return false;
	}

L2PlayerAI.java:235

	private void thinkCast()
	{
		L2Character target = (L2Character) getTarget();
		if (Config.DEBUG)
			_log.warning("L2PlayerAI: thinkCast -> Start");
		
		if (_skill.getTargetType() == SkillTargetType.TARGET_GROUND && _actor instanceof L2PcInstance)
		{
			if (maybeMoveToPosition(((L2PcInstance) _actor).getCurrentSkillWorldPosition(), _skill.getCastRange()))
			{
				_actor.setIsCastingNow(false);
				return;
			}
		}
		else
		{
			if (checkTargetLost(target))
			{
				// Notify the target
				if (_skill.isOffensive() && getTarget() != null)
					setTarget(null);
				
				_actor.setIsCastingNow(false);
				return;
			}
			
+			if (target != null && maybeMoveToPawn(target, _skill.getCastRange()))
			{
				_actor.setIsCastingNow(false);
				return;
			}
		}

L2PlayerAI.java:312

protected void onEvtThink()
	{
		// Check if the actor can't use skills and if a thinking action isn't already in progress
		if (_thinking && getIntention() != CtrlIntention.CAST) // casting must always continue
			return;
		
		// Start thinking action
		_thinking = true;
		
		try
		{
			// Manage AI thoughts
			switch (getIntention())
			{
				case ATTACK:
					thinkAttack();
					break;
				case CAST:
+					thinkCast();
					break;
				case PICK_UP:
					thinkPickUp();
					break;
				case INTERACT:
					thinkInteract();
					break;
			}
		}
		finally
		{
			// Stop thinking action
			_thinking = false;
		}
	}

L2CharacterAI.java:641

	protected void onEvtArrived()
	{
		_accessor.getActor().revalidateZone(true);
		
		if (_accessor.getActor().moveToNextRoutePoint())
			return;
		
		if (_accessor.getActor() instanceof L2Attackable)
			((L2Attackable) _accessor.getActor()).setIsReturningToSpawnPoint(false);
		
		clientStoppedMoving();
		
		// If the Intention was MOVE_TO, set the Intention to ACTIVE
		if (getIntention() == CtrlIntention.MOVE_TO)
			setIntention(CtrlIntention.ACTIVE);
		
		// Launch actions corresponding to the Event Think
+		onEvtThink();
	}

AbstractAI.java:373

...
			case EVT_ARRIVED:
				if (!_actor.isCastingNow() && !_actor.isCastingSimultaneouslyNow())
+					onEvtArrived();
				break;
...

AbstractAI.java:296

	public final void notifyEvent(CtrlEvent evt)
	{
+		notifyEvent(evt, null, null);
	}

i get this error not only with startWaterTask i get and with others, and same error 14000 lines... one time per day.

 

Maybe anyone know how to solve this problem?
 

Recommended Posts

  • 0
Posted

The stackoverflow is a bug plaguing any aCis since at least 2y, it has been fixed with revert of movement system back to L2J.

from what revision i can fix it?

  • 0
Posted (edited)

Read changesets ;p. It's not 10 revisions old.

Yes.. i read all chagelog from me revision to latest and see many chages... Time to move all features to latest version, will be hard..

Edited by wongerlt
  • 0
Posted

Yes.. i read all chagelog from me revision to latest and see many chages... Time to move all features to latest version, will be hard..

Just a little addapt and is ok :D

  • 0
Posted

Little? I'm many things changed in server core , so move all changes is hard :D

Thats why people use svn :D you can save your work even with a patch

  • 0
Posted

Still progress is not lost. Take clean pack, the same revision, create SVN, replace with your actual sources and boom, you have diff patch with all your changes :)

  • 0
Posted

Im use only notepad++ and ant (to compile). Im try to use eclipse but its very uncomfortable for me :/

And i see on latest version many changes, so i need rework all me codes to adapt ;)

Will be a lot of work from ~300 to ~360 :D

  • 0
Posted (edited)

To much work to move all server to new aCis version... Maybe anyone can tell me more about this movement system bug. Thanks :)

Example about bug that need target self to can move at start, but not all time.

Edited by wongerlt

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • New release   World & atmosphere   - Grass is back — terrain grass now grows across the world like the original client, with settings for on / original-style / off, two sway styles, and optional grass shadows.   - Day/night and the sky now follow the game server, including sunrise, sunset, Seven Signs skies, and red-sky events. A manual override remains available in settings.   - Doors are now live — castle and town doors open and close according to the server, can be targeted, and display their health.   - Earthquake events now shake the screen and play their original rumble sounds.    Map & navigation   - New live minimap — an always-on radar with a rotating player arrow, party, target and NPC markers, zone labels, hover tooltips, three zoom levels, and collapse and resize controls. Clicking it opens the full world map.   - Zone titles now fade onto the screen when you enter a new region.   - The world map now displays your current zone name and party-member positions.   Combat & effects   - Enchanted weapons now glow properly, complete with drifting wisps, across every weapon type — including on the character selection screen.   - Soulshot, Spiritshot, Fishing Shot, and Beast Shot activations now play their original flashes and sounds. A new “hide shot effects” option is available if you prefer not to see them.   - Item-use visuals have been restored — potions, antidotes, echo crystals, fireworks, and other usable items now play their proper effects.   - Skill damage now displays floating damage numbers, and critical skill hits shake the camera.   - New buff bar — active buffs, debuffs, and toggles now appear as icons above the HUD.   - Bow skills now nock and release their arrows at the correct animation moments.   Shops & items   - NPC shops now work — a complete buy window with prices, weight and Adena totals, stock limits, and a quantity dialog for stackable items.   - Player-to-player trading now works, including timed trade requests, complete inventory and offer panes, quantity selection for stackable items, weight preview, confirmation locking, cancellation, and trade completion.   - Item enchanting now works — using an enchant scroll opens the original-style item selection window with enchant levels and full item tooltips, plus proper selection and cancellation handling.   - Item cooldowns, including potions and similar items, now appear on the shortcut bar.   - Item tooltips and the inventory window have received further polish.   - Weapon tooltips now correctly identify weapon classes and calculate enchant-adjusted P. Atk. values for bows, two-handed weapons, fists, and dual swords.   Chat & commands   - Slash commands now work, including /time, /loc, and other server commands. GM accounts can also use // admin commands.   - Action commands can now be entered directly in chat, including sit/stand, walk/run, normal and forced attacks, trade, target next, pickup, assist, party actions, social emotes, and duels.   - System messages can optionally be separated into their own window, and the chat font size is adjustable.   - Server event announcements now appear on screen as they did in the original client.   Interface   - A live animated portrait of your character now appears beside the HP and MP bars.   - The client now ships with its own Tahoma and Noto Sans fonts, allowing text to work across languages. Chat and nameplate fonts can be selected in the new Fonts settings section.   - The target window has been refined — clicking the level chip now expands or collapses the window.   - NPC dialog windows have received additional polish, including proper window titles and button labels. Download from the launcher you have installed or at https://updates.fermata.gg/ if you don't have the launcher
    • Damn there are still people that value Lineage! Great job Elfo as always!
    • Payment Methods Credit/Debit Card, PayPal, Wise, Payoneer, Binance Pay, Bybit, Crypto, and other supported payment options depending on availability. Delivery Time / TAT General delivery time: Instants to 24 hours Depended on Products. Some products may take longer depending on stock, account eligibility, product type, payment confirmation, or activation requirements. Refund & Replacement Policy If we cannot deliver the product within the confirmed delivery time and you do not want to wait, you are eligible for a refund. If the account, gift link, gift code, or activation does not work at first login/activation, please contact us within 24 hours with screen recording proof before start purchasing. If the product is successfully delivered and activated, refund is not available unless a specific warranty was mentioned for that product. Warranty period depends on the product type. Some products may include replacement support for a limited period. Please ask before ordering if warranty is important. No refund/replacement is available if the buyer shares account details, changes recovery/security settings without asking, uses VPN/proxy in a risky way, violates platform rules, fails to provide proof, or changes their mind after successful use. If a platform changes its policy, eligibility, country availability, or subscription system after delivery, we will try to help, but we cannot control third-party platform changes. Important Notes Stock may be limited for some products at klouditem. Prices may change depending on market, stock, and product availability. Some services may require your personal email/account for upgrade. Some services are ready-made accounts only. Some products may have country or account eligibility requirements. Please read the product details before ordering. We do not claim to be an official partner of any platform unless clearly stated by the platform itself. Product names and logos belong to their respective owners. Review Copies Review copies are not always available. If we open a review copy round, we will announce it in this thread and select qualified members based on account history, activity, and availability. Please do not request review copies unless we have announced them. FAQ Q: Do you deliver instantly? A: Delivery is usually Instant to 24 hours, depending on stock and payment confirmation. Q: Can I upgrade my own account? A: Some services support own account upgrade, while others are ready-made account only. Please ask before ordering. Q: Do you provide support after delivery? A: Yes, we provide support for login, activation, and basic setup issues related to the delivered product. Q: Can I check stock before payment? A: Yes, please ask before payment. We will confirm stock and delivery time first. Q: Are prices fixed? A: Some prices are fixed, and some depend on stock/package. Q: What should I do if I face an issue? A: Contact us as soon as possible with clear screenshot or screen recording proof from purchase, and we will check it.   Contact Buy Now: https://klouditem.com Telegram Support: https://t.me/Klouditem
    • https://prnt.sc/MCxO-vS1MHuA how to zoom in? and on every click ad popup.. nonsense.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..