[1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
smasher77777
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Jul 10, 2022 8:38 pm
Contact:

[1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"

Post by smasher77777 »

Factorio 1.101 (steam verified files) started randomly crashing/closing frequently. So If you load my save file [with the mods] it should or can produce the factorio-current.log during loading the save file. The crashes are so randomly that it can happen also after saving a save file or etc.
The logs always seem to end with:
576.654 Checksum for script __AutoDeconstruct__/control.lua: 1402689405
The mod Editor Extensions is also spamming in the log:
Verbose PrototypeMigrationList.cpp:338: "ee-debug-world-start-in-editor" mentioned as TO in prototype migration was not found in the map prototype dictionary, ignoring ...
Attachments
RecipeBook_4.0.0.zip
experimental EA from raiguard if needed but I think its not.
(63.21 KiB) Downloaded 13 times
flib_0.14.0.zip
experimental EA from raiguard if needed but I think its not.
(583.08 KiB) Downloaded 16 times
Testing non square line Blocks.zip
the save file if needed
(20.6 MiB) Downloaded 17 times
settings.json
.vscode.settings if needed-idk how It got there tbh
(813 Bytes) Downloaded 15 times
info.json
my mod 1/2 if needed
(252 Bytes) Downloaded 17 times
control.lua
my mod 2/2 if needed
(1.5 KiB) Downloaded 16 times
factorio-previous.log
also crash
(1.92 MiB) Downloaded 17 times
factorio-current.log
crash during loading the save file
(973.9 KiB) Downloaded 17 times

Loewchen
Global Moderator
Global Moderator
Posts: 8321
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"

Post by Loewchen »

393.780 Error MainLoop.cpp:1391: Exception at tick 7404444: Die Mod Biter sabotage (0.1.0) hat einen Fehler verursacht, der nicht behoben werden kann.
Bitte informiere den Autor der Mod über diesen Fehler.

Error while running event biter-sabotage::on_built_entity (ID 6)
__biter-sabotage__/control.lua:7: bad argument #2 of 3 to 'print' (table expected, got string)
stack traceback:
[C]: in function 'print'
__biter-sabotage__/control.lua:7: in function <__biter-sabotage__/control.lua:3>
Tell the mod author.

smasher77777
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Jul 10, 2022 8:38 pm
Contact:

Re: [1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"

Post by smasher77777 »

I am the mod author and I can tell you that that specifically unrecoverable error was because of me trying to get the print function to work with a string "" and a variable. Lua in VSC recommended me to separate them with commas but that caused that bad argument error so that error in particular had nothing to do with the issues I was experiencing. These crashes had no log trace print to them. That is the Problem. If it would have been a normal exit the logs would end with Good Bye. They do not.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1654
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: [1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"

Post by Pi-C »

This is the crashing line:

Code: Select all

player.print("You built "event.created_entity.name)
This should work:

Code: Select all

player.print("You built "..event.created_entity.name)
The '..' is the operator for concatenating strings. Alternatively, you could use this:

Code: Select all

player.print( {"", "You built ", event.created_entity.name} )
Using a table is similar to using localised text, where you give a table containing a template (in this case: the empty string "") and optional additional arguments (in this case: "You built " and event.created_entity.name). As an empty template is used here, all the optional arguments will be concatenated unless they are nil.

Note: Your string is not a localised string because "You built " will be output no matter what language the player is using. You could add a template for this message by adding something like this to your locale file:

Code: Select all

[my-messages]
built=You built __1__
Then change the print line to

Code: Select all

player.print( {"my-messages.built", event.created_entity.name} )
Once you've restarted the game (so it will know about the new strings), this string will be translated to the player's language if "my-messages.built" has been added to that language's locale file; if it hasn't been translated to that language yet, the English version will be used as fallback.

For more detailed information on localization, there's a tutorial you should check out.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Post Reply

Return to “Technical Help”