The online racing simulator
Searching in All forums
(976 results)
MadCatX
S3 licensed
Quote from Scawen :That problem with the timer going backwards seems to cause more problems than just InSim timing out. It could affect anything time related across the whole program, and apparently does :

http://bugs.winehq.org/show_bug.cgi?id=7710 (see comment 4)

So a quick fix isn't the thing to do, I need to consider carefully how to make LFS deal cleanly and safely with large forward and backward leaps in time reported by the operating system.

That is on my list but at the moment I'm concerned by how the B3 host could have got into that bugged state that doesn't allow anyone to join.

I believe I managed to fix this in WINE. It's not pretty but it should make the GetTickCount() and timeGetTime() (as far as I've gathered WINE doesn't differentiate between these functions) behave. If anybody is willing to test it and has positive results with it, I'll consider cleaning the patches up and trying to get them upstream.

BTW, during testing I encountered a rather peculiar behavior of sound. When the system clock was set backwards, all sound in LFS stopped and it wouldn't come back until the system clock reached the time when I set the clock to past. Is this a glitch in LFS or are the some more WINE fixes to be done? Other than that everything was OK, no InSim timeouts or freezes.

To apply the patches grab the latest WINE source, cd into its directory and run

patch -p1 < (name of the patch file)

for both files.
MadCatX
S3 licensed
Quote from AnakinSkywalker :We have never seen Scawen as active for several years. That's great. :woohoo:

Actually we have, about a year ago when 0.6B was due to be released. Stop kidding yourself that you've done anything to be proud of...
MadCatX
S3 licensed
This mod sends hardware commands through ForceFeedback object, if Force Feedback isn't enabled, LFS most likely doesn't create one. Try enabling Force Feedback in LFS.
You should see lines beginning with DIEFF> in the debugging output. If you can't see them even with FFB turned on, then there must be another problem...
MadCatX
S3 licensed
Quote from chucknorris :When the system-time goes backwards (i.e. due to ntp updates), the Insim is detected as timed-out. That problem only exists under Wine. Windows uses a counter that can only go forward, even if the time changes.

This appears to be a WINE issue because WINE gets system time rather incorrectly. I might be able to hack together a quick patch if you can build WINE yourself from the source...
MadCatX
S3 licensed
Quote from chucknorris :I'd like to load it on TC's servers but I crucially need the Insim-timeout fix under Wine or hell will break lose here. Can't be bothered to fiddle in the machine code again and again.

There is an InSim issue when LFS runs through WINE? I've never encountered that... Are there any more details available on this? I'd like to take a look at it.
MadCatX
S3 licensed
There is a Force Feedback switch in Options->Controls->Axes/FF, is it set to On or Off? Anyway, here's a modified version 1.05 with slightly adjusted logging and a fix for a possible crash.

EDIT: File removed
Last edited by MadCatX, .
MadCatX
S3 licensed
This is somewhat confusing. Were you actually on the track when you captured this debug info or did you just launch LFS and closed it as soon as it loaded? The are some unusual things in the log, do you have Force Feedback enabled in LFS and is it working?
MadCatX
S3 licensed
Yep.
MadCatX
S3 licensed
Nice find! Telehash might be exactly what we need. Although the existing implementations look a bit incomplete (at least the C one), some sort of DHT network could be a way to go. However, before we go ahead implementing the all the network-specific bits I think we have a bigger fish to fry.

Even the best distribution system is not gonna be any good if it distributes wrong data. I'm not a fan of discussions where people just enumerate possible problems expecting someone else to solve them, so here's my partial vision how a global ban system could work.

PROBLEM: Master ban by LFS world.
SOLUTION: Rather simple. Do not really ban the offenders, just kick them as soon as they connect. The slightly higher overhead and a bit of a nuisance for the other players on the server in a form of the "xxx has connected" message is a small price to pay. It's not like an actually banned user cannot try to DoS a server by retrying to connect over and over again.

PROBLEM: Shall ban be a really global thing? Wouldn't that cause a mayhem all across the network?
SOLUTION: Yes, I think it would. There are different types of servers run by different admins, so a truly global system won't work very well. I suggest a form of subscription. Each server will have an UUID and admins will choose which servers are they going to accept bans from. If a ban is refused by a server, it will still be passed along to the other peers (obviously). There should also be a possibility to accept all incoming bans if someone really wanted to embrace the power of the banhammer.

