The online racing simulator
LFS crashes when going around a circular layout [fixed in 0.6B5]
Me, Fast Jarda and Denny12 discovered an interesting bug yesterday when playing online.

Basically, we put up a layout at Autocross Skid pad, which was just a circle around the track centre point with 3 checkpoints and a finish line. And what happens is that when going around close to the centre for a couple of laps, LFS crashes. It looks like it crashes when crossing the finish line.

It seems to be crashing on all tracks and probably all cars. Works in single player as well.

You can try to reproduce it by downloading the layout attached

This is the crash information:

Name: APPCRASH
App name: LFS.exe
Vesion: 0.0.0.0
Timestamp: 4dfb4e32
Code of exception: c0000005
Offest of exception: 00045b00
System version: 6.1.7601.2.1.0.768.3
Additional info 1: 4709
Additional info 2: 4709938665fa84e3ff99c8cbe11223bb
Additional info 3: f4c6
Additional info 4: f4c66b313fb0ab14aef0709e1b1f1251

Attached files
AU2_round_v2.lyt - 1.1 KB - 320 views
I tried it with a few cars, nothing happened. Are you running anything along with LFS (enbseries?).
Quote from imthebestracerthereis :I tried it with a few cars, nothing happened. Are you running anything along with LFS (enbseries?).

No. At least 5 people with different system specs tried it and it crashed.

Strange that it does not crash at your PC... Try to be as close to the centre as possible.
Hello Flame,

I tried it too, LFS Was almost crashing , but it didnt crash , LFS keept running.

So no issues for me , with that layout

Greetz
Testing it now and it looks like it crashes with 100% fuel, but still sometimes it does not crash, sometimes it does. Kind of random.
Quote from Flame CZE :Testing it now and it looks like it crashes with 100% fuel, but still sometimes it does not crash, sometimes it does. Kind of random.

no, you are wrong. maybe you have moddified lfs
its all good, i make 2:3x lap, all good
Attached files
REP2.MPR - 34.1 KB - 304 views
One guy tried it with no-moddified 0.6B and LFS crashed.

(Demo racer on AU2?)
Quote from kappa007 :no, you are wrong. maybe you have moddified lfs
its all good, i make 2:3x lap, all good

No, I don't have modified LFS.

But it looks like you do. The car is lagging all over the place. Plus you got no username there
Quote from Flame CZE :And you don't? The car is lagging all over the place. Plus you got no username there

O rly.
Didn't noticed.
Car does not lag, just your LFS isnt compatible with mine.
I forced car so hard in cornering that I've broked wheels/suspensions .
I like trainz
I have licence, but usualy it not show when I connect online, dunno why .
Quote from kappa007 :
I have licence, but usualy it not show when I connect online, dunno why .

seems legit
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.
Quote from MadCatX :Crash confirmed, it looks like LFS hits a NULL pointer there...

I'm bored, so... What is NULL pointer? I've heard it's something about errors or something like that.

P.S. I reproduced the crash with 100% fuel, but wasn't able to reproduce with 15%.
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.
Quote from MadCatX :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.

Thanks, I think I somewhat understood.
I'm not sure how LFS works in detail but I think MadCat means LFS was looking for something it needed but since it couldn't find it, it crashed. Once LFS is given the proper memory address, it will know where to find what its looking for.
crash confirmed
** Best answer **
Thanks, that seems to be because you could do 10000 or more laps with your current fuel load, and there was a text buffer overflow when it tried to display 10000.0L or whatever in that small available space. This will be fixed in the next client version of LFS.
Thanks Scawen!

FGED GREDG RDFGDR GSFDG