[LTN 1.10.15] cut/paste exception in editor (FIXED)

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

[LTN 1.10.15] cut/paste exception in editor (FIXED)

Post by Gouldukat »

The mod LTN - Logistic Train Network caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LogisticTrainNetwork::on_tick (ID 0)
__LogisticTrainNetwork__/script/stop-update.lua:46: table index is nil
stack traceback:
__LogisticTrainNetwork__/script/stop-update.lua:46: in function 'UpdateStop'
__LogisticTrainNetwork__/script/dispatcher.lua:61: in function <__LogisticTrainNetwork__/script/dispatcher.lua:34>


I was planning base development in free play/creative mode, got no train around, just coping paste the same stations (same name and configuration) when i cut a new one the game crash with that error

to avoid it i need to mine the station manually and after cut and paste it

(i will change names and put the correct configuration when done for now just making the infrastructure )

Thank you
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: cut/paste exception in editor

Post by Optera »

Please always use the blueprint for bug reports posted here: viewtopic.php?f=214&t=60889
Your report has no information about your Factorio and LTN version and gives only a vague idea how to reproduce.

I cant reproduce a crash by cutting and pasting LTN stops even with in frozen time editor.

Generally use editor carefully.
  • While time is frozen build events are raised once time is resumed, forwarding n ticks does not raise them.
    LTN can only connections stops and IO entities through those events. (indicated by white Lamp)
  • While time is frozen destroy events are not raised at all.
Using editor to bring LTN stops into an invalid state that can't exist in normal gameplay is not a bug.
Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

Re: cut/paste exception in editor

Post by Gouldukat »

Versions of mods, and i will post you a video how i replicate the problem so you can see

At first me too i was telling myself wow now it does not do the problem ... but after 3 cut it fired the exceptions ;-) just the time to upload it and i will share
Attachments
Screenshot 2019-09-04 18.49.08.png
Screenshot 2019-09-04 18.49.08.png (1.94 MiB) Viewed 5501 times
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: cut/paste exception in editor

Post by Bilka »

Optera wrote: Wed Sep 04, 2019 5:48 am While time is frozen destroy events are not raised at all.
Care to elaborate what exactly doesn't raise events when?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

Re: cut/paste exception in editor

Post by Gouldukat »

Bilka wrote: Wed Sep 04, 2019 5:21 pm
Optera wrote: Wed Sep 04, 2019 5:48 am While time is frozen destroy events are not raised at all.
Care to elaborate what exactly doesn't raise events when?
Still i'm not in time stop when doing it ;-)


The video is working ? can you all see it ?
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: cut/paste exception in editor

Post by Optera »

I never tested LTN in scenario editor.
When talking about editor usually using the command /editor is meant.
Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

Re: cut/paste exception in editor

Post by Gouldukat »

ok for now i will just remember to manually remove station every time i need to move things up ;-)
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: cut/paste exception in editor

Post by Optera »

Bilka wrote: Wed Sep 04, 2019 5:21 pm
Optera wrote: Wed Sep 04, 2019 5:48 am While time is frozen destroy events are not raised at all.
Care to elaborate what exactly doesn't raise events when?
Seems to have nothing to do with freezing time. Instant deconstruct in editor never raises script_raised_destroy.
Gouldukat wrote: Wed Sep 04, 2019 6:01 pm ok for now i will just remember to manually remove station every time i need to move things up ;-)
Why use scenario editor in the first place?
/editor on normal saves is more stable with mods.
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: cut/paste exception in editor

Post by Bilka »

Optera wrote: Wed Sep 04, 2019 6:06 pm Seems to have nothing to do with freezing time. Instant deconstruct in editor never raises script_raised_destroy.
Your knowledge on that is outdated, as of .67 the event is raised: viewtopic.php?p=452117#p452117
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

Re: cut/paste exception in editor

Post by Gouldukat »

Optera wrote: Wed Sep 04, 2019 6:06 pm Why use scenario editor in the first place?
/editor on normal saves is more stable with mods.
... noob
i just used what i think was to freeplay and plan the base, i do not know all the ins out of stability, sorry will try with that, thank you
Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

Re: cut/paste exception in editor

Post by Gouldukat »

Just confirmed that the problem still exist in /editor ;-)

Video uploading
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: cut/paste exception in editor

Post by Optera »

Bilka wrote: Wed Sep 04, 2019 6:19 pm
Optera wrote: Wed Sep 04, 2019 6:06 pm Seems to have nothing to do with freezing time. Instant deconstruct in editor never raises script_raised_destroy.
Your knowledge on that is outdated, as of .67 the event is raised: viewtopic.php?p=452117#p452117
I was checking script_raised_destroy with 67 and 68 and didn't get it in editor.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: cut/paste exception in editor

Post by Optera »

Still can't reproduce UpdateStop recieving nil for stopID.
Enable debug log and attach the complete log file.

While trying to reproduce it though I found a different bug with stop name list not updating correctly.
Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

Re: cut/paste exception in editor

Post by Gouldukat »

https://drive.google.com/file/d/1Afah87 ... SEswF/view

video

and relaunching game to have logs ... hit an update in game ... i try to give you log but is not the same version, lets see if i can get the bug
Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

Re: cut/paste exception in editor

Post by Gouldukat »

Still manage to get it
i have no problem at repeat it
Attachments
factorio-previous.log
(27.64 KiB) Downloaded 125 times
factorio-current.log
(82.76 KiB) Downloaded 90 times
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: cut/paste exception in editor

Post by Optera »

Gouldukat wrote: Wed Sep 04, 2019 10:03 pm Still manage to get it
i have no problem at repeat it
Those logs dont have LTNs debug option enabled.
Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

Re: cut/paste exception in editor

Post by Gouldukat »

This ok ?
Attachments
factorio-current.log
(907.75 KiB) Downloaded 98 times
Gouldukat
Inserter
Inserter
Posts: 20
Joined: Sun Jun 02, 2019 9:27 pm
Contact:

Re: cut/paste exception in editor

Post by Gouldukat »

more problem from this one /sigh

in the map where i done all your tests, i now have to avoid the trigger of this problem, made blueprint of the station i wanted to copy paste, destroyed it and plop it down from the blueprint in another place

now the station keep on being purple if i leave it with that name, still that name is not used anywhere ! if i change the name in whatever it start to work again and get green

if i give back the same name now it go back to being purple :-( now i can not use that name any more and my stones and coal stops are unnameable with my name planned

how you want me to report this ? more log ?
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: cut/paste exception in editor

Post by Optera »

Gouldukat wrote: Thu Sep 05, 2019 6:14 pm more problem from this one /sigh

in the map where i done all your tests, i now have to avoid the trigger of this problem, made blueprint of the station i wanted to copy paste, destroyed it and plop it down from the blueprint in another place

now the station keep on being purple if i leave it with that name, still that name is not used anywhere ! if i change the name in whatever it start to work again and get green

if i give back the same name now it go back to being purple :-( now i can not use that name any more and my stones and coal stops are unnameable with my name planned
That's the bug i fixed while trying to reproduce your original one.

I'm currently rewriting on_tick handling from ground up which should fix your original bug and give me more freedom to spread performance out more perhaps even use n-th tick instead.
Post Reply

Return to “Logistic Train Network”