PROBLEM: How shall a ban be revoked?
SOLUTION: This is IMHO a more difficult question. Imagining a ban spreading throughout the network is easy, but how about the situation when a ban is revoked? One way to handle this would be to not transmit such info at all, but this is far from ideal. For instance, what if a server where a ban had been revoked received this ban again from another peer? Should there be a database of active and revoked bans just because if this? If so, how long should the revoked bans be kept in the database? What about the unjust bans? Even is such a ban is lifted on one server, the unlucky user will still be banned elsewhere. It would seem that silent revocations are not the way. Let's say that servers transmit information when a ban is revoked prematurely. Imagine a situation where a guy is banned on server A. Servers B, C and D subsribe to server A and ban the offender too. Unfortunately, server C admin is offender's friend, so he removes the ban on is server. Because all servers in question subscribe to each other, the global ban is gone. Maybe if the ban info contained UUID of the server where the ban originated it could help a bit. Situations where a peer receives revocation info before ban info would also have to be handled.

Of course I'm opened so suggestions and criticism Once these questions (and most likely a lot of others I didn't think of) are resolved, I'm willing to put together a demo solution to test the system in practice...
MadCatX
S3 licensed
Do you need to use the runleds helper app? Unless you meet the conditions mentioned in the README, the mod works perfectly without it. Could you attach the debugging output?
MadCatX
S3 licensed
Quote from F1 mainiac :As i said I did everything ... maybe I have missed something but I don't know what is it

That is why you have to describe exactly how you set the mod up. "Everything" is not any helpful description. Are you sure you have OutGauge Mode set to 1 or 2 and OutGauge port set to a number in range 1024 - 65535?
MadCatX
S3 licensed
And what exactly did you do? How did you install and run the mod? Did you enable OutGauge?
MadCatX
S3 licensed
Quote from Sobis :I'm bored, so... What is NULL pointer? I've heard it's something about errors or something like that..

Computer memory is divided into small chunks, usually 1 byte long. Each such chunk has a unique address ranging from 1 up. Programmer can use this address to access data stored in the memory.
Many computer languages have a data type called a pointer. This data type is designed to store memory address. When a programmer creates a pointer, he usually sets its value to 0 (NULL) to indicate that it's not pointing to anything yet. If he then fails to assign some address to the pointer before he uses it in a program, the program crashes. This has been quite common cause of crashes for years, especially in languages with fully manual memory management like C.
MadCatX
S3 licensed
I was really hoping to come up with something less embarrassing, but implementing all this turnen up to be a bit more painful that I expected. As of now it doesn't really do anything useful, but it can catch a banned player in LFS and pass this information along to other peers.

