The online racing simulator
Insim is crashing
Hello. Last night, Insim made a mistake for no reason. I had to switch from version 7.0.9.0 to version 7.0.8.0. It was working fine, I didn't make any adjustments. But it just gave an error for the following reason and it never works. What is the reason of this? I went to the error lines and did what they said, but it still didn't work. I couldn't find anything about this error in the forum.




--------------------------------------------------------

1/31/2024 3:45:15 PM

Lapper Instance 185.123.101.78/**** abort!

The specified string is not in the form required for an e-mail address.
System
at System.Net.Mail.MailAddressParser.ReadCfwsAndThrowIfIncomplete(String data, Int32 index)
at System.Net.Mail.MailAddressParser.ParseDomain(String data, Int32& index)
at System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index)
at System.Net.Mail.MailAddressParser.ParseAddress(String data)
at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
at System.Net.Mail.MailAddress..ctor(String address)
at UTILS.utils.sendErrorMail(String email, String smtpServer, String loginMail, String passMail, String scripFileName, Exception ex)
at LFSLapper.LFSClient.doloop()
at LapperInstances.LapperInstance.doConnection()
Int32 ReadCfwsAndThrowIfIncomplete(System.String, Int32)
Closing Instance...
-----------------------------------------------------------------------------
1/31/2024 3:45:15 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #14
1/31/2024 3:45:15 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #15
The specified string is not in the form required for an e-mail address.

I would look at what is going in these lines:
1/31/2024 3:45:15 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #14
1/31/2024 3:45:15 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #15
There is a link on lfs.net that directs you to the create api section. I created the api and entered those keys into the specified location, but the problem was not solved. Also, Insim just worked. I don't understand how the problem, which I have been getting errors for 2 days, was solved suddenly.
Could be that lfs.net was not working or something and your addresses or keys were not read properly.
Actually everything is normal. All my codes are correct. I think there may be a problem with LFS. It's crashing for no reason because it's been going on for 2 days.
Now it crashed again. keeps rebooting itself
-----------------------------------------------------------------------------
1/31/2024 4:18:36 PM

Lapper Instance 185.123.101.78/****** abort!

The specified string is not in the form required for an e-mail address.
System
at System.Net.Mail.MailAddressParser.ReadCfwsAndThrowIfIncomplete(String data, Int32 index)
at System.Net.Mail.MailAddressParser.ParseDomain(String data, Int32& index)
at System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index)
at System.Net.Mail.MailAddressParser.ParseAddress(String data)
at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
at System.Net.Mail.MailAddress..ctor(String address)
at UTILS.utils.sendErrorMail(String email, String smtpServer, String loginMail, String passMail, String scripFileName, Exception ex)
at LFSLapper.LFSClient.doloop()
at LapperInstances.LapperInstance.doConnection()
Int32 ReadCfwsAndThrowIfIncomplete(System.String, Int32)
Closing Instance...
-----------------------------------------------------------------------------
1/31/2024 4:18:36 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #14
1/31/2024 4:18:36 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #15
-----------------------------------------------------------------------------
The error causing the crash is in the 4rd line (6th if you count the empty ones as well): The specified string is not in the form required for an e-mail address.

Somewhere an emailadress is put into Lapper and not in the correct format.
It is definitely obvious that the problem is here, check this, most likely the discord bot. You cannot use every discord code we have used in every version of the lapper, use the most up-to-date version of the lapper.
---------------------------------------
1/31/2024 4:18:36 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #14
1/31/2024 4:18:36 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #15
Line #14 and #15 in myInc.lpr must be the next variables

$RestAPIClientID = "";
$RestAPIClientSecret = "";

@RealistAdam You are using the incorrect version of LFSLapper.
must be version 7.0.9.0 or higher.

About the email error: read Yisc[NL]'s post above.
Actually, it is not mandatory to fill out that section. When I fill it up, the same problem occurs. Also, the problem started in version 7.0.9.0. I downgraded to 7.0.8.0 and it's still the same. There is no problem now, but occasional crashes continue. Also, I don't understand this email conversation at all.
Those variables do not exist below 7.0.9.0 and thats why Lapper spit out errors.
Did you change anything in LFSLapper.LPR recently?
I removed that string to understand the reason for the crash. It's working correctly now. If I get an error again, I will write it here.
Quote from Bass-Driver :Those variables do not exist below 7.0.9.0 and thats why Lapper spit out errors.
Did you change anything in LFSLapper.LPR recently?

No. It was working without any errors. Even though I didn't make any changes, it crashed while racing on the server.
1/30/2024 5:25:57 PM

Lapper Instance 185.123.101.78/***** abort!

Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
mscorlib
at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at InSim.LfsUnicodeEncoding.GetBytes(String value, Byte[] buffer, Int32 index, Int32 length)
at InSim.Encoder.MST(String msg)
at LFSLapper.LFSClient.SendMsg(String msg)
at LFSLapper.LFSClient.cmdlfs(unionVal val, ArrayList args)
at GLScript.GLApp.parseBackcall(SetOfVars GVAR, SetOfVars LVAR, unionVal val, ArrayList args)
at GLScript.Parseur.getval(SetOfVars GVAR, SetOfVars LVAR, executeParsedFunction BC)
at GLScript.GLApp.retrieveEvalVar(String funcName, TokenParse tkparse, TokenBuffer currTokenBuffer, SetOfVars GVAR, SetOfVars LVAR, Boolean breakFunc, Char& breakCar)
at GLScript.GLApp.privExecuteTokensPart(Int32 level, String funcName, SetOfVars GCAR, SetOfVars LVAR, Boolean breakable, Boolean inSwitchCase, Int32 start, Int32 end)
at GLScript.GLApp.privExecuteTokensPart(Int32 level, String funcName, SetOfVars GCAR, SetOfVars LVAR, Boolean breakable, Boolean inSwitchCase, Int32 start, Int32 end)
at GLScript.GLApp.privExecuteFunction(String funcName, String[] argsVals)
at GLScript.GLApp.executeFunction(String funcName, String[] argsVals)
at Configurator.lexConfigurator.executeFunction(String funcName, infoPlayer pcurrInfoPlayer, String[] par)
at LFSLapper.LFSClient.managePacket(NCN newConnection)
at LFSLapper.LFSClient.Loop(Connect insimConnection)
at LFSLapper.LFSClient.doloop()
at LapperInstances.LapperInstance.doConnection()
Void BlockCopy(System.Array, Int32, System.Array, Int32, Int32)
Closing Instance...
-----------------------------------------------------------------------------

I recovered the crashed INSIM data with version 7.0.9.0. This is the error I got. I couldn't find the reason for the crash. Version 7.0.9.0 was the best I have used. I would like to switch to that version again.
Check all the lines in your script that contains cmdLFS();
I guess the error occurs within the OnConnect event

Why i say that?

at LFSLapper.LFSClient.cmdlfs(unionVal val, ArrayList args) = cmdLFS() function
at LFSLapper.LFSClient.managePacket(NCN newConnection) = Event OnConnect

Also check WHEN the crash is happening. This could lead to the faulty line in your script that cause the crash
I've never seen this error or that email error before.
I checked all cmd commands. I made some improvements and upgraded the lapper exe version. There is no crash right now. But if there is a crash, I will report it here. I really don't know what this email is.
i'm curious what you changed.
Can you show us. will be helpfull to other LFSLapper users.
-
(RealistAdam) DELETED by RealistAdam : no reason
You have no choice but to check the codes you have changed recently, check the OnConnect event in the error. and stop changing lapper version constantly, every code data you make may not be available in old versions.
Quote from Bass-Driver :i'm curious what you changed.
Can you show us. will be helpfull to other LFSLapper users.

I discovered a few typos (Cmd LFS). I edited these. Also, I did not do anything about the e-mail crash. It fixes itself after a few minutes.
-
(RealistAdam) DELETED by RealistAdam
** Best answer **
$adminEmail

I'm sharing this for anyone experiencing this problem. I forgot to update the topic. The problem is with the value I share. Search for this in the Lapper file and make sure it is empty.

$adminEmail = "";


FGED GREDG RDFGDR GSFDG