Coder Social home page Coder Social logo

Comments (22)

thorus90 avatar thorus90 commented on August 27, 2024 1

I'm also seein this issue without changes to the mods.

from treefarm-lite.

Glendening avatar Glendening commented on August 27, 2024

This also happened previously to this report (I think I posted that bug report in the wrong git page) When I updated/installed mods on the 7th the same results happened with different CRC codes. I used the workaround noted to continue playing until finally reproducing the error.

from treefarm-lite.

Blu3wolf avatar Blu3wolf commented on August 27, 2024

Thanks for the report; Ill take a look at this tonight.

To clarify, this happens when you change the installed mods?

from treefarm-lite.

Blu3wolf avatar Blu3wolf commented on August 27, 2024

Loading just Treefarm Lite and AC, placing some trees, and farms, saving, installing bobs MCI, then loading the save, doesnt reproduce the error. Will try some of the mods marked out in red.

from treefarm-lite.

Blu3wolf avatar Blu3wolf commented on August 27, 2024

Reproduced locally. Seems pretty simple. Treefarm Lite modifies the global table during on_load, and factorio doesnt want it to do that.

Attempting to mutate the 'global' table of a mod in the 'on_load' event handler will result in an error. The 'on_load' event handler is only meant for re-registering conditional event handlers and setting up meta-tables. Use 'on_configuration_changed', 'on_init', and migration scripts in all other instances.

@StephenWard this was your section of code. Im going to take a look at this and see if I can fix it, but your input would not go amiss.

from treefarm-lite.

Blu3wolf avatar Blu3wolf commented on August 27, 2024

Going to be playing with this branch: https://github.com/Blu3wolf/Treefarm-Lite/tree/strip_global_changes_out_of_on_load

from treefarm-lite.

Blu3wolf avatar Blu3wolf commented on August 27, 2024

As an aside, great report. Contains almost all the details I would want to know to start tracking the bug down. Very impressive!

from treefarm-lite.

Glendening avatar Glendening commented on August 27, 2024

I used to work QA at my previous job so I learned a thing or two about bug reporting. Keep up the good work and thanks for a wonderful mod.

FYI your mod now has competition of a sort. It looks like Bob released a tree farm/greenhouse for lumber production.

from treefarm-lite.

Blu3wolf avatar Blu3wolf commented on August 27, 2024

More power to him! Unless it spawns trees though, its not really competition. There are already other free wood generators out there, like BioIndustries... difference is, all of them generate pollution. Treefarm soaks pollution.

from treefarm-lite.

funnysunnybunny avatar funnysunnybunny commented on August 27, 2024

Hey, I came here to report the same bug happening to me, pity I forgot it was happening (Second time already^)
Just added MoWeather and ran into it again, I tried the version without global onload but with it the tree planting won't work and throws an error complaining about missing what was removed in the 'commented on load out' version of treefarm
I could upload the save game but there's so many needed mods that I just don't

Many thanks to you for keeping the mod up to date

from treefarm-lite.

StephenWard avatar StephenWard commented on August 27, 2024

I'll take a look at this tonight, @Blu3wolf

from treefarm-lite.

DArrigoni avatar DArrigoni commented on August 27, 2024

I got this to happen without changing the mods. The only thing of note that happened was that I hard reset my computer while factorio was running.

Error while running mod-Treefarm-Lite::on_load().

Detected modifications to the 'global' table:
CRC before: 200947184
CRC after: 1243560790

Save file: Khadoosh.zip

from treefarm-lite.

Blu3wolf avatar Blu3wolf commented on August 27, 2024

Thanks for the file! The reason this happens with the current version is known; the worry now is fixing it.
@StephenWard as you may have noted Ive not done any new pushes to it. Been a little busy of late. I think our fix is to just get the rebuilding of tables to happen only in on_configuration_changed and just leave the global tables alone in on_load.

from treefarm-lite.

Blu3wolf avatar Blu3wolf commented on August 27, 2024

Thanks for reporting

from treefarm-lite.

blueimpb avatar blueimpb commented on August 27, 2024

Also seeing this issue. In my case I didn't make any changes to the mods. The only other mod I had installed was the Charcoal mod. I loaded a save, played about 5 minutes, made another save, and at that point I could load the first save but not the second. (Got the same error about modifying the global table during on_load).

from treefarm-lite.

Valerate avatar Valerate commented on August 27, 2024

I have updated the Dytech mod to 0.13 and it has the same issue with its rubber tree growing script. I'd love if you found a way to let me know so I can fix my dytech too :)

from treefarm-lite.

blueimpb avatar blueimpb commented on August 27, 2024

I have the feeling it's a hard problem. I took a look at the code and it's modifying global.tf all over the place. Kinda sucks they made this illegal, but I think it had to do with fixing multiplayer desyncs.

Anyway, I tried commenting out a couple of global.tf modifications in initialize() just for the heck of it, but was unable to avoid the problem.

from treefarm-lite.

credomane avatar credomane commented on August 27, 2024

Looks like just moving initialize() from on_load() to the top of when_loaded_mods_changed. Then having populate_seed_name_to_plant_group check to make sure global.tf.plantGroups is not nil would solve the problem in the short term.

Am I missing something?

from treefarm-lite.

DArrigoni avatar DArrigoni commented on August 27, 2024

Tried the https://github.com/Blu3wolf/Treefarm-Lite/tree/strip_global_changes_out_of_on_load branch and got this:

Error while running the event handler: Treefarm-Lite/control.lua:480: attempt to index upvalue 'immaturePlantNames' (a nil value)

from treefarm-lite.

StephenWard avatar StephenWard commented on August 27, 2024

fixed in v0.5.2

from treefarm-lite.

cyprus2056 avatar cyprus2056 commented on August 27, 2024

While load, ill get this error:
Error while running mod-Treefarm-Lite::on_load().

Detected modifications to the 'global' table:
CRC before: 2843566698
CRC after: 67294550

Factorio 0.13.13
Bobs 0.13.3
Railtanker 1.3.32
Warehouse 0.0.1
RSO 2.0.11

~8h into game

from treefarm-lite.

StephenWard avatar StephenWard commented on August 27, 2024

@cyprus2056 which version of Treefarm are you using?

from treefarm-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.