Thread: Fatal: dropping packet

Results 1 to 6 of 6
  1. #1 Fatal: dropping packet 
    Donator

    Join Date
    Nov 2012
    Posts
    790
    Thanks given
    47
    Thanks received
    42
    Rep Power
    17
    Anyone know whats causing this?
    Code:
    [09/05/20 23:26]: [player-1]: Invalid waypoint in walking queue!
    [09/05/20 23:26]: [player-1]: Fatal: couldn't find connection vertex! Dropping packet.
    mainly happens when attacking npcs and players with ranged or mage, and I move around fast I get this and then the clicks on the gamescreen are very off, like not calibrated.

    Spoiler for Code:
    Code:
    public int getNextWalkingDirection() {
    		if(wQueueReadPtr == wQueueWritePtr) 
    			return -1;		
    		int dir;
    		do {
    			dir = Misc.direction(currentX, currentY, walkingQueueX[wQueueReadPtr], walkingQueueY[wQueueReadPtr]);
    			if(dir == -1) {
    				wQueueReadPtr = (wQueueReadPtr+1) % walkingQueueSize;
    			} else if((dir&1) != 0) {
    				println_debug("Invalid waypoint in walking queue!");
    				resetWalkingQueue();
    				return -1;
    			}
    		} while((dir == -1) && (wQueueReadPtr != wQueueWritePtr));
    		if(dir == -1) return -1;
    		dir >>= 1;
    			currentX += Misc.directionDeltaX[dir];
    			currentY += Misc.directionDeltaY[dir];
    			absX += Misc.directionDeltaX[dir];
    			absY += Misc.directionDeltaY[dir];
    			return dir;
    	}
    Code:
    	public synchronized void postProcessing() {		
    		if(newWalkCmdSteps > 0) {
    			int firstX = getNewWalkCmdX()[0], firstY = getNewWalkCmdY()[0];	
    
    			int lastDir = 0;
    			boolean found = false;
    			numTravelBackSteps = 0;
    			int ptr = wQueueReadPtr;
    			int dir = Misc.direction(currentX, currentY, firstX, firstY);
    			if(dir != -1 && (dir&1) != 0) {				
    				do {
    					lastDir = dir;
    					if(--ptr < 0) 
    						ptr = walkingQueueSize-1;
    
    					travelBackX[numTravelBackSteps] = walkingQueueX[ptr];
    					travelBackY[numTravelBackSteps++] = walkingQueueY[ptr];
    					dir = Misc.direction(walkingQueueX[ptr], walkingQueueY[ptr], firstX, firstY);
    					if(lastDir != dir) {
    						found = true;
    						break;		
    					}
    
    				} while(ptr != wQueueWritePtr);
    			}
    			else found = true;	
    
    			if(!found) println_debug("Fatal: couldn't find connection vertex! Dropping packet.");
    			else {
    				wQueueWritePtr = wQueueReadPtr;		
    
    				addToWalkingQueue(currentX, currentY);	
    
    				if(dir != -1 && (dir&1) != 0) {
    
    
    					for(int i = 0; i < numTravelBackSteps-1; i++) {
    						addToWalkingQueue(travelBackX[i], travelBackY[i]);
    					}
    					int wayPointX2 = travelBackX[numTravelBackSteps-1], wayPointY2 = travelBackY[numTravelBackSteps-1];
    					int wayPointX1, wayPointY1;
    					if(numTravelBackSteps == 1) {
    						wayPointX1 = currentX;
    						wayPointY1 = currentY;
    					}
    					else {
    						wayPointX1 = travelBackX[numTravelBackSteps-2];
    						wayPointY1 = travelBackY[numTravelBackSteps-2];
    					}
    
    					dir = Misc.direction(wayPointX1, wayPointY1, wayPointX2, wayPointY2);
    					if(dir == -1 || (dir&1) != 0) {
    						println_debug("Fatal: The walking queue is corrupt! wp1=("+wayPointX1+", "+wayPointY1+"), "+
    								"wp2=("+wayPointX2+", "+wayPointY2+")");
    					}
    					else {
    						dir >>= 1;
    					found = false;
    					int x = wayPointX1, y = wayPointY1;
    					while(x != wayPointX2 || y != wayPointY2) {
    						x += Misc.directionDeltaX[dir];
    						y += Misc.directionDeltaY[dir];
    						if((Misc.direction(x, y, firstX, firstY)&1) == 0) {
    							found = true;
    							break;
    						}
    					}
    					if(!found) {
    						println_debug("Fatal: Internal error: unable to determine connection vertex!"+
    								"  wp1=("+wayPointX1+", "+wayPointY1+"), wp2=("+wayPointX2+", "+wayPointY2+"), "+
    								"first=("+firstX+", "+firstY+")");
    					}
    					else addToWalkingQueue(wayPointX1, wayPointY1);
    					}
    				}
    				else {
    					for(int i = 0; i < numTravelBackSteps; i++) {
    						addToWalkingQueue(travelBackX[i], travelBackY[i]);
    					}
    				}
    
    
    				for(int i = 0; i < newWalkCmdSteps; i++) {
    					addToWalkingQueue(getNewWalkCmdX()[i], getNewWalkCmdY()[i]);
    				}
    
    			}
    
    			isRunning = isNewWalkCmdIsRunning() || isRunning2;
    		}
    	}


    How to make the error occur


    What it looks like after the error throws
    [23/05/20 10:41]: [player-1]: Invalid waypoint in walking queue!
    Last edited by Relentless; 05-23-2020 at 11:48 AM.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Apr 2020
    Posts
    32
    Thanks given
    1
    Thanks received
    5
    Rep Power
    42
    This happens because
    currentX
    currentY

    have been modified somewhere in your server but not applied. Making the server think your in a different location to what you actually are.
    Reply With Quote  
     

  3. #3  
    Donator

    Join Date
    Nov 2012
    Posts
    790
    Thanks given
    47
    Thanks received
    42
    Rep Power
    17
    Still no fix, bump
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    May 2020
    Posts
    23
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    This may be a wild shot in the dark. But after taking a look at the image you share, for example before you click the NPC is in the way from what I presume after looking at the footage shown here.

    After you begin to notice these affects.

    Again, this may be a wild shot in the dark but I would begin by debugging starting with the packets being sent and received via the server and the client to start with. Perhaps only server related begin by printing out the NPCS location and also the players location. See if something is beginning to become altered there.

    Once this is done I would take the data and determine if the issue is caused by a lot of problems. First one is, is the player properly updating according to the world map. If he is, where is the packet not being able to read the data its being told to do. I would also run more tests to determine these values according to the world map location on a XY value.

    Just a thought as its hard to tell you without actually seeing full source code and debug information. This is my guess I may be wrong, this is what I gather since I don't see many ideas or solutions here.

    Share the debug information.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2017
    Posts
    119
    Thanks given
    7
    Thanks received
    19
    Discord
    View profile
    Rep Power
    9
    its bc the npc cant attack you diagonally (aka it gets stuck when you are diagonal from it)
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    May 2020
    Posts
    23
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Yeah that's what I said.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 0
    Last Post: 01-06-2013, 12:58 AM
  2. Replies: 11
    Last Post: 02-26-2012, 01:36 AM
  3. Drop Packet
    By Andys1481 in forum Help
    Replies: 4
    Last Post: 01-09-2009, 09:14 PM
  4. Remove Seperate Items (Drop Packet)
    By KrisPizer in forum Tutorials
    Replies: 7
    Last Post: 07-15-2008, 03:23 PM
  5. Packet Handling Dropping
    By × Zenzie × in forum Tutorials
    Replies: 18
    Last Post: 12-16-2007, 07:18 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •