ManiaLive 2 r321

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

Moderator: NADEO

Post Reply
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

ManiaLive 2 r321

Post by The_Big_Boo »

A new version (again ^_^).

Among a few bug fixes and a few tiny enhancements, the main change is the "Threading" system. It has been entirely cleaned and refactored to be easier to use. Instead of explaining what are the differences, here is how to use it now:
- create classes implementing \ManiaLive\Threading\Runnable interface for each task to be done by a thread
- get the instance of \ManiaLive\Threading\ThreadHandler
- create a thread with launchThread() method which will give you a unique threadId.
- pass commands to the ThreadHandler with addTask() which takes 3 parameters (the threadId given to you earlier, the Runnable object and an optional callback)
- when you don't need a thread anymore (usually when your plugin is unloaded), call killThread() with the threadId

Threading configuration had a few changes too:
- no more pingTimeout (no more pings at all actually)
- a new setting, maxTries, to set how many times a command should be tried before being discarded (if this command make the thread crashing or timing out, it will be tried again)

Standard plugins using threading have also been updated.

Files are downloadable here:
ManiaLive2
Standard plugins


Edit: some quick fixes done, version is now 321.
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
Fadden
Posts: 181
Joined: 10 May 2011, 18:21

Re: ManiaLive 2 r318

Post by Fadden »

It works fine to display a window for all players :D

But I have problems to stop Manialive.
The command "./run --stop" only removes the .pid file, but doesn't kill the process. And kill command can't kill the process, I have to use kill -9.
Screen : http://nsa21.casimages.com/img/2012/01/ ... 813555.jpg
Elle est où la poulette ?
svens
Posts: 97
Joined: 15 Jun 2010, 11:06
Location: Bern, CH
Contact:

Re: ManiaLive 2 r318

Post by svens »

You shouldn't run ManiaLive as root. (That's not your problem, but really good advice. Trust me on this one.)
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: ManiaLive 2 r318

Post by The_Big_Boo »

Fadden wrote:But I have problems to stop Manialive.
The command "./run --stop" only removes the .pid file, but doesn't kill the process. And kill command can't kill the process, I have to use kill -9.
I think I know the problem, I'll make some tests tomorrow.

Edit: it's fixed on the svn but now there is bug when exiting while using TeamSpeak plugin without a TS server (thanks to the TS framework which doesn't care about good practices with destructors...)
Anyway, I won't make a new release for this (as it's not critical) so you can either grab the new AbstractApplication.php (in ./libraries/ManiaLive/Application) or just add "declare(ticks=1);" in it at line 39 (with the pcntl_signal() calls)
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
Fadden
Posts: 181
Joined: 10 May 2011, 18:21

Re: ManiaLive 2 r318

Post by Fadden »

Thanks ;)

I noticed something strange : when I display something next to the bottom of the screen, it seems more pale, a little blured :
Screen : http://nsa21.casimages.com/img/2012/01/ ... 324969.jpg
It's the same code at two different Y position : -5 and -85.

Here's a sample of code for testing, I used it to make the screen above :

Code: Select all

<?php
namespace ManiaLivePlugins\Fadden\Test;

use ManiaLivePlugins\Fadden\Test\Gui\Widgets\WidgetTest;

class Test extends \ManiaLive\PluginHandler\Plugin
{
	function onReady()
	{
		$this->registerChatCommand("m", "displayTheWidget", 1, true);
	}
	
	function displayTheWidget($login, $posy)
	{
		 $widget = WidgetTest::Create($login);
		 $widget->setPosY($posy);
		 $widget->show();
	}
}
?>

Code: Select all

<?php
namespace ManiaLivePlugins\Fadden\Test\Gui\Widgets;

use ManiaLib\Gui\Elements\Label;
use ManiaLib\Gui\Elements\Bgs1InRace;

class WidgetTest extends \ManiaLive\Gui\Window
{	
	protected $background;
	protected $texte;
	
	function onConstruct()
	{
		$this->background = new Bgs1InRace();
		$this->background->setSubstyle(Bgs1InRace::BgList);
		$this->background->setSize(25, 6);
		$this->background->setPosition(88, -84.5, 1);
			$this->addComponent($this->background);
		$this->texte = new Label();
		$this->texte->setSize(20, 4);
		$this->texte->setPosition(100, -86.5, 2);
		$this->texte->setTextColor('FF0');
		$this->texte->setTextSize(1);
		$this->texte->setHalign('center');
		$this->texte->setText("The Texte");
			$this->addComponent($this->texte);
	}
	
	function setPosY($posy)
	{
		$this->texte->setPosY($posy);
		$this->background->setPosY($posy+2);
	}
	
	function onDraw()
	{}
}
?>
I think it's correct...

This problem (not very important I know^^), happens too with r305 but not with r273.

EDIT : Another thing, unrelated to the previous problem but still with the code above : When I use the command "/m 0", Manialive says the number of parameters is not correct... (but "/m 00" works)
Elle est où la poulette ?
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: ManiaLive 2 r321

Post by The_Big_Boo »

Both are fixed, version is now r321.
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
Fadden
Posts: 181
Joined: 10 May 2011, 18:21

Re: ManiaLive 2 r321

Post by Fadden »

Thanks :thumbsup:
Elle est où la poulette ?
nocturne
Posts: 208
Joined: 23 Jun 2010, 21:31

Re: ManiaLive 2 r321

Post by nocturne »

Is this a beta release..? Or a final..? Judging by the fact that every single time a release is made, there is instant evidence of a glaring oversight which needs to be immediately addressed by another release.. perhaps you should just stick to beta-only releases until you get it figured out.

Things have already gotten bad enough for us on the MLEPP team -- we can barely get the chance to implement any new features before you guys just go changing things for the point of changing things. Absolutely no new features, no improved performance or stability -- just changes for the hell of it.
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: ManiaLive 2 r321

Post by The_Big_Boo »

nocturne wrote:Absolutely no new features, no improved performance or stability -- just changes for the hell of it.
Threading performance and reliability have been improved a lot:
- now a thread locked into an infinite loop will be killed (instead of polluting system because it was the case before)
- less sql queries, 2 tables instead of 3, less fields but same features
- no more "ping" commands which sometimes caused a thread to be killed even if running normally
- commands aren't lost anymore when a thread dies or times out
- commands aren't lost anymore when sent without specifying the threadId but there were no threads started

New features ?
- a command can now be tried again by a thread which dies or times out because of it (before it was just lost, or even if the result was finally set in database, the callback was never called)
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
Fadden
Posts: 181
Joined: 10 May 2011, 18:21

Re: ManiaLive 2 r321

Post by Fadden »

Is a Dedimania plugin planned as for Manialive 1 ?


At the launch of Manialive, it could be useful to have the version of each plugin after his name, no ?
Elle est où la poulette ?
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 1 guest