L0laapk3 / FactorioMaps

L0laapk3's FactorioMaps mod
https://mods.factorio.com/mod/L0laapk3_FactorioMaps
Other
118 stars 22 forks source link

Possible race condition #89

Closed skairunner closed 3 years ago

skairunner commented 3 years ago

Using this save file and running python auto.py with no arguments, the conversion process stalls on this step:

image

Is this a hang or is it just taking a while to process? It worked on a previous version of the save. neerskai v2.zip

L0laapk3 commented 3 years ago

Thats strange. Can you run with --verbose and kill it (ctrl + c) to see where exactly it hangs?

skairunner commented 3 years ago

This is the log. factoriomapslog.txt

It's certainly getting interrupted in the middle of parallel code, but I don't think that's saying much :P There's also a whole host of "unidentified image error"s that interrupt the progress bar.

Edit: Also, the process refuses to die, no matter how many times i try to SIGINT.

L0laapk3 commented 3 years ago

Is it possible your storage is temporarily full while it is running? It seems like factorio is struggling saving the images. --verbosegame will likely reveal why

skairunner commented 3 years ago

It seems to work fine when --verbosegame is enabled. I have to say that it has got to be some kind of race condition or deadlock.

Edit: Perhaps I spoke too soon. I ran it with --verbosegame on a renamed copy of an older save, which worked fine, but running it on the actual save causes it to hang again, and there are no further messagse after "killed factorio".

Edit2: Okay, so I have to assume that saving to the same filename is not possible. What do I need to do to manually merge timelines that were created with different names?

Edit3: Here's a different error 🤔
image

L0laapk3 commented 3 years ago

You're positive that it can't have been a storage space issue? Since it seems like therr were a ton of images that factorio failed to save.

skairunner commented 3 years ago

I have 32 GB ram and 1 TB ssd, of which 800GB is free, and I've only played 9 hours on the save. I dont think it's storage issues?

On Sun, Oct 11, 2020, 21:12 L0laapk3 notifications@github.com wrote:

You're positive that it can't have been a storage space issue? Since it seems like therr were a ton of images that factorio failed to save.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/L0laapk3/FactorioMaps/issues/89#issuecomment-706753958, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA22VO7Z3SW3JWFYAPK3YSTSKH7Q5ANCNFSM4SLLZONA .

L0laapk3 commented 3 years ago

Okay sounds fair, I just wanted to make sure :p strange that it failed, there might indeed be some weird race condition somewhere.

skairunner commented 3 years ago

I also have 16 processors, maybe I could try re-running with just 1...

L0laapk3 commented 3 years ago

Did you end up resolving this? Weird. I've had one or two similar issues made by people in the past, but I've never been able to reproduce it.

skairunner commented 3 years ago

Unfortunately I just gave up on using factorio maps instead :(

On Sun, Oct 18, 2020, 01:02 L0laapk3 notifications@github.com wrote:

Did you end up resolving this? Weird. I've had one or two similar issues made by people in the past, but I've never been able to reproduce it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/L0laapk3/FactorioMaps/issues/89#issuecomment-711091252, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA22VOYVFJIQ2BRMNS53D3TSLIPBNANCNFSM4SLLZONA .

L0laapk3 commented 3 years ago

Thats unfortunate. I've tried running it on your savefile just now and it worked for me. I've had another look at your logs, and they indicate that it was ran on an already existing timeline. This means my test conditions are not the same as yours. Just to be clear, if factoriomaps has already crashed or hung once, chances are the timeline ended up in a "bricked" state and factoriomaps couldn't build further on it anymore. While its possible to manually correct this, its usually simpler to just delete the respective output folder inside script-output and run the script again.

If you decide to give it another go, feel free to contact me. :P

skairunner commented 3 years ago

What I would most like is some way to combine timelines from multiple files. I have backups saved for my main game under different names, and the script usually works for a fresh save, so if I could combine them...

On Sun, Oct 18, 2020, 02:21 L0laapk3 notifications@github.com wrote:

Thats unfortunate. I've tried running it on your savefile just now and it worked for me. I've had another look at your logs, and they indicate that it was ran on an already existing timeline. This means my test conditions are not the same as yours. Just to be clear, if factoriomaps has already crashed or hung once, chances are the timeline ended up in a "bricked" state and factoriomaps couldn't build further on it anymore. While its possible to manually correct this, its usually simpler to just delete the respective output folder inside script-output and run the script again.

If you decide to give it another go, feel free to contact me. :P

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/L0laapk3/FactorioMaps/issues/89#issuecomment-711097535, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA22VOZNGVB3FP4W4XUX7OLSLIYJNANCNFSM4SLLZONA .

L0laapk3 commented 3 years ago

Its not entirely clear to me what your intention is. Its possible to append savefiles to timelines already

L0laapk3 commented 3 years ago

Closing. feel free to reopen