Thanks a lot, so we had a hidden problem XD. well reproducing the error has been a problem. The only way I could do it was with changing the code.The_Big_Boo wrote:That's actually because my version of dedicated-api library has a feature the old one hadn't: if you use multicall but there's only a single request pending, it sends the request directly (without multicall encapsulation) thus any fault sent back by the server generate an exception. With the multicall encapsulation, exceptions aren't created (because the answer is an array which may contains faults instead of a fault) but it doesn't mean everything was fine.oliverde8 wrote:Edit : we never used to have this problem before MP3 and we had nearly a 100 players a few times.
Anyway, I'll look into it but if you can give me an easy repro, that would really help me ^^
Edit: btw, when a player disconnects, the GuiHandler is already doing the Window::Erase($login) so you don't need it
At the begining of the onPreLoop I added a call to PlayerConnect of Gui Handler and a plugin with a static instance to ask it to create a window on Null. When I do this the onPreloop starts with a player that doesn't exist and the effect is the same, the window isn't shown for me also, I am not sure if this is exactly what happense in reality but is what I came the closest to reproduce something.
I also replaced on our las version the final loop with :
Code: Select all
// Final loop to send manialinks
$failed = false; //Did it work
$multiCall = true; //If problem we will need to disable it
do{
$nextIsModal = false;
foreach($stackByPlayer as $login => $data)
{
Manialinks::load();
foreach($data as $toDraw)
{
if($nextIsModal) // this element can't be anything else than a window
{
$this->drawModal($toDraw);
$nextIsModal = false;
}
else if($toDraw === self::NEXT_IS_MODAL) // special delimiter for modals
$nextIsModal = true;
else if(is_string($toDraw)) // a window's id alone means it has to be hidden
$this->drawHidden($toDraw);
else if(is_array($toDraw)) // custom ui's special case
{
array_shift($toDraw)->save();
foreach($toDraw as $customUI)
$customUI->hasBeenSaved();
}
else // else it can only be a window to show
{
$this->drawWindow($toDraw);
}
}
try{
$this->connection->sendDisplayManialinkPage(((string) $login), Manialinks::getXml(), 0, false, $multiCall);
}catch(\Maniaplanet\DedicatedServer\Xmlrpc\LoginUnknownException $ex){
\ManiaLive\Utilities\Console::println("[ManiaLive]Attempt to send Manialink to $login failed. Login unknown");
\ManiaLive\Utilities\Logger::info("[ManiaLive]Attempt to send Manialink to $login failed. Login unknown");
}
}
try{
if($multiCall){
$this->connection->executeMulticall();
}
$failed = false;
}catch(\Maniaplanet\DedicatedServer\Xmlrpc\LoginUnknownException $ex){
\ManiaLive\Utilities\Console::println("[ManiaLive]Attempt to send Manialink to a login failed. Login unknown");
\ManiaLive\Utilities\Logger::info("[ManiaLive]Attempt to send Manialink to a login failed. Login unknown");
$multiCall = false;
$failed = true;
}
}while($failed);