The online racing simulator
Searching in All forums
(499 results)
Victor
Developer
Oof sorry. The relay crashed and I had switched off monitoring for it so I didn't notice Frown Fixed now though.
Victor
Developer
Thanks! That's updated.
Victor
Developer
Quote from Bass-Driver :uhm it seems that LakynVonLegendaus send a experimal/dev version to victor Tongue

when i join alau07's his server , you will see a dev-message on top of the screen.

That's actually in the Lapper.lpr file of the latest official release Wink
See the uploaded LFSLapper archive in https://www.lfs.net/forum/thread/92832-Release%3A-LFSLapper-V7-0-6-3
Victor
Developer
I think it's working. So besides commenting the console event init stuff which uses a function not present in mono, I had to compile lapper with the symbol MONOSQLITE so it would use Mono.Data.SqliteClient instead of System.Data.SQLite .
Perhaps in the future you could make two releases? One for windows and one for linux (mono)
Additionally I installed libmono-i18n4.0-all which installed a whole lot more libs for mono which helped a bit too with some other problems. Not sure why I hadn't done that before...
I can provide a bit updated code tomorrow (it's late now and i might do some more tweaks), allowing you to easily create the two version if you want.

@alau07 could you try lapper again on your host?
EDIT - hmm found some more problems. Might take until tomorrow before they're fixed.
Last edited by Victor, .
Victor
Developer
Turns out it was already installed Smile Playing around with lapper now. Not initing the console events got me a bit further but now i run into another problem again ...
Will see how far i can get.
Victor
Developer
Got the same problem. However, I installed libmono-i18n4.0-all which added the missing code pages. Now I get another error though:
Quote :Unhandled Exception:
System.EntryPointNotFoundException: SetConsoleCtrlHandler
at (wrapper managed-to-native) LFSLapper.ConsoleCtrl:SetConsoleCtrlHandler (LFSLapper.ConsoleCtrl/ControlEventHandler,bool)
at LFSLapper.ConsoleCtrl.Dispose (Boolean disposing) <0xb5233248 + 0x0002f> in <filename unknown>:0
at LFSLapper.ConsoleCtrl.Finalize () <0xb5233200 + 0x0001b> in <filename unknown>:0

Doing a quick search led me to this thread: https://www.lfs.net/forum/post/1937853#post1937853
This might be a problem I cannot fix (easily).
Were these new kernel32 functions added in recent versions of lapper?

EDIT - I wonder if this could be avoided, maybe with a startup param or config variable that enables console events or not. In my case I'd disable them and this piece of code wouldn't have to run.
Maybe I should install VS again .. hmm.
Last edited by Victor, .
Victor
Developer
Thanks! I'll give that a try soon.
Victor
Developer
True, but i currently don't have visual studio setup to compile it :/
Victor
Developer
pff ... have updated the os and mono and everything, but still the same issue. Seems mono doesn't know about 1251. But apparently it is supposed to know "windows-1251" (even though 1251 in the functions below should work according to docs).
I wonder if it's possible for you to create a test version with the following change? Would like to try.

CodePage.cs
private static readonly Dictionary<char, Encoding> EncodingMap = new Dictionary<char, Encoding> {
{ 'L', Encoding.GetEncoding("windows-1252", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
{ 'G', Encoding.GetEncoding("windows-1253", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
{ 'C', Encoding.GetEncoding("windows-1251", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
{ 'J', Encoding.GetEncoding("shift_jis", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
{ 'E', Encoding.GetEncoding("windows-1250", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
{ 'T', Encoding.GetEncoding("windows-1254", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
{ 'B', Encoding.GetEncoding("windows-1257", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
{ 'H', Encoding.GetEncoding("big5", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
{ 'S', Encoding.GetEncoding("gb2312", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
{ 'K', Encoding.GetEncoding("ks_c_5601-1987", EncoderExceptionFallback.ExceptionFallback, DecoderExceptionFallback.ReplacementFallback) },
};

Last edited by Victor, .
Victor
Developer
just some more food ...

I've dumped some Lapper traffic where you can see:
17:03:03.879720 - Lapper sends ISP_ISI with the correct admin password
17:03:03.881793 - LFS sends ISP_VER in reply (so everything should be ok, yet I don't see this in the LFS console Big Eye )
and then some more data is exchanged before Lapper hangs up right after sending ISP_TINY + TINY_NCN (17:03:04.015324).

So this is pretty weird. In which cases does Lapper report that the admin password is incorrect?

Quote :17:03:03.878653 IP 127.0.0.1.43226 > 127.0.0.1.57497: Flags [S], seq 2657384438, win 32792, options [mss 16396,sackOK,TS val 1426327200 ecr 0,nop,wscale 4], length 0
0x0000: 4500 003c 92e5 0000 4006 e9d4 7f00 0001 E..<....@.......
0x0010: 7f00 0001 a8da e099 9e64 77f6 0000 0000 .........dw.....
0x0020: a002 8018 fe30 0000 0204 400c 0402 080a .....0....@.....
0x0030: 5504 06a0 0000 0000 0103 0304 U...........
17:03:03.878675 IP 127.0.0.1.57497 > 127.0.0.1.43226: Flags [S.], seq 1246297714, ack 2657384439, win 32768, options [mss 16396,sackOK,TS val 1426327200 ecr 1426327200,nop,wscale 4], length 0
0x0000: 4500 003c 0000 4000 4006 3cba 7f00 0001 E..<..@.@.<.....
0x0010: 7f00 0001 e099 a8da 4a48 fe72 9e64 77f7 ........JH.r.dw.
0x0020: a012 8000 fe30 0000 0204 400c 0402 080a .....0....@.....
0x0030: 5504 06a0 5504 06a0 0103 0304 U...U.......
17:03:03.878689 IP 127.0.0.1.43226 > 127.0.0.1.57497: Flags [.], ack 1, win 2050, options [nop,nop,TS val 1426327200 ecr 1426327200], length 0
0x0000: 4500 0034 92e6 0000 4006 e9db 7f00 0001 E..4....@.......
0x0010: 7f00 0001 a8da e099 9e64 77f7 4a48 fe73 .........dw.JH.s
0x0020: 8010 0802 fe28 0000 0101 080a 5504 06a0 .....(......U...
0x0030: 5504 06a0 U...
17:03:03.879720 IP 127.0.0.1.43226 > 127.0.0.1.57497: Flags [P.], seq 1:45, ack 1, win 2050, options [nop,nop,TS val 1426327200 ecr 1426327200], length 44
0x0000: 4500 0060 92e7 0000 4006 e9ae 7f00 0001 E..`....@.......
0x0010: 7f00 0001 a8da e099 9e64 77f7 4a48 fe73 .........dw.JH.s
0x0020: 8018 0802 fe54 0000 0101 080a 5504 06a0 .....T......U...
0x0030: 5504 06a0 2c01 0100 0000 e007 0821 6400 U...,........!d.
0x0040: 6264 6648 4864 6668 6773 7132 0000 0000 admnpasshere....
0x0050: 4c46 534c 6170 7065 7200 0000 0000 0000 LFSLapper.......
17:03:03.879737 IP 127.0.0.1.57497 > 127.0.0.1.43226: Flags [.], ack 45, win 2048, options [nop,nop,TS val 1426327200 ecr 1426327200], length 0
0x0000: 4500 0034 f8d3 4000 4006 43ee 7f00 0001 E..4..@.@.C.....
0x0010: 7f00 0001 e099 a8da 4a48 fe73 9e64 7823 ........JH.s.dx#
0x0020: 8010 0800 fe28 0000 0101 080a 5504 06a0 .....(......U...
0x0030: 5504 06a0 U...
17:03:03.881793 IP 127.0.0.1.57497 > 127.0.0.1.43226: Flags [P.], seq 1:21, ack 45, win 2048, options [nop,nop,TS val 1426327201 ecr 1426327200], length 20
0x0000: 4500 0048 f8d4 4000 4006 43d9 7f00 0001 E..H..@.@.C.....
0x0010: 7f00 0001 e099 a8da 4a48 fe73 9e64 7823 ........JH.s.dx#
0x0020: 8018 0800 fe3c 0000 0101 080a 5504 06a1 .....<......U...
0x0030: 5504 06a0 1402 0100 302e 3654 0000 0000 U.......0.6T....
0x0040: 4445 4d4f 0000 0800 DEMO....
17:03:03.881826 IP 127.0.0.1.43226 > 127.0.0.1.57497: Flags [.], ack 21, win 2049, options [nop,nop,TS val 1426327201 ecr 1426327201], length 0
0x0000: 4500 0034 92e8 0000 4006 e9d9 7f00 0001 E..4....@.......
0x0010: 7f00 0001 a8da e099 9e64 7823 4a48 fe87 .........dx#JH..
0x0020: 8010 0801 fe28 0000 0101 080a 5504 06a1 .....(......U...
0x0030: 5504 06a1 U...
17:03:03.914340 IP 127.0.0.1.43226 > 127.0.0.1.57497: Flags [P.], seq 45:49, ack 21, win 2049, options [nop,nop,TS val 1426327209 ecr 1426327201], length 4
0x0000: 4500 0038 92eb 0000 4006 e9d2 7f00 0001 E..8....@.......
0x0010: 7f00 0001 a8da e099 9e64 7823 4a48 fe87 .........dx#JH..
0x0020: 8018 0801 fe2c 0000 0101 080a 5504 06a9 .....,......U...
0x0030: 5504 06a1 0403 0a07 U.......
17:03:03.931424 IP 127.0.0.1.57497 > 127.0.0.1.43226: Flags [P.], seq 21:49, ack 49, win 2048, options [nop,nop,TS val 1426327213 ecr 1426327209], length 28
0x0000: 4500 0050 f8d5 4000 4006 43d0 7f00 0001 E..P..@.@.C.....
0x0010: 7f00 0001 e099 a8da 4a48 fe87 9e64 7827 ........JH...dx'
0x0020: 8018 0800 fe44 0000 0101 080a 5504 06ad .....D......U...
0x0030: 5504 06a9 1c05 0a00 0000 803f 000a 0000 U..........?....
0x0040: 0001 0000 0000 0000 424c 3100 0000 0000 ........BL1.....
17:03:03.971972 IP 127.0.0.1.43226 > 127.0.0.1.57497: Flags [.], ack 49, win 2048, options [nop,nop,TS val 1426327224 ecr 1426327213], length 0
0x0000: 4500 0034 92f5 0000 4006 e9cc 7f00 0001 E..4....@.......
0x0010: 7f00 0001 a8da e099 9e64 7827 4a48 fea3 .........dx'JH..
0x0020: 8010 0800 fe28 0000 0101 080a 5504 06b8 .....(......U...
0x0030: 5504 06ad U...
17:03:04.015324 IP 127.0.0.1.43226 > 127.0.0.1.57497: Flags [P.], seq 49:53, ack 49, win 2048, options [nop,nop,TS val 1426327234 ecr 1426327213], length 4
0x0000: 4500 0038 92fb 0000 4006 e9c2 7f00 0001 E..8....@.......
0x0010: 7f00 0001 a8da e099 9e64 7827 4a48 fea3 .........dx'JH..
0x0020: 8018 0800 fe2c 0000 0101 080a 5504 06c2 .....,......U...
0x0030: 5504 06ad 0403 010d U.......
17:03:04.019117 IP 127.0.0.1.43226 > 127.0.0.1.57497: Flags [F.], seq 53, ack 49, win 2048, options [nop,nop,TS val 1426327235 ecr 1426327213], length 0
0x0000: 4500 0034 92fd 0000 4006 e9c4 7f00 0001 E..4....@.......
0x0010: 7f00 0001 a8da e099 9e64 782b 4a48 fea3 .........dx+JH..
0x0020: 8011 0800 fe28 0000 0101 080a 5504 06c3 .....(......U...
0x0030: 5504 06ad U...
17:03:04.031615 IP 127.0.0.1.57497 > 127.0.0.1.43226: Flags [P.], seq 49:105, ack 54, win 2048, options [nop,nop,TS val 1426327238 ecr 1426327234], length 56
0x0000: 4500 006c f8d6 4000 4006 43b3 7f00 0001 E..l..@.@.C.....
0x0010: 7f00 0001 e099 a8da 4a48 fea3 9e64 782c ........JH...dx,
0x0020: 8018 0800 fe60 0000 0101 080a 5504 06c6 .....`......U...
0x0030: 5504 06c2 3812 0100 0000 0000 0000 0000 U...8...........
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0050: 4164 6d69 6e00 0000 0000 0000 0000 0000 Admin...........
0x0060: 0000 0000 0000 0000 0101 0000 ............
17:03:04.031652 IP 127.0.0.1.43226 > 127.0.0.1.57497: Flags [R], seq 2657384492, win 0, length 0
0x0000: 4500 0028 92fe 4000 4006 a9cf 7f00 0001 E..(..@.@.......
0x0010: 7f00 0001 a8da e099 9e64 782c 0000 0000 .........dx,....
0x0020: 5004 0000 11d9 0000 P.......

Last edited by Victor, .
Victor
Developer
Quote from Bass-Driver :
  • -Are there any ERR files in the "logs" folder
  • -Which files did you changed to set-up Lapper.

and oh, no ERR files and I'm using a default configuration ... except the two extra lines with $configFile and $superUsersFile in default_1.ini, as pasted above.
Victor
Developer
Your console question got me a bit further. No, I don't have a console of Lapper, but i'm now piping the output to a file, to see this:
Quote :Password does not match your multiplayer admin password!! restart LFSLapper

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for InSim.LfsEncoding ---> System.TypeInitializationException: An exception was thrown by the type initializer for InSim.LfsUnicodeEncoding ---> System.NotSupportedException: CodePage 1251 not supported
at System.Text.Encoding.GetEncoding (Int32 codepage) [0x00000] in <filename unknown>:0
at System.Text.Encoding.GetEncoding (Int32 codepage, System.Text.EncoderFallback encoderFallback, System.Text.DecoderFallback decoderFallback) [0x00000] in <filename unknown>:0
at InSim.LfsUnicodeEncoding..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at InSim.LfsEncoding..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at InSim.Decoder.pakGetString (System.Byte[] pak, Int32 first, Int32 len) [0x00000] in <filename unknown>:0
at InSim.Decoder+VER..ctor (System.Byte[] packet) [0x00000] in <filename unknown>:0
at InSim.Connect.insimConnectTCP (System.String host, Int32 port, System.String adminPassword, System.String mode, System.String nameApp, Boolean isLocal, Int32 receiveJoinReq, Int32 disableAIcars) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for InSim.LfsEncoding ---> System.TypeInitializationException: An exception was thrown by the type initializer for InSim.LfsUnicodeEncoding ---> System.NotSupportedException: CodePage 1251 not supported
at System.Text.Encoding.GetEncoding (Int32 codepage) [0x00000] in <filename unknown>:0
at System.Text.Encoding.GetEncoding (Int32 codepage, System.Text.EncoderFallback encoderFallback, System.Text.DecoderFallback decoderFallback) [0x00000] in <filename unknown>:0
at InSim.LfsUnicodeEncoding..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at InSim.LfsEncoding..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at InSim.Decoder.pakGetString (System.Byte[] pak, Int32 first, Int32 len) [0x00000] in <filename unknown>:0
at InSim.Decoder+VER..ctor (System.Byte[] packet) [0x00000] in <filename unknown>:0
at InSim.Connect.insimConnectTCP (System.String host, Int32 port, System.String adminPassword, System.String mode, System.String nameApp, Boolean isLocal, Int32 receiveJoinReq, Int32 disableAIcars) [0x00000] in <filename unknown>:0

Are these two errors? Something admin password related and a codepage exception?

Re. the password, I have it configured:
Quote :$ cat bin/default/default_1.ini
$password = "adminpasshere";
$configFile = "LFSLapper.lpr";
$superUsersFile = "superusers.txt";

Did something change regarding the password?

And no idea about the exception. Should I update mono maybe? It's quite an ancient version that I have there.
Victor
Developer
I tried remotePort=3002 but it didn't help unfortunately.

EDIT - so just checking ... remotePort is for remote management of Lapper, correct? So this port should always be randomised as Lapper will open a local socket on that port for each instance?

EDIT 2 - actually I don't see a listening socket on 3001 at all. Even though there should be one?

EDIT 3 - aha, when I start a new instance of Lapper, I can briefly see activity on 3001:
Quote :$ netstat -ant | grep 3001
tcp 0 0 0.0.0.0:3001 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:59673 127.0.0.1:3001 ESTABLISHED
tcp 32 0 127.0.0.1:3001 127.0.0.1:59673 ESTABLISHED

but then it goes away after Lapper exits, of course. At least this hints that remotePort (or at least, setting up the socket) is not the issue here.
Last edited by Victor, .
Victor
Developer
The logs don't tell us much unfortunately.
Via the LFS console I'm seeing Lapper connect, and disconnect basically immediately:
Quote :Jan 30 11:08:56 InSim - TCP : LFSLapper
Jan 30 11:08:56 Handicaps :
Jan 30 11:08:56 InSim guest closed : LFSLapper

/bin/default/logs/127.0.0.1-57497-MSS.log:
Quote :1/30/2019 11:08:56 AM -> Connecting to: [127.0.0.1 / 57497]
Instance [127.0.0.1 / 57497] successfully connected
1/30/2019 11:08:56 AM -> InSImReceive Thread Started...

/bin/logs/LFSLapper-MSS.log:
Quote :1/30/2019 11:08:56 AM -> Started - LFSLapper Version=7.0.6.3 -
1/30/2019 11:08:56 AM -> Start set of instances thread

and that's all Frown

We're using the latest Lapper v7.0.6.3

I'll keep trying to find out what's going on. Though I wonder if there could be a bit more debug for the log files.
Another thing I noticed is that Lapper doesn't seem to send an init packet at all. Otherwise the console output would have shown "InSim : version 7 requested - using 7" after "InSim - TCP : LFSLapper", but there's no such line.
I assume the message "InSim guest closed : LFSLapper" means Lapper actively closed the connection.
Does that give you guys any hints?
Victor
Developer
Hm yeah I would think that's youtube and not lfs.net
Other threads with youtube videos display the same message for me.
While threads without youtube videos do not.
Victor
Developer
Hmm no I'm afraid the above is the only hotlap log information we have.
Victor
Developer
You can get the hotlap log entries via the pub stat api.

For this to work you'll need to generate an ident key at lfsworld: https://www.lfsworld.net/?win=settings&whichTab=pubstat

With that key you can make an api call like this:
https://www.lfsworld.net/pubstat/get_stat2.php?version=1.5&idk={identKey}&action=hl_log&s=1&lines=150

The maximum number of results it returns are 150. But you can do paging by setting a start time in the query, like so:
https://www.lfsworld.net/pubstat/get_stat2.php?version=1.5&idk={identKey}&action=hl_log&s=1&lines=150&starttime=1543875060

Then just take the last timestamp of each result set and make another call with that timestamp set as starttime to go to the next page.

For more information on pubstat, see: https://www.lfs.net/forum/thread/14480-How-to-retrieve-LFS-World-stats%3F

Hope that helps.
Victor
Developer
hm, I don't see any different numbers? Don't know what version you have .. Big grin
Victor
Developer
Fixed
Victor
Developer
Hi, sorry about that. It is fixed now.
Victor
Developer
Quote from Degats :Side-by-side of the second image:

https://cdn.knightlab.com/libs/juxtapose/latest/embed/index.html?uid=6dc799ae-903a-11e8-b263-0edaf8f81e27

It tries to load an image from imgur but imgur returns a 403 Forbidden. I guess they don't like the referrer (cdn.knightlab.com)? Try hosting the image on another website.
Victor
Developer
Problems always arrive all at the same time. This time it was physical server problems. Should be solved now though.
Victor
Developer
Ah, nice! Thanks for letting me know.
FGED GREDG RDFGDR GSFDG