Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log spam/Input unresponsive while looking on mature growth stage of planted apple tree #23

Closed
GuestEG opened this issue Dec 12, 2024 · 9 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@GuestEG
Copy link

GuestEG commented Dec 12, 2024

log spam:
2024-12-12 14:54 Error: Running LUA method 'update'.
C:/Users//Documents/My Games/FarmingSimulator2025/mods/FS25_InfoDisplayExtension/InfoDisplayExtension.lua:863: attempt to perform arithmetic (sub) on nil and number

mod version: 1.0.1.0

WTR: plant an apple tree, skip time by sleeping until it grows from a sapling into a visible tree, get close and check the status.

looks like it has only one growth stage (mature) beside sapling, at least it does not grow any higher after that.

edit: that's a different bug than #4

@Achimobil
Copy link
Owner

Indeed different.

Please full log and the savegame with screen so I can reproduce it localy.
As you could imagine I could not plant now an apple tree and let the game run intil the tree has grown, savegame share makes it much easier for me

@Achimobil Achimobil added the bug Something isn't working label Dec 12, 2024
@Achimobil Achimobil moved this from New to Testing/Waiting in Achimobil's LS Projekte Dec 12, 2024
@Achimobil Achimobil added the question Further information is requested label Dec 12, 2024
@GuestEG
Copy link
Author

GuestEG commented Dec 12, 2024

Oops, sorry, should've thought about it myself... Attached the log, the savegame and the screenshot. You can reproduce the bug by teleporting into the tractor (it's the only player vehicle) and getting out of it - a couple of the trees are planted right in front of it.

savegame11.zip
FarmingSimulator2025Game_UQih4d6Fzf

@GuestEG
Copy link
Author

GuestEG commented Dec 12, 2024

Disregard that. While I waited for the files to upload - Giants dropped a new patch. Now the bug disappears after loading of the save. It can be reproduced on the freshly planted tree only, growed in the same session. Saving and reloading fixes it...
I kinda hate that type of bugs.

Edit: working on a new save, with the time forwarded to the day prior to the bugged state, so you'll be only need to skip a day once.

@Achimobil
Copy link
Owner

hmm...
Not fine but also good when solved by giants patch in generall.
In the line of the message there is
local hoursLeftInThisStage = foundTree.nextGrowthTargetHour - hoursNow;

But what is nil there. the foundTree.nextGrowthTargetHour or the hoursNow
When I know where the nil is comming from I could handle it better as when only assume where it is from

@GuestEG
Copy link
Author

GuestEG commented Dec 12, 2024

Made a new save. Placed a house on the same field as the appletrees.
Load the save, turn around, sleep once (default wake at 8AM is enough to advance the day) then walk up to the now-grown trees and you should get the bug.

The nil is the foundTree.nextGrowthTargetHour. You can check it for nil and bypass the subtraction, and it will not spam in the log. However, I wonder how it supposed to work from the game code perspective - how Giants change the growth state of the tree without the target time? Would it just crash the game instead?..

savegame10.zip

@Achimobil
Copy link
Owner

I think they forget either to set the nextGrowthTargetHour at this point or forget to set isGrowing to false. But I will test it as soon as I can. Question is more: Is it full grown at this stage or not.

I really need a mod to faster spool in my test Environment

@Achimobil Achimobil self-assigned this Dec 12, 2024
@Achimobil Achimobil moved this from Testing/Waiting to Todo in Achimobil's LS Projekte Dec 12, 2024
@Achimobil Achimobil removed the question Further information is requested label Dec 12, 2024
@Achimobil
Copy link
Owner

Gefixed for next Update in ModHub and available for self build in the master now

@Achimobil Achimobil moved this from Todo to Fixed in Achimobil's LS Projekte Dec 12, 2024
@Achimobil Achimobil added this to the Next MoHub Update milestone Dec 12, 2024
@GuestEG
Copy link
Author

GuestEG commented Dec 13, 2024

I'm sorry, but looks like you got a typo in the end of line 865:
if foundTree.growthStateI ~= 1 and foundTree.isGrowing == true and foundTree.nextGrowthTargetHour ~= nilthen
forgot the space in nilthen

the result is in the log:

2024-12-13 03:30 Lua compiler error (=C:/Users/USER/Documents/My Games/FarmingSimulator2025/mods/FS25_InfoDisplayExtension/InfoDisplayExtension.lua) :866: Expected 'then' when parsing if statement, got 'local'

log.txt

edit: with this typo fixed locally I would like to report what the bug is eliminated and the info on the tree is correctly displayed now!
I can close this issue once the fixed version will reach the modhub and I ensure what it is working, if you want.

@Achimobil
Copy link
Owner

Type fixed and checked id.

The ticket is on state that it is fixed for the next update.
The next update is currently not planed when to give to the ModHub and therefore nor closed.
I will close them when the version is send to modhub.
You can see here how I have the overview of this: https://github.com/users/Achimobil/projects/1

@Achimobil Achimobil reopened this Dec 13, 2024
@Achimobil Achimobil moved this from New to Testing/Waiting in Achimobil's LS Projekte Dec 13, 2024
@Achimobil Achimobil moved this from Testing/Waiting to Fixed in Achimobil's LS Projekte Dec 13, 2024
@github-project-automation github-project-automation bot moved this from Fixed to Done in Achimobil's LS Projekte Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants