The online racing simulator
unable to extract the latest version, tried on two computers using winzip and winrar

edit: nvm, downloaded from github
i will post it asap... i am really sick so... not sure when i will be able to post it
Quote :^7^1CG^7Ö^4╗^3nl2dav ^7: ^8!prism buttons
IS_MCI Packet from gtr.
IS_MCI Packet from gtr.
IS_MSO Packet from gtr.
TCP ERROR : WOULDBLOCK
TINY_NONE Packet from gtr.
IS_MCI Packet from gtr.
IS_MCI Packet from gtr.
IS_MCI Packet from gtr.
IS_MSO Packet from gtr.
Lost connection to ^1CG^7Ö^4╗^3nl2dav

This is what I meant in the other topic

---
Also happens when PRISM is the only InSim.

It's reproducible now on my server in LA.

Sometimes the LFS client says; Avoiding buffer crash (OK)
Attached files
ehr.mpr - 20 KB - 294 views
Your CPU usage spiking?
I think it is a case of to much to fast, the client can't handle it. I wonder if Victor wants to rate control packets that are sent to a single client, because I don't think the LFS server has this issue. This is Victor's module we are talking about here, so he would know much more about it then I would. Thank you for the mpr file cargame, it should be very helpful.
Quote from Dygear :I wonder if Victor wants to rate control packets that are sent to a single client, because I don't think the LFS server has this issue.

well the TCP ERROR : WOULDBLOCK message comes from LFS and means that its network send buffer is full and LFS can't add any more data to them.
So it's not a matter of prism doing rate control. Either LFS has to send too much data, too fast, or prism cannot process incoming data quickly enough.
It's therefore imperative that all the plugin code of prism be as quick as possible. Add too much slow code and the chances of prism having trouble keeping up will increase.
I'm not saying the code is slow right now - I don't really know as I've hardly used any plugins. But I know the network code and it gets one packet and then sends it off to prism's plugin code. So I mean to say, it handles one packet at a time and while the plugin code runs, the whole of prism stalls. It's a one threaded process, so code must be quick. No slow db queries, no long loops or heavy calculations should be done.
Just a few tips
But of course, if the plugin code is fast enough, then LFS may have a problem. But it's unclear to me what cargame is trying to do. The only time I've found LFS having trouble sending data fast enough is when sending MCI data at 20pps while seeking in a replay.

edit - fyi, in the case of prism really sending too much data to LFS, there's already a failsafe for that built into prism. Prism will buffer the overflowed data and try to send it at a later time. It's the same mechanism that allows for lagged hosts / clients to remain connected (up to a point).
It seems that the end user that is calling the command is losing the connection. Could it be that PRISM is sending to many packets to that one client and causing that client to be over whelmed and time out? Should the LFS Server not handle this by it's self, making sure that a client can handle the load that is being sent to it via the InSim packet interface?
!prism buttons is a default plugin at the moment to demonstrate an array of buttons with colors across the screen. I didn't alter the plugin in any way.

The LFS client starts to build the array... I see it coming up.. But after a few buttons it immediately cuts of connection.

The strange thing is that it runs on my server in Europe without a problem but the server in LA does let the network connection crash. So this almost suggests its server configuration dependable what I do not completely understand. Too large TCP frames, too fast, too many data? I have no idea.

What happens if 40 connections are active instead of only me. Those kind of things worry me a bit. It shouldn't be possible to let a network connection crash in my opinion. Or, in some cases "LFS has stopped working" situations which occurred on the 'normal' servers with sometimes 20 different racers experiencing that at the same time. There are some bugs in the InSim handling of the LFS client, I'm sure of that. Can do two things, wait on Scawen to fix it, or try to prevent these problems
Lets talk a bit more about stability;

Quote :^7{S^J^1¤^7} Pilot ^4X^8 pitted
IS_PLP Packet from gtr.
PHP NOTICE:
Undefined offset: 31 in F:\php\PRISM033\modules\prism_statehandler.php on line 287
1 :: onPlayerPits in F:\php\PRISM033\modules\prism_statehandler.php:48
2 :: dispatchPacket in F:\php\PRISM033\modules\prism_hosts.php:504
3 :: inspectPacket in F:\php\PRISM033\modules\prism_hosts.php:437
4 :: handlePacket in F:\php\PRISM033\modules\prism_hosts.php:308
5 :: checkTraffic in F:\php\PRISM033\PHPInSimMod.php:225
PHP Fatal error: Call to a member function onPitGarage() on a non-object in F:\php\PRISM033\modules\prism_statehandler.php on line 287

Fatal error: Call to a member function onPitGarage() on a non-object in F:\php\PRISM033\modules\prism_statehandler.php on line 287

Hhmmokay
Two questions

1) Does !prism time work? In my opinion it's not?

2) Why does LFS say host: test, prism cmdname

after I do this;

$MSX = new IS_MSX;
$MSX->Msg('test, '.$UCID)->Send();

Where is my UCID
Quote from cargame.nl :Two questions

1) Does !prism time work? In my opinion it's not?

I have no idea, I'll look into it.

Quote from cargame.nl :2) Why does LFS say host: test, prism cmdname

after I do this;

$MSX = new IS_MSX;
$MSX->Msg('test, '.$UCID)->Send();

Where is my UCID

Your going to have to give me some context to this code. It all depends on where it is.
PRISM - PHP [R] InSim Mod.
  • Rugged
  • Robust
  • Reliable
  • Rapid
  • Race
PRISM - Phinely Refactor InSim Management.
PRISM - Plugin Repository of InSim Machines (AMX = Abstract Machine eXecutive).


Version 2.0 - C++ Targeted at Routers (Really the DD-WRT Firmware, as a Plugin).
would it be possible to get PLID from GetClient(or player)ByUCID?? I need this to do a function of cruise if not, can it be added? Or a way to get a users X:Y location
Quote from T3charmy :would it be possible to get PLID from GetClient(or player)ByUCID?? I need this to do a function of cruise if not, can it be added? Or a way to get a users X:Y location

Plugins::getPlayerByPLID(&$PLID, $hostID = NULL)
Plugins::getPlayerByUCID(&$UCID, $hostID = NULL)
Plugins::getClientByPLID(&$PLID, $hostID = NULL)
Plugins::getClientByUCID(&$UCID, $hostID = NULL)

These are all in the current version.
Quote from Dygear :
Plugins::getPlayerByPLID(&$PLID, $hostID = NULL)
Plugins::getPlayerByUCID(&$UCID, $hostID = NULL)
Plugins::getClientByPLID(&$PLID, $hostID = NULL)
Plugins::getClientByUCID(&$UCID, $hostID = NULL)

These are all in the current version.

not that i have seen? =/ i did a var_export and i saw nothing of a PLID or X,Y
Quote from T3charmy :not that i have seen? =/ i did a var_export and i saw nothing of a PLID or X,Y

I'll look into it. I am going to have to go over the state handler anyway, I've got a few missing functions that cargame reported a while ago.
i had it yesterday, but i cant find it again, how can i get the Track name? (AS5)
Quote from T3charmy :i had it yesterday, but i cant find it again, how can i get the Track name? (AS5)

The function can be found here,

<?php 
StateHandler
::getTrack();
?>

. Within a plugin, that should be

<?php 
$PRISM
->host->state[$PRISM->host->state->curHostID]->getTrack();
?>

but don't forget to make sure that the global $PRISM is within scope by doing

<?php 
global $PRISM
?>


.

And yes, I know that is pretty verbose to just get a track name, but I will be trimming that down into a simple $this->getTrack(); command soon from within a plugin. Don't be supprised if the first arg is the HostID so that you can get the current tracks from all of the hosts from within any plugin.
Quote from Dygear :The function can be found here,

<?php 
StateHandler
::getTrack();
?>

. Within a plugin, that should be

<?php 
$PRISM
->host->state[$PRISM->host->state->curHostID]->getTrack();
?>

but don't forget to make sure that the global $PRISM is within scope by doing

<?php 
global $PRISM
?>


.
.

