VDrift / vdrift

VDrift source code
http://vdrift.net/
GNU General Public License v3.0
355 stars 97 forks source link

Some errors on cars #176

Closed leillo1975 closed 4 years ago

leillo1975 commented 4 years ago

I found a lot of errors on cars. Take a look to this screenshots: Captura de pantalla de 2020-08-27 22-10-09 Captura de pantalla de 2020-08-27 22-10-51 Captura de pantalla de 2020-08-27 22-11-09 Captura de pantalla de 2020-08-27 22-11-19 Captura de pantalla de 2020-08-27 22-10-29

These are only some examples, but affects more cars. I use Ubuntu 20.04 and Nvidia GTX1060 with 450.66 drivers, but I have seen these errors for quite some time.

logzero commented 4 years ago

Check output or log.txt. It should tell you what went wrong.

leillo1975 commented 4 years ago

Is very, very strange. Sometimes the car is loaded with problems, and then your reload it and it goes ok. I left you a video to see the problem: https://youtu.be/mrYnZhTuDMw

The log is here: log.txt

logzero commented 4 years ago

ERROR: Failed to load "oem_wheel_rear.joe" from: ...

It essentially fails to open the file for some reason. Not much you can do from VDrift side I'm afraid. Maybe some file system issue?

Btw VDrift caches loaded objects. So if it loading was successful once it will be reused (unless it has been garbage collected).

leillo1975 commented 4 years ago

I investigate some time and :

ERROR: Failed to load "oem_wheel_rear.joe" from:
       /home/leo/.vdrift/cars/F1-02
       /media/COMP/VDRIFT/share/games/vdrift/data/cars/F1-02
       /media/COMP/VDRIFT/share/games/vdrift/data/carparts
       /media/COMP/VDRIFT/share/games/vdrift/data/trackparts

There aren't a file called "oem_wheel_rear.joe" in none of these directories, but not in the repositories either:

https://svn.code.sf.net/p/vdrift/code/vdrift-data/cars/F1-02/ https://svn.code.sf.net/p/vdrift/code/vdrift-data/carparts/ https://svn.code.sf.net/p/vdrift/code/vdrift-data/trackparts/

Really, it's very strange

logzero commented 4 years ago

You are correct it should be oem_wheel.joe. I overlooked the rear/front parts.

Check your F1-02.car file. It seems that it is outdated.

If there is a car file in /home/leo/.vdrift/cars/F1-02 it will be preferred over /media/COMP/VDRIFT/share/games/vdrift/data/cars/F1-02.

logzero commented 4 years ago

I've changed the loading code a bit just to be sure the compiler doesn't do anything funny.

leillo1975 commented 4 years ago

Check your F1-02.car file. It seems that it is outdated.

I redownloaded code and data some days ago, before this problems

logzero commented 4 years ago

If you have /home/leo/.vdrift/cars/ directory delete it.

The F1-02.car file should not contain oem_wheel_rear.joe if it is up to date.

leillo1975 commented 4 years ago

I don't have any cars directory on .vdrift folder. I loaded the game again and didn't have problems, but I closed and reopen and have this again:

Captura de pantalla de 2020-08-30 18-12-38

In F1-02.car file there aren't references to this no loaded files... it's strange

leillo1975 commented 4 years ago

I'm thinking on something. The previous car I loaded was AX2 that it has the missing files. F1-02 don't need this files (I think). Could it be a problem of . car files info getting mixed up?

logzero commented 4 years ago

The car specs are in your screenshots are completely wrong too. No idea how that is possible.

What you could test is replacing in game.cpp line 1729

content.load(carconf, cardir, carname + ".car");

with

std::string abspath = pathmanager.GetDataPath() + "/" + pathmanager.GetCarsDir() + "/" + info.name + ".car"; std::ifstream carfile(abspath.c_str()); carconf.reset(new PTree()); read_ini(carfile, *carconf);

This will load the file without any caching.

leillo1975 commented 4 years ago

I have the same problem with this changes. I ran the game and then I changed cars, but it failed again. You can see the log here: log.txt

logzero commented 4 years ago

Let's try dumping the carconfig after parsing.

In game.cpp line 1745 add:

write_ini(*carconf, info_output);

log.txt should then contain the corrupted config I assume.

leillo1975 commented 4 years ago

I have added this line and made the following: https://youtu.be/cpii5mZtr6o

This is the log: log.txt

I have noticed that the problem don't appear if you change the car on garage, but if you load a race and then go to main menu, and then you go to garage again, the problem is showed, as you can see on the video.

logzero commented 4 years ago

I think I got it. You have replay recording enabled, which stores config in car_info, but doesn't clear it when you select a different car.

Will look into a fix tomorrow.

Thank you.

logzero commented 4 years ago

Commit 9ef27c6486276f4ddd60b70661655f227f7f4857 should fix it.

leillo1975 commented 4 years ago

Seems to work great now. Thanks a lot for the support!

leillo1975 commented 3 years ago

Hi, I found an error on F40: Captura de pantalla de 2021-03-28 22-49-58 Captura de pantalla de 2021-03-28 22-50-14

leillo1975 commented 3 years ago

The error on F40 was not corrected and the issue is closed