Page 1 of 1

[Solved] Maniascript / MLScript Heavy treatements?

Posted: 14 May 2015, 08:35
by Darkminus
Hello!

I've recently updated my Arena Duel script.
Everything is ok in local, all the features I added work.
However when I run the same script on the dedicated, it instantly "crashes" my dedicated server after warmup.
(CPU => 100%...) There are no error in logs.
In game nothing answers, snapshot explodes, chat still works but with a very high delay...

I mainly worked on layers so I think this is manialink/mlscript related.

I added things like Manialink anim library, and CustomUI library.
I also added a layer to manage custom persistent data, I constantly read. (I use it to draw a custom interface on demand)

I really don't know what is the problem, it's really hard to debug, as it work perfectly in local...

Anyone knows what kind of things in Maniascript/MLScript could cause that kind of issue?

Thank you in advance for your answers :thx:

Re: Maniascript / MLScript Heavy treatements?

Posted: 14 May 2015, 09:58
by novationx
Cant help you, but im interested in hearing more about the update :D :D

Re: Maniascript / MLScript Heavy treatements?

Posted: 14 May 2015, 23:20
by Darkminus
Hey,

I think I found the... "problem"

I use CustomUI.Script.txt (8 custom modules) :
=> 3 Layers using CustomUI::InjectMLFullScript();
=> 2 Layers using CustomUI::InjectMLInit() and CustomUI::InjectMLLoop()

I also use Manialink Library (LibManialink_AnimLoop();) for 1 layer (to animate a gauge ratio)

It seems that both of these scripts calls cause a heavy CPU charge. Is it normal?

My server is a Kimsufi server on which I never had problems running multiple SM Servers before. I cannot believe that animations and customUI libs can cause this difference of CPU load with only one server running!


EDIT : Removing CusotmUI and Manialink calls changes the netrate from 30 to 60... It seems that there is something else causing problem...

Reading ClientUI could cause this?

Re: Maniascript / MLScript Heavy treatements?

Posted: 15 May 2015, 20:26
by Darkminus
Hello again! :)

I found what the problem really was. I feel stupid but.. It was a bad use of Layers library.

Lesson: NEVER use Layers::Update() in a playloop :lol:

Problem solved. :)