Tree Saplings (Redux)


A small mod that adds craftable saplings that grow into vanilla trees, and a way to farm them. Based on the 'Revisited-RevivePatch' version, this one reduces the costs and heavily rewrites the control code to fix a few bugs and reduce overall UPS impact.

Content
1 year, 8 months ago
1.1
3.73K
Mining Manufacturing

b [Fixed] Crash In Multiplayer ["invalid key to 'next'"]

2 years ago

Been absolutely loving this mod, had one or two crashes in singleplayer but they seemed to sort themselves out after reloading. Tried hosting a multiplayer game with the mod, and it always crashes a couple of seconds after placing a wooden frame down. Does not crash when placing a ghost frame, only the actual frames.

error code is below:
The mod Tree Saplings (Redux) (1.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event TreeSaplings-Redux::on_tick (ID 0)
invalid key to 'next'
stack traceback:
[C]: in function 'next'
TreeSaplings-Redux/control.lua:348: in function <TreeSaplings-Redux/control.lua:339>

Not sure what it means or what I need to do (if anything) to prevent this. If it doesn't run multiplayer I'll be bummed but manage. Other player has the mod installed, I believe both are up to date. Might try un-installing and re-installing

2 years ago
(updated 2 years ago)

Hmm, I didn’t think that should be able to happen. :/

Thanks for the report. I’ll have to try out a fix I have in mind and see if it helps.

Edit: Oh, and do me a favor, report those other crashes if you still have the logs/next time they happen.

2 years ago

Where/how should I report them? New to factorio, sorry. Appreciate the quick response

2 years ago

Your choice: either right here in the discussions section (like this one), or you can follow the "homepage" link on the info tab to the thread I created on the main forums and report it within that thread. I get email notifications from both (some mod authors report the email notifications on the mod portal here don't work right for them, but so far for me that hasn't been an issue).

Best info for me is any steps to reproduce (if you know them) and the full message the game gives you (and if the game message is something like "unexpected error", then I'll need the whole log file, which can be attached directly to posts on the main forum, or for here use a text sharing site like pastebin and link to it). If I need more than that for some reason, I'll ask. :)

2 years ago

I've uploaded a version with a (hopeful) fix for this issue you reported. Give it a shot and let me know if it worked.

There are a few other fixes and changes in there, too, that I've been working on as the result of developing another mod, so you all get (most) of those early, now. :P Details are in the changelog.

2 years ago
(updated 2 years ago)

Discussion for this was moved to the forums, but suffice to say, after a couple iterations, v1.0.4 is now up with a semi automatic fix for when this error occurs. More details can be found here: https://forums.factorio.com/viewtopic.php?p=570632#p570632

2 years ago

81.396 Info ServerMultiplayerManager.cpp:944: updateTick(10029034) received stateChanged peerID(2) oldState(WaitingForCommandToStartSendingTickClosures) newState(InGame)
185.449 Error MainLoop.cpp:1284: Exception at tick 10035277: The mod Tree Saplings (Redux) (1.0.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event TreeSaplings-Redux::on_tick (ID 0)
invalid key to 'next'
stack traceback:
[C]: in function 'next'
TreeSaplings-Redux/control.lua:341: in function <TreeSaplings-Redux/control.lua:332>
185.449 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod Tree Saplings (Redux) (1.0.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event TreeSaplings-Redux::on_tick (ID 0)
invalid key to 'next'
stack traceback:
[C]: in function 'next'
TreeSaplings-Redux/control.lua:341: in function <TreeSaplings-Redux/control.lua:332>"
185.449 Info ServerMultiplayerManager.cpp:795: updateTick(10035277) changing state from(InGame) to(Failed)
185.463 Quitting: multiplayer error.
186.585 Info ServerMultiplayerManager.cpp:141: Quitting multiplayer connection.
186.586 Info ServerMultiplayerManager.cpp:795: updateTick(4294967295) changing state from(Failed) to(Closed)
186.588 Info UDPSocket.cpp:218: Closing socket
186.588 Info UDPSocket.cpp:248: Socket closed
186.588 Info UDPSocket.cpp:218: Closing socket
186.797 Info UDPSocket.cpp:218: Closing socket
186.797 Info UDPSocket.cpp:248: Socket closed
186.800 Goodbye

2 years ago

If you reload from the last save, does it still do it? The "fix" unfortunately is not a fix in the sense that it prevents it from ever happening, but rather allows you to recover and keep going from the last save.

2 years ago

We didnt get any new crash about the next key but every time a tree was fully grown, ppl desync now.

2 years ago

Ok, let's give this another try....

1.0.5 released.

Please give that a try and let me know if it solves the desyncs. Also let me know if the "invalid key to 'next'" occurs again. Hopefully I've got something in place that'll just prevent it from happening again, but I don't know for sure as in all of my play testing it only ever happened to me once. It's going to have a side effect of resetting the planter loop every time you place a planter, but provided the update interval isn't set for a huge amount, or you aren't constantly adding planters, it should be a minimal effect.

2 years ago

The desync message does not appear. So far i only got 1 random connection loss to server, while others stayed on the server.
Since then, nothing bad happend. It seems ok atm. good job!

2 years ago

phew

Here’s hoping!

New response