Courseplay / Courseplay_FS22

Courseplay for Farming Simulator 2022
GNU General Public License v3.0
838 stars 179 forks source link

[BUG_SP] LUA call stack when trying to plot a field work course #3302

Closed Antaiir closed 3 months ago

Antaiir commented 3 months ago

READ FIRST https://github.com/Courseplay/Courseplay_FS22/wiki

Steps to reproduce I have no idea what may causing it. Sorry.

Actual behavior Sometimes, i would say in 1 of about 15-20 cases, when i set my vehicle for field work on that field that has to be done and i want CP create the course for that task, i get an error message displayed from CP, that tells me it can't create the course and the log may show what's wrong. I have "LUA call stack" in my log then (see attached link to my log on pastebin).

No matter what settings i try in the course generator then, nothing works. I have to set my vehicle to another position on the same field, then i can create the course and start the field work task, and it will be done sucessfully.

I doesn't happen always to the same vehicle or field, so i cannot narrow it down. But it also happens when doing contracts with borrowed (in the contract menu, not leased from dealer) equipment too.

Expected behavior A useable course should be plotted. Preferably without call stacks. :-)

Screenshots n.a.

Courseplay version Version used: 7.4.1.3

Log https://pastebin.com/VC5G5PQ0

Map Thueringen 2.0 16x https://forbidden-mods.de/filebase/file/49399-th%C3%BCringen-2-0-16-fach/ (iirc i had it also on stock "Erlengrat" map)

Vehicles/ implements involved Which vehicle or implement? several different, not just occuring with specific equipment as far as i observed: plows, fertilizers, tedders.... and so on

Mod yes/no ? yes, but happens also with stock vehicles. Last time this happened while using an MBTrac (mod: https://forbidden-mods.de/filebase/file/31099-mb-trac-1100-1800/ ) with the stock "TS 1520" harroweeder (not sure if this is the correct term, in german it's a "Striegel")

Relevant script mods I'm using AutoDrive, VCA, AutoLoad... mh not sure if the "Precision Farming DLC" is relevant, but i'm using it.

Tensuko commented 3 months ago

That callstack means that with this settings it is not possible to generate a course. Screenshot of the field you try to generate?

Antaiir commented 3 months ago

Well, it happened again recently, so i was able to make some screenshots. This time i was on field 58 of my map, with a contract for planting potatoes, vehicles were lend and no mods.

The error message: https://postimg.cc/sQRhjPVj

The settings i used: https://postimg.cc/4n2xwvrY https://postimg.cc/3kFMfYdt

Map view of the field, so you can see it's shape: https://postimg.cc/ctfZsYLS

Overview of the field and position of the used vehicle: https://postimg.cc/3dcMPnBv https://postimg.cc/XZgs0vbz https://postimg.cc/8svrF0F1

Interesting part is: i just turned my vehicle about 90 degrees to the left, used the very same settings as above... and i got a course: https://postimg.cc/QBW7r8Tr https://postimg.cc/QFWT5Nxn

But tbh, that course is not efficient. So i tried to change the generator setting to make me a course aligned with the longest edge, but that made my game freezing.

Tensuko commented 3 months ago

Can you pls directly upload here on github... Those sites are annoying. Just drag and drop the pics in the msg box.

Antaiir commented 3 months ago

fs-Screen-2024-06-19-14-29-11

Tensuko commented 3 months ago

Also der Callstack sollte so sein, dass kein Kurs gebaut werden konnte. Was ich mich gerade frage, warum dein Fahrzeug "Axion 800 (Säen 58)" heißt. Hast du noch einen Kurs geladen?

Tensuko commented 3 months ago

But tbh, that course is not efficient. So i tried to change the generator setting to make me a course aligned with the longest edge, but that made my game freezing.

Freezing game ist normal, wenn es komplizierter wird. Da ist Geduld angesagt. Es wird aber kein kompletten gamecrash geben.

Aber mit der richtung gucke ich mal.

Antaiir commented 3 months ago

Ich kenne dieses "LUA call stack" nur als äußerst unerwünschtes Resultat, wenn im Script irgendwas ziemlich in die Binsen gegangen ist. Wenn das einfach nur ausdrücken soll daß kein Kurs erstellt werden konnte, könnte man das nicht im Zuge einer Fehlerbehandlungsroutine abfangen? Also für mich ist das durchaus ein Bug, wenn ein mögliches Ergebnis einer Berechnung nicht sauber verarbeitet wird.

Ich meine, man bekommt ja ohnehin eine Meldung im Spiel angezeigt. Mich irritiert nur, daß diese Meldung besagt, im Log fänden sich weitere Informationen zum Problem, und dann steht im Log halt ein call stack. Die meisten Leute werden etwas nervös, wenn sowas im Log auftaucht. Meist ufert das ja dann aus, daß die call stacks gar nicht mehr aufhören solange das Spiel läuft, und das Log dann etliche MB umfasst. Ich hatte schon Logs mit fast 100 MB, das muß man allein mit reinem Text erstmal schaffen. ;-)

Der Axion heißt so, weil der vom Missionsgeber für ebendiesen Auftrag an mich verliehen wurde. Ich nutze "Better Contracts", ich meine das setzt in dem Fall die Namen so. Ein anderer Kurs war für das Fahrzeug nicht aktiv. Ich fahre mit den Missionsfahrzeugen immer direkt zum Feld und starte dann dort die Arbeit mit CP.

Tensuko commented 3 months ago

Ich kenne dieses "LUA call stack" nur als äußerst unerwünschtes Resultat, wenn im Script irgendwas ziemlich in die Binsen gegangen ist. Wenn das einfach nur ausdrücken soll daß kein Kurs erstellt werden konnte, könnte man das nicht im Zuge einer Fehlerbehandlungsroutine abfangen? Also für mich ist das durchaus ein Bug, wenn ein mögliches Ergebnis einer Berechnung nicht sauber verarbeitet wird.

Ein Callstack ist nicht so schlimm wie manch einer denkt, es ist ein resultat das wir nicht abschalten können und aber auch im nachhinein keine negativen auswirkungen hat. Die Fehlermeldung bekommst du doch auf dem Bildschirm, hast du sogar ein Bild zu gemacht.

Logs mit fast 100 MB

Das hat dann aber andere Gründe!

Der Axion heißt so, weil der vom Missionsgeber für ebendiesen Auftrag an mich verliehen wurde. Ich nutze "Better Contracts", ich meine das setzt in dem Fall die Namen so. Ein anderer Kurs war für das Fahrzeug nicht aktiv. Ich fahre mit den Missionsfahrzeugen immer direkt zum Feld und starte dann dort die Arbeit mit CP.

Alles klar.

Tensuko commented 3 months ago

Das werden wir wohl nix fixen. Mit etwas Glück wird es mit dem neuen Generator besser oder wir haben dann eine chanze etwas dran zu ändern. Müssen wir sehen, sry.