The online racing simulator
Command line extraction of RAF from hotlap SPR
Quote from haelje :you are really sure, that for converting the lfs.exe is used ? i mean if there is the possibility to run the physics-calculation faster than it's done when rendering i s needed, why should it be done with a slow run (the new replay features work in the same way, there is only the physics calculated and that can be done faster)? at the end only victor can tell us, how it works technically and if this possibility could make it possible to separate the physics.calculation-step out of the lfs.exe.
(if something like this was written by him and i only didn't read it, then a BIG SORRY for my ideas )


if it is like this, then it is also usable by anybody

There is a command line option in the latest test patches to do an hlvc check and export a RAF file at 10 Hz.

I'm just providing this information so you can use it as it is, if you want to. I'm sorry but I don't have time to start adding options, such as allowing this for non-hotlap replays and changing the output frequency and whatever else you might think of. I just have too much to do before patch Z so I'll just tell you how it works right now, in case it is of any use to you.

You run LFS with a command line like this :

LFS /hlvc=replay_name

This will run a hotlap SPR replay_name.spr and export a RAF replay_name.raf to your raf folder, if the replay is validated correctly.

The return code from the exe will be one of :


HLVC_UNKNOWN, // 0 - unknown return value
HLVC_OK, // 1 - ok
HLVC_NOT_FOUND, // 2 - replay file not found
HLVC_FUTURE, // 3 - replay from later version
HLVC_OBSOLETE, // 4 - replay from obsolete version
HLVC_NOT_HOTLAP, // 5 - replay file not marked as a hotlap
HLVC_NOT_DEMO, // 6 - LFS not unlocked and track not available in demo
HLVC_NO_TRACK, // 7 - could not load track
HLVC_NO_HLVC, // 8 - no HLVC best lap in header
HLVC_CORRUPTED, // 9 - corrupted or invalid file
HLVC_OOS, // 10 - replay went OOS - probably hacked LFS
HLVC_NO_MATCH, // 11 - real lap time does not match lap time in SPR header
HLVC_FAIL, // 12 - HLVC violation - could be that HLVC rules changed
HLVC_END, // 13 - replay ended before best lap was finished

EDIT :
A bug in Y22 (discussed below) causes LFS to crash if you use the /hlvc command when antialiasing is enabled.
To use /hlvc, either disable antialiasing in graphics options or edit the cfg.txt and sent Antialiasing to zero.
Quote from Scawen :...

thanks a lot for that kind of preview information in my eyes it opens a path you will follow directing the usage of telemtry informations
i understand correctly, that i use the lfs.exe for that ? i tried and got an exception, perhaps this help:
Unhandled exception at 0x0055aeed in LFS.exe: 0xC0000005: Access violation reading location 0x00000000.

EDIT: my OS is a Vista64bit
Which version of LFS.exe are you using?
sorry for being so late with the answer, i use Y22-exe
I get exactly the same error on 32bit XP with Y22, it just crashes to desktop whenever I start with the command /hlvc=###, it doesn't matter what I put for the replay name.
works without problems on xp 64
return values are a bit unusual and troublesome for error codes in human controlled console apps though
Quote from haelje :sorry for being so late with the answer, i use Y22-exe

Somehow you got a crash in a part of the program that should not be called because this command runs a non-graphical exe. Your crash was trying to access a D3D device which was a NULL pointer.

I'd really like to know how that happened, which part of the program is not protected against getting to this point in a non-graphical instance, but I can't tell with just the crash address. Is it possible to get some call stack information so I know which functions called the function in which it crashed?

For example if you run drwatson before you start LFS it may store a call stack (at least the old versions did) or maybe there is a better way you know of?

I suspect this is not a Vista issue but something to do with your settings, so maybe it would be worth posting your cfg.txt file (first check it for any lines that contain peronal info / passwords and delete them). I could then try running with your slightly edited cfg file.

Quote from DarkTimes :I get exactly the same error on 32bit XP with Y22, it just crashes to desktop whenever I start with the command /hlvc=###, it doesn't matter what I put for the replay name.

Do you get the same crash address as haelje?

If you aren't getting an actual crash report then LFS is probably just making a fast exit, for any reason (see error codes above). Even if all is successful it usually takes only around 10 seconds to do a full hotlap export, depending on where in the replay the hotlap appears.
okay, here is the call stack. only to clear up: i can do the call of "LFS.exe /hlvc=xxx" in the standard command line ? if i start it this way a window like the dedicated server pops up and after that the crash happens.


> LFS.exe!0055aeed()
[Frames below may be incorrect and/or missing, no symbols loaded for LFS.exe]
LFS.exe!0055adfa()
LFS.exe!0054bc2b()
LFS.exe!0054c1fa()
LFS.exe!00482643()
LFS.exe!0053c88d()
kernel32.dll!75f9e3f3()
ntdll.dll!77a1cfed()
ntdll.dll!77a1d1ff()
LFS.exe!0070006d()
LFS.exe!0070006d()

EDIT: i have the MS Visual Studio installed and use the debugger of it, when lfs crashes. dont know if this gives you the same information drwatson would give, so i hope it helps
Quote from haelje :okay, here is the call stack. only to clear up: i can do the call of "LFS.exe /hlvc=xxx" in the standard command line ? if i start it this way a window like the dedicated server pops up...

Yes that is what should happen
Quote from haelje :...and after that the crash happens.

That is where it goes wrong


Thanks for the call stack, I'll look it up now.
OK, it looks to me like this happened when LFS tried to adjust the 3D system to allow antialiasing.

I can fix this bug but first can you verify this is the true cause? All you have to do is edit your cfg.txt file and set "Antialiasing" to zero.

Then it should work without error.

Thanks!
jep, thats the error. i changed it in the cfg.txt and it runs without any crashes. originally there is a 6 in my cfg.txt for antialiasing.
OK, thanks for your help. I've fixed the bug now and added a warning in the first post.
A bit late now, but I can confirm that setting AA to 0 fixes the crash for me too.
edit: irrelevant.

FGED GREDG RDFGDR GSFDG