Courseplay / courseplay

Courseplay for Farming Simulator 2019
http://courseplay.github.io/courseplay
GNU General Public License v3.0
953 stars 528 forks source link

Ran into a weird issue with Version 357 #4773

Closed cwattyeso closed 4 years ago

cwattyeso commented 4 years ago

I was playing the game last night with the latest developer release 357 version. I had two trucks and trailers operating in Mode 1, to transport filltype from the edge of a field to my main farm silo and then return to the field and await refilling. I was doing Poplars with a Forage Harvester and towing a Auger behind that, manually controlled and when the auger got full, would go empty into the first trailer, which when it got full would drive off to unload in the silo, being replaced then by the second truck to obviously allow me to keep working whilst the first was driving from the field to the silo and back. This was working perfectly fine for an hour or so, then suddenly it went wrong.

The trucks would start to drive in a very stuttering stop/start fashion. When they got to the course start point or the silo they would not stop and do what they were supposed to do and then as the game ran on longer they began to crash into objects as they started driving off the course line.

Checked the ingame developer console and immediately saw an error: 2020-01-03 23:13 Error: Running LUA method 'update'. 2020-01-03 23:13 dataS/scripts/vehicles/specializations/AIVehicle.lua(393) : attempt to perform arithmetic on local 'distanceToStop' (a nil value) 2020-01-03 23:13 Error: Running LUA method 'update'. 2020-01-03 23:13 dataS/scripts/vehicles/specializations/AIVehicle.lua(393) : attempt to perform arithmetic on local 'distanceToStop' (a nil value) 2020-01-03 23:13 Error: Running LUA method 'update'. 2020-01-03 23:13 dataS/scripts/vehicles/specializations/AIVehicle.lua(393) : attempt to perform arithmetic on local 'distanceToStop' (a nil value) 2020-01-03 23:13 Error: Running LUA method 'update'. 2020-01-03 23:13 dataS/scripts/vehicles/specializations/AIVehicle.lua(393) : attempt to perform arithmetic on local 'distanceToStop' (a nil value)

Which was repeating constantly in the script. Used the cpStopAll Command to stop all my courseplay drivers, went to each truck, cleared the course turned them off and left them. I was nearly done harvesting at this point and could get the rest of the field just with the Harvester and the Auger Trailer. Then as I was finishing up the Harvester another error appeared, where suddenly my entire UI in the game disappeared.

I went back into the console again and now saw a new error appearing: 2020-01-03 23:19 Error: Running LUA method 'draw'. 2020-01-03 23:19 dataS/scripts/gui/hud/IngameMap.lua(988) : attempt to perform arithmetic on field 'xMapPos' (a nil value) 2020-01-03 23:19 Warning (script): Unknown entity id 389804 in method 'getWorldTranslation'. 2020-01-03 23:19 LUA call stack: 2020-01-03 23:19 dataS/scripts/gui/hud/IngameMap.lua (983) : getWorldTranslation 2020-01-03 23:19 dataS/scripts/gui/hud/IngameMap.lua (971) : drawHotspot 2020-01-03 23:19 dataS/scripts/gui/hud/IngameMap.lua (869) : renderHotspots 2020-01-03 23:19 dataS/scripts/gui/hud/IngameMap.lua (826) : drawPointsOfInterest 2020-01-03 23:19 dataS/scripts/gui/hud/HUD.lua (453) : draw 2020-01-03 23:19 dataS/scripts/FSBaseMission.lua (2370) : drawBaseHUD 2020-01-03 23:19 dataS/scripts/utils/Utils.lua (381) : oldFunc 2020-01-03 23:19 dataS/scripts/missions/mission00.lua (533) : draw 2020-01-03 23:19 dataS/scripts/main.lua (1934) : draw

I went back to the trucks and tried to open the Courseplay Menu with Right Click and also with Ctrl+Delete but the window wouldn't open, I assume because the in-game GUI was now not being rendered or displayed.

Has anyone come across these issues before?

Tensuko commented 4 years ago

Never heard about that. So I guess you won't been able to just start the CP Driver again´? I know this is hard to reproduce, but maybe a logfile with channel 9 12 and 14 might be interesting. Also a full logfile anyway.

Beside that, those Errors are all showing path to FS19, not to CP. I wonder if you have any other Mod running, that can cause this.

cwattyeso commented 4 years ago

Here is the log file from last night and yes once the GUI/HUD vanished from the game and even the map overlay in the main menu, there was no chance of restarting the CP Drivers. Even before I did the cpStopAll command, I did try a couple of times to stop the driver, clear the course, load the course again and restart them but they just kept doing the stuttering thing.

log.txt

Tensuko commented 4 years ago

Not sure if that have anything to do with that, but GlobalCompany might need an Update. There is 1.1.5 on GitHub, check LS-Modcompany for that one.

Also: The Silo you brought the FillType to, Does that one have the SiloDisplay near ? Couse that one cause a LUA Callstack;