I believe that the design is modular enough to implement communication over Gossip protocol (I'd love to make this compatible with Thor-Mjolnir system), all kinds of local storage (text file, SQL, whatever) etc. The peer-to-peer communication is implemented through OpenSSL, so verification and encryption should be easy to add later.

Bear in mind that this is more of a "how I think it could be done" kind of demo. It's pure C++11 with OpenSSL, but it currently won't build on Windows (changing #define CIS_LINUX to CIS_WINDOWS /cinsim.h/ and replacing pselect() with select() /insslconnection.h/ should get this sorted though).

@TAA: I've been thinking about the master-banning problem and I guess one way to at least reduce this possibility would be to introduce ban "severity". Admins would then choose what level of severity will result in autoban on their server. Maybe some sort of "time-to-live" property could be used too, for instance the more peers "away" the ban origines, the less "credible" is considered (hope you know what I mean )
IMHO a global ban system needs to be something more complex than a web of banned usernames.
MadCatX
S3 licensed
It's almost ashaming to see how much can be done with so little code using node.js Nice job

Anyway, how much hacking would it require to write an independent Mjolnir client without the use of node.js? I'm kinda anxious to try out some C++11 magic in a real project and this sounds like something I'd enjoy doing.
MadCatX
S3 licensed
Any game that uses functions from LogiControllerProperties class needs the Profiler to be running to work. Logitech SDK will launch the Profiler automatically if required. The older version of the SDK notified the Profiler via SendMessage(), the newer version probably has the Profiler monitor the changes somehow. This is valid for SDK 1.00.002

LogiControllerProperties.h

...
namespace LogitechSteeringWheel
{
// If your game does not use any of the functions in this class, you
// may set following value to FALSE to keep Logitech Gaming Software
// from getting started unnecessarily.
CONST BOOL START_LOGITECH_SOFTWARE = TRUE;
...

LogiControllerProperties.cpp

ControllerProperties::ControllerProperties(HWND hwnd)
...
// Check Logitech Gaming Software version
ZeroMemory(&m_wingmanVersion, sizeof(m_wingmanVersion));
if (SUCCEEDED(m_gamingSoftwareManager.GetWingmanSWVersion(m_wingmanVersion)))
{
if (m_wingmanVersion.major == 5 && m_wingmanVersion.minor >= 3
|| m_wingmanVersion.major > 5)
{
m_currentVersionSupportsGetSetProperties = TRUE;
}
...
// Start Wingman gaming software if necessary
if (START_LOGITECH_SOFTWARE)
{
if (!m_gamingSoftwareManager.IsEventMonitorRunning())
{
// Only start event monitor if it supports getting and setting properties
if (m_currentVersionSupportsGetSetProperties)
{
m_gamingSoftwareManager.StartEventMonitor();
m_hadToStartEMon = TRUE;
}
}
}
...

When the Profiler is autolaunched like this, it's passed "/noui /force" parameters which could explain why you though it wasn't running.
MadCatX
S3 licensed
For instance games that adjust the wheel's range through the Logitech API make a call to the Profiler. I'm too lazy to skim through the APIs source for concrete examples...
MadCatX
S3 licensed
I didn't give it much thought, but what about a sort of peer to peer system where servers would share and exchange their databases of bans? An admin would pick a list of servers he'd like to get the ban info from and some tool would periodically query those servers for updates.
There could also be a central server (kinda like BT tracker) which would list all the servers operating within this system. Such a system would have the obvious advantage of being dependent on pretty much one computer at the expense of using more resources on the peers' side.
MadCatX
S3 licensed
Are we talking about the same thing here? I was referring to the ambiguity of the English word "once" which in this context can mean "when" or "one time". I believe this explains my initial confusion
MadCatX
S3 licensed
Because in 99 % cases you don't need it, yet Logitech designed their drivers so that it has to be running for the wheel to be fully functional.
MadCatX
S3 licensed
Quote from E.Reiljans :so?
Registry is made for specific purpose - storing installation & configuration data of apps. Apps use it for exactly that.

I think she's more concerned about all the crap like the Profiler that comes with the drivers. OTOH, installing the driver the usual way and removing all the LG ballast from autostart is a better idea than a manual installation.
MadCatX
S3 licensed
Crash confirmed, it looks like LFS hits a NULL pointer there...

EDIT: It only seems to be happening in the in-car view. I tried to reproduce the problem in the top-down view and it worked, as soon as I switched back to the in-car view I got the crash.
Last edited by MadCatX, .
MadCatX
S3 licensed
A mod developer with hacking intentions could easily lock LFS, make the user re-enter the password and get around any kind of encryption that way. Plus if LFS were to encrypt the GAME password (it really should that), it should use some real hashing algorithm.

I really appreciate that you went through the trouble of investigating this and sharing your findings (a link to the malicious mod might be useful too), but shouldn't the real lessons to be learned here be
- Use ALL mods containing executable content at your own risk
- If you use such a mod, at least try to find one that is opensource
?
MadCatX
S3 licensed
I don't think it's a good idea to install Logitech software like this. Only God knows how tied together the drivers and the additional tools are, so there's good chance you'll get a half-functioning wheel. Anyway...
These go to WINDIR\system32 on 64bit Windows. Make sure you don't overwrite anything that might be there already. The Control Panel setup tools might not be available (and it might eat your cat).
MadCatX
S3 licensed
Quote from DarkKostas :There is no need about that. If you CurrentRPM is > than DefinedMaxRPM then leds are flashing

The phrasing of his question was a little ambiguous. I thought he asked about the possibility of making the LEDs flash just once when the engine reaches the redline. The flashing is totally out of programmer's control which would make this request somewhat difficult to fulfill.
FGED GREDG RDFGDR GSFDG