PHP NOTICE:
Undefined property: PHPInSimMod::$host in C:\Documents and Settings\Admi
nistrator\Desktop\Just4Fun\PRISM 0.3.3\plugins\Cruise.php on line 366
1 :: Location in C:\Documents and Settings\Administrator\Desktop\Just4Fu
n\PRISM 0.3.3\plugins\Cruise.php:353
2 :: onMCI in C:\Documents and Settings\Administrator\Desktop\Just4Fun\P
RISM 0.3.3\modules\prism_plugins.php:168
3 :: dispatchPacket in C:\Documents and Settings\Administrator\Desktop\J
ust4Fun\PRISM 0.3.3\modules\prism_hosts.php:438
4 :: handlePacket in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\modules\prism_hosts.php:321
5 :: checkTraffic in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\PHPInSimMod.php:225
PHP NOTICE:
Trying to get property of non-object in C:\Documents and Settings\Admini
strator\Desktop\Just4Fun\PRISM 0.3.3\plugins\Cruise.php on line 366
1 :: Location in C:\Documents and Settings\Administrator\Desktop\Just4Fu
n\PRISM 0.3.3\plugins\Cruise.php:353
2 :: onMCI in C:\Documents and Settings\Administrator\Desktop\Just4Fun\P
RISM 0.3.3\modules\prism_plugins.php:168
3 :: dispatchPacket in C:\Documents and Settings\Administrator\Desktop\J
ust4Fun\PRISM 0.3.3\modules\prism_hosts.php:438
4 :: handlePacket in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\modules\prism_hosts.php:321
5 :: checkTraffic in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\PHPInSimMod.php:225
PHP NOTICE:
Trying to get property of non-object in C:\Documents and Settings\Admini
strator\Desktop\Just4Fun\PRISM 0.3.3\plugins\Cruise.php on line 366
1 :: Location in C:\Documents and Settings\Administrator\Desktop\Just4Fu
n\PRISM 0.3.3\plugins\Cruise.php:353
2 :: onMCI in C:\Documents and Settings\Administrator\Desktop\Just4Fun\P
RISM 0.3.3\modules\prism_plugins.php:168
3 :: dispatchPacket in C:\Documents and Settings\Administrator\Desktop\J
ust4Fun\PRISM 0.3.3\modules\prism_hosts.php:438
4 :: handlePacket in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\modules\prism_hosts.php:321
5 :: checkTraffic in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\PHPInSimMod.php:225
PHP NOTICE:
Undefined property: PHPInSimMod::$host in C:\Documents and Settings\Admi
nistrator\Desktop\Just4Fun\PRISM 0.3.3\plugins\Cruise.php on line 366
1 :: Location in C:\Documents and Settings\Administrator\Desktop\Just4Fu
n\PRISM 0.3.3\plugins\Cruise.php:353
2 :: onMCI in C:\Documents and Settings\Administrator\Desktop\Just4Fun\P
RISM 0.3.3\modules\prism_plugins.php:168
3 :: dispatchPacket in C:\Documents and Settings\Administrator\Desktop\J
ust4Fun\PRISM 0.3.3\modules\prism_hosts.php:438
4 :: handlePacket in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\modules\prism_hosts.php:321
5 :: checkTraffic in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\PHPInSimMod.php:225
PHP NOTICE:
Trying to get property of non-object in C:\Documents and Settings\Admini
strator\Desktop\Just4Fun\PRISM 0.3.3\plugins\Cruise.php on line 366
1 :: Location in C:\Documents and Settings\Administrator\Desktop\Just4Fu
n\PRISM 0.3.3\plugins\Cruise.php:353
2 :: onMCI in C:\Documents and Settings\Administrator\Desktop\Just4Fun\P
RISM 0.3.3\modules\prism_plugins.php:168
3 :: dispatchPacket in C:\Documents and Settings\Administrator\Desktop\J
ust4Fun\PRISM 0.3.3\modules\prism_hosts.php:438
4 :: handlePacket in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\modules\prism_hosts.php:321
5 :: checkTraffic in C:\Documents and Settings\Administrator\Desktop\Jus
t4Fun\PRISM 0.3.3\PHPInSimMod.php:225

Fatal error: Call to a member function getTrack() on a non-object in C:\Document
s and Settings\Administrator\Desktop\Just4Fun\PRISM 0.3.3\plugins\Cruise.php on
line 366

I think I'm going to have to get reacquainted with my code base. That should of worked. :/
Nah its there...

In statehandler onStateChange function;

$this->Track = $STA->Track;

Simple.
0.3.4 is going to be a bug fix release only. Not ETA.

FGED GREDG RDFGDR GSFDG