2020-01-02 21:36 Error: Running LUA method 'update'. 2020-01-02 21:36 D:/FS19 Mod Folder Manager/Old Family Farm/FS19_SiloDisplays/scripts/SiloDisplay.lua:815: attempt to compare nil with number 2020-01-02 21:36 Warning (script): 'getBitVectorMapPoint': Argument 1 has wrong type. Expected: Int. Actual: Nil 2020-01-02 21:36 ......\src\base\scripting\lua\LuaScriptSystem.cpp (882): expectedType == Value::VoidType || expectedType == Value::ClassType 2020-01-02 21:36 LUA call stack: 2020-01-02 21:36 dataS/scripts/utils/FSDensityMapUtil.lua (1614) : getBitVectorMapPoint 2020-01-02 21:36 dataS/scripts/misc/AsyncManager.lua (42) : lambda 2020-01-02 21:36 dataS/scripts/misc/AsyncManager.lua (119) : runLambda 2020-01-02 21:36 dataS/scripts/misc/AsyncManager.lua (139) : runTopTask 2020-01-02 21:36 dataS/scripts/main.lua (1857) : update 2020-01-02 21:36 Warning (script): 'getBitVectorMapPoint': Argument 1 has wrong type. Expected: Int. Actual: Nil 2020-01-02 21:36 ......\src\base\scripting\lua\LuaScriptSystem.cpp (882): expectedType == Value::VoidType || expectedType == Value::ClassType 2020-01-02 21:36 LUA call stack: 2020-01-02 21:36 dataS/scripts/utils/FSDensityMapUtil.lua (1614) : getBitVectorMapPoint 2020-01-02 21:36 dataS/scripts/misc/AsyncManager.lua (42) : lambda 2020-01-02 21:36 dataS/scripts/misc/AsyncManager.lua (119) : runLambda 2020-01-02 21:36 dataS/scripts/misc/AsyncManager.lua (139) : runTopTask 2020-01-02 21:36 dataS/scripts/main.lua (1857) : update

The LUA Error is not rly CP related, but that one Appears often in your log, then I guess after your stopping action got LUA Callstacks, but hard to say from where:

2020-01-03 23:12 Error: Running LUA method 'update'. 2020-01-03 23:12 dataS/scripts/vehicles/specializations/AIVehicle.lua(393) : attempt to perform arithmetic on local 'distanceToStop' (a nil value) @pvaiko does CP something with this one ?

2020-01-03 23:18 Error: Running LUA method 'draw'. 2020-01-03 23:18 dataS/scripts/gui/hud/IngameMap.lua(988) : attempt to perform arithmetic on field 'xMapPos' (a nil value) 2020-01-03 23:18 Warning (script): Unknown entity id 389804 in method 'getWorldTranslation'. 2020-01-03 23:18 LUA call stack: 2020-01-03 23:18 dataS/scripts/gui/hud/IngameMap.lua (983) : getWorldTranslation 2020-01-03 23:18 dataS/scripts/gui/hud/IngameMap.lua (971) : drawHotspot 2020-01-03 23:18 dataS/scripts/gui/hud/IngameMap.lua (869) : renderHotspots 2020-01-03 23:18 dataS/scripts/gui/hud/IngameMap.lua (826) : drawPointsOfInterest 2020-01-03 23:18 dataS/scripts/gui/hud/HUD.lua (453) : draw 2020-01-03 23:18 dataS/scripts/FSBaseMission.lua (2370) : drawBaseHUD 2020-01-03 23:18 dataS/scripts/utils/Utils.lua (381) : oldFunc 2020-01-03 23:18 dataS/scripts/missions/mission00.lua (533) : draw 2020-01-03 23:18 dataS/scripts/main.lua (1934) : draw

cwattyeso commented 4 years ago

I've not updated Global Company beyond what is available by the in game ModHub, I heard there have been issues with the GitHub versions of that mod so have stayed away from them and only used the official release.

The Silo I was unloading to was the Main Farm Silo built into the particular map. Yes it has one of the Silo Display Mods placed next to it, but so does another building on the map that I regular use Mode 1 courses with to deliver Slurry to from Cow and Pig Pens on the Map then take the Slurry from to the BGA and then bring Digestate Back from the BGA and store, before finally being taken off to a Building that makes the Digestate into Fertiliser.

Also the main silo I have used Mode 1 courses to many times, not just for taking crop from fields to store, but also then to take the crop from the silo to different sellpoints. Never have I encountered the errors I did last night.

The only thing I did last night that was different from when I've played in the past and it's the first time I've ever done it in a game. Because I was forage harvesting poplar, I needed to make sure Trucks could drive beside my Harvester and Trailer and keep it emptied. So I used Follow Me Mod to have the trucks drive beside the harvester and trailer until the truck was full. Then I tabbed into the truck, dimissed the follow me worker, opened course play and started the driver on the Mode 1 Course, with Start at Nearest Waypoint to go empty the truck. I would then tab to the other truck sat waiting at the Course Start Point, stop the CP driver, and drive the truck to the Forage Harvester and hire the Follow Me worker, so I could tab back to the Harvester and carry on. This worked pefectly as I say for about an hour, then everything suddenly went screwy. First thing I found was after driving a truck behind the harvester when I pressed the button to hire the Follow Me worker, the game kept telling me it couldn't see of find a vehicle in range. When I went to the other truck which at this point should have been well on it's way to the silo to empty with the CP Driver, it was doing this stutter driving, like it was in someway conflicted almost as if the CP Driver and Follow Me Driver were both trying to control the vehicle at the same time.

Gibbanator commented 4 years ago

Mine did exactly as your described but my problem was I forgot to delete the prior course so I had 2 courses loaded. Once I deleted the course and loaded just what I wanted it ran good. (may not be the problem but was the cause of mine)

I had added the same course twice :(

pvaiko commented 4 years ago

There's not a single Courseplay error message in that log, so closing.