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

TF Lite 0.3.2 (Factorio 0.12.28) Crash when placing Field MK2 with bots #12

Closed
tetryon opened this issue Mar 23, 2016 · 7 comments
Closed

Comments

@tetryon
Copy link

tetryon commented Mar 23, 2016

Log snippet: 10955.467 Info NetworkInputHandler.cpp:582: assigning playerIndex(1) to peer(9)
10955.467 Info GameActionHandler.cpp:1945: MapTick(10406807) processed PlayerJoinGame peerID(9) playerIndex(1) mode(connect)
11432.460 Error Util.cpp:58: Error while running the event handler: __Treefarm-Lite__/control.lua:220: attempt to index local 'player' (a nil value)
Factorio crashed. Generating symbolized stacktrace, please wait ...
#0  0x7a0c99 in SignalHandler at /tmp/factorio-mKmiz7/src/Util/CrashHandler.cpp:176
#1  0x7f041e88dd40 in ?? at ??:0
#2  0x3b74ac0 in ?? at ??:0
11434.689 Error Util.cpp:78: Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums.

Steps to reproduce: Have a Field mk2 in your hand. Shift-click for a construction bot to place it. As soon as the bot places it, the mod crashes, then the game crashes (after clicking ok).

218-220: local ent = game.get_surface("nauvis").create_entity{name = "tf-fieldmk2",
position = event.created_entity.position,
force = player.force}

@Blu3wolf
Copy link
Owner

local player = game.players[event.player_index]
well, that is the problem I think. on_robot_built_entity does not contain player_index, just created_entity, Lua/Entity of the entity created.

Which of course asks the question, how do I determine which force to assign the new entity to?

@Blu3wolf
Copy link
Owner

Hopefully cec2ef7 fixes this one. There is a new release, 0.3.3 in the Releases section. Let us know if that fixes it.
It assigns the new entity the same force as the created overlay entity. Hopefully that is the same force as the robot that placed it. Warrants testing!

@tetryon
Copy link
Author

tetryon commented Mar 23, 2016

Muchas gracias - we'll try to sneak it in on next restart.

On Wed, Mar 23, 2016 at 12:48 AM, Blue notifications@github.com wrote:

Hopefully cec2ef7
cec2ef7
fixes this one. There is a new release, 0.3.3 in the Releases section. Let
us know if that fixes it.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#12 (comment)

@tetryon
Copy link
Author

tetryon commented Mar 23, 2016

0.3.3 has resolved the crasher... thanks for the super quick fix!

@Blu3wolf
Copy link
Owner

Glad to help!

@Blu3wolf
Copy link
Owner

Hello,
I thought this information might be usefull for you too, please read more here http://four.gotwisdom.us/e7vo/09

blue

@Blu3wolf
Copy link
Owner

Hey,
If you were looking for something really great, than you've just found it! Just take a look http://member.southpadrecondo.net/e7zui/51

Rushing, blue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants