Jump to content
  • 0

Strange Problem With Loading Clans/clan Wars


eressea

Question

Hi,

 

on some machines I encounter this problem:

 

06/17/2016 04:36:05.828, [NO ERROR] JobType: 6 Duration: 30/30sec  
06/17/2016 04:36:05.828, Problem occurred in Loading Declared War
06/17/2016 04:36:35.827, [NO ERROR] JobType: 8 Duration: 30/30sec  
06/17/2016 04:36:35.827, Problem occurred in Loading Pledge [1]
06/17/2016 04:36:35.829, Problem occurred in Loading Pledge [2]
 
Tried to analyze what's wrong and I think it's related somehow to some IO threads, that don't execute as expected (it seems like there's some thing that prevents packets coming from cached to be processed). For time reasons, I stopped with this and wrote simple workaround involving some function hooking, mutexes and conditional variables, so all those operations run in threads which are fine and "bad" threads only wait on conditional variable until "alternative" thread finishes its work. So now everything loads fine:
 
06/15/2016 00:05:18.083, [NO ERROR] JobType: 6 Duration: 0/30sec  
06/15/2016 00:05:18.124, [NO ERROR] JobType: 8 Duration: 0/600sec  
 
Does anyone encounter the same problem? Did anyone come with a better solution (or at least better analysis)?
 
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

DB errors if i remember correctly  - that makes cached go hicky hicky once sending packets to l2server upon startup.

Verify ALL fields have correct data in the value-types their declared for said pledges in ALL pledge tables.

 

Nothing to do with internal network\memory.

 

...but i can only check over a week from now so.

Edited by mcbigmac
Link to comment
Share on other sites

  • 0

Hi,

 

I see no error in logs :( Are there any "silent" errors that don't show up in error log?

It's really strange because when I run the code in other thread, it runs fine:


void __cdecl Server::CPledgeInitPledge()
{
	for (;;) {
		Sleep(100);
		ScopedLock lock(pledgeInitCS);
		if (pledgeInitialized) {
			break;
		}
	}
	reinterpret_cast<void(*)()>(0x5F4EAC)();
}

void __cdecl Server::CDominionInitDominion()
{
	reinterpret_cast<void(*)()>(0x5EA29C)();
	reinterpret_cast<void(*)()>(0x7D831C)();
	ScopedLock lock(pledgeInitCS);
	pledgeInitialized = true;
}

...

WriteInstructionCall(0x6B24B9, reinterpret_cast<UINT32>(CDominionInitDominion));
WriteInstructionCall(0x6915D3, reinterpret_cast<UINT32>(CPledgeInitPledge));
NOPMemory(0x7D853E, 5);

and no errors are shown in L2Server...

 

Maybe it has something to do with running in virtual machine (but it does in both VirtualBox and KVM-QEMU)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • I use l2fandc files. I need a java code, I've been searching a lot and waiting for help. What I want to do is to teleport to the players doing pvp. So it's like finding the flag player. I found some files but they did not fit my system. I'm waiting for help..   EXAMPLE:     package handlers.bypasshandlers; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import com.l2jmobius.Config; import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.enums.ChatType; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.zone.ZoneId; import com.l2jmobius.gameserver.network.serverpackets.CreatureSay; /**  * @author Mobius (based on Tenkai pvpzone)  */ public class FindPvP implements IBypassHandler {     private static final String[] COMMANDS =     {         "FindPvP"     };          @Override     public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)     {         if (!Config.ENABLE_FIND_PVP || !target.isNpc())         {             return false;         }                  L2PcInstance mostPvP = null;         int max = -1;         for (L2PcInstance player : L2World.getInstance().getPlayers())         {             if ((player == null) //                 || (player.getPvpFlag() == 0) //                 || (player.getInstanceId() != 0) //                 || player.isGM() //                 || player.isInsideZone(ZoneId.PEACE) //                 || player.isInsideZone(ZoneId.SIEGE) //                 || player.isInsideZone(ZoneId.NO_SUMMON_FRIEND))             {                 continue;             }                          int count = 0;             for (L2PcInstance pl : L2World.getInstance().getVisibleObjects(player, L2PcInstance.class))             {                 if ((pl.getPvpFlag() > 0) && !pl.isInsideZone(ZoneId.PEACE))                 {                     count++;                 }             }                          if (count > max)             {                 max = count;                 mostPvP = player;             }         }                  if (mostPvP != null)         {             // Check if the player's clan is already outnumbering the PvP             if (activeChar.getClan() != null)             {                 Map<Integer, Integer> clanNumbers = new HashMap<>();                 int allyId = activeChar.getAllyId();                 if (allyId == 0)                 {                     allyId = activeChar.getClanId();                 }                 clanNumbers.put(allyId, 1);                 for (L2PcInstance known : L2World.getInstance().getVisibleObjects(mostPvP, L2PcInstance.class))                 {                     int knownAllyId = known.getAllyId();                     if (knownAllyId == 0)                     {                         knownAllyId = known.getClanId();                     }                     if (knownAllyId != 0)                     {                         if (clanNumbers.containsKey(knownAllyId))                         {                             clanNumbers.put(knownAllyId, clanNumbers.get(knownAllyId) + 1);                         }                         else                         {                             clanNumbers.put(knownAllyId, 1);                         }                     }                 }                                  int biggestAllyId = 0;                 int biggestAmount = 2;                 for (Entry<Integer, Integer> clanNumber : clanNumbers.entrySet())                 {                     if (clanNumber.getValue() > biggestAmount)                     {                         biggestAllyId = clanNumber.getKey();                         biggestAmount = clanNumber.getValue();                     }                 }                                  if (biggestAllyId == allyId)                 {                     activeChar.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, your clan/ally is outnumbering the place already so you can't move there."));                     return true;                 }             }                          activeChar.teleToLocation((mostPvP.getX() + Rnd.get(300)) - 150, (mostPvP.getY() + Rnd.get(300)) - 150, mostPvP.getZ());             activeChar.setSpawnProtection(true);             if (!activeChar.isGM())             {                 activeChar.setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_PVP_TIME);                 activeChar.startPvPFlag();             }         }         else         {             activeChar.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, I can't find anyone in flag status right now."));         }         return false;     }          @Override     public String[] getBypassList()     {         return COMMANDS;     } }
  • Topics

×
×
  • Create New...