ManiaLive 3.1.0

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

oliverde8
Posts: 1323
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: ManiaLive 3.1.0

Post by oliverde8 » 03 May 2014, 20:46

The_Big_Boo wrote:
oliverde8 wrote:Edit : we never used to have this problem before MP3 and we had nearly a 100 players a few times.
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.

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 ;)
Thanks a lot, :D 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.

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);
but I don't think it is the way to go and I was short of simple ideas that don't result in making loops on stuff that throws exceptions XD
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

User avatar
The_Big_Boo
Posts: 1041
Joined: 15 Jun 2010, 15:46

Re: ManiaLive 3.1.0

Post by The_Big_Boo » 03 May 2014, 21:22

oliverde8 wrote: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 don't have any issue even with adding this kind of code (except one because of calling onPlayerConnect each loop ^^)

I'm using this simple window:

Code: Select all

class Test extends Window
{
	function onConstruct()
	{
		$ui = new Elements\Xml('<quad sizen="40 40" bgcolor="f00"/>');
		$this->addComponent($ui);
	}
}
And I made different tests at the begin of onPreLoop():

Code: Select all

$this->onPlayerConnect('whatever', false);
$w = Test::Create();

$w->show();
-----
$w->show('whatever');
-----
$w->show();
$w->hide('whatever');
Everytime it works without any exception and I'm seeing the window as expected. I also try a raw call to sendDisplayManialinkPage() and even if some of the given logins failed, the others are seeing the window.


Are you sure you have the right lines 329 and 330 in GuiHandler (with the recent patch adding the array_intersect)? Because that's the only reason I can think of at the moment :?
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310

oliverde8
Posts: 1323
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: ManiaLive 3.1.0

Post by oliverde8 » 03 May 2014, 21:28

hmm I will recheck tomorrow I was pretty sure I had them :S when did 't I had worse problems XD
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

oliverde8
Posts: 1323
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: ManiaLive 3.1.0

Post by oliverde8 » 04 May 2014, 09:15

So I have retried this morning with your manialive-lib,

If I do this

Code: Select all

		$w = Test::Create();
		$w->show();
		
		if(!$this->connected)
		    $this->onPlayerConnect('whatever', false); 
I have login unknown error but the manialink is sent fine, I can't reproduce it again :shock:
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

User avatar
The_Big_Boo
Posts: 1041
Joined: 15 Jun 2010, 15:46

Re: ManiaLive 3.1.0

Post by The_Big_Boo » 04 May 2014, 09:39

Actually you shouldn't even get the login unknown exception :?

Can you please try to do the following around the multicall and send me the info log file?

Code: Select all

		try
		{
			$this->connection->executeMulticall();
		}
		catch(\Maniaplanet\DedicatedServer\Xmlrpc\LoginUnknownException $e)
		{
			\ManiaLive\Utilities\Logger::info($playersOnServer);
			\ManiaLive\Utilities\Logger::info($playersHidingGui);
			\ManiaLive\Utilities\Logger::info($playersShowingGui);
			\ManiaLive\Utilities\Logger::info($showing);
			\ManiaLive\Utilities\Logger::info($hiding);
		}
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310

oliverde8
Posts: 1323
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: ManiaLive 3.1.0

Post by oliverde8 » 04 May 2014, 10:03

Since I merged everything I can't reproduce it :S just tried on the older version and there is an error. So probably did an error while merging something before/

So I suppose we can say fixed, thanks a lot :thumbsup: and sorry :oops:
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

oliverde8
Posts: 1323
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: ManiaLive 3.1.0

Post by oliverde8 » 03 Apr 2016, 11:58

Hi,

We are still having some issues with the Gui Handler, Basically we have a LoginUnknown errors and probably some size issues with our Manialinks.

Login issues
What is happening is onBeginMap we display nearly all the widgets. And there is a ton of them with a lot of Maniascript. So when onPreLoop Manialive tries to display the widgets quite some time has passed and some users for whom we have created widgets has disconnected. Therfore the

Code: Select all

$playersOnServer   = array_merge(Storage::keys(Storage::getInstance()->players), Storage::keys(Storage::getInstance()->spectators));
is not correct anymore at one point. because when we actually start doing the sendDisplayManialinkPage that user might not be there anymore. So we have a UnknownPlayerException

This I believe we have fixed by detecting the error during the multi execution & repeating the execution for each login indiviually. I know performance wise this is baaaaad

Sizeissues
The second error was to big xml, as we have all the records stored in the local records widget the widget is quite big. And when sending all of them in one xml it was to big for the dedicated server. We have worked out some grouping and fixed that as well.

But we still have missing widgets. The issue happens only when there are many players on the server. And I can't reproduce it on my servers with fake players.

So we are desperate with reaby because we are not sure we understand from where comes the issue. Even on the servers where it does happen it only does time to time.

Here is our version of the Gui Handler : https://github.com/eXpansionPluginPack/ ... andler.php

Thanks,
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

User avatar
w1lla
Posts: 2365
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: ManiaLive 3.1.0

Post by w1lla » 03 Apr 2016, 12:49

Seems to me the player when disconnected is never erased from manialive.

See: https://github.com/eXpansionPluginPack/ ... e.php#L186
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs

oliverde8
Posts: 1323
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: ManiaLive 3.1.0

Post by oliverde8 » 03 Apr 2016, 12:57

No they are :
https://github.com/eXpansionPluginPack/ ... e.php#L135

The issue with players only happens when the server slow down to much.
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...

User avatar
w1lla
Posts: 2365
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: ManiaLive 3.1.0

Post by w1lla » 03 Apr 2016, 13:10

Just wondering then why the GBXRemote limit values have changed, as it seems to me that the value of GBX/Dedicated was changed for some reasons.

Edit: It was with the first release of the dedicated 400Ko x nb players.

Source: viewtopic.php?f=261&t=8599&start=30#p88019
increased the XmlRpc maximum packet size To 1Mo to support the now bigger maps. (but note that while it's convienient to shove the maps though this communication channel, it's not really optimal... And that very big maps with many ghosts and such, still won't fit.)
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs

Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 2 guests