L0laapk3 / FactorioMaps

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

Error while starting the mod #49

Closed Luke-101 closed 4 years ago

Luke-101 commented 5 years ago

Hello, so I have tried to install this mod to factorio but every time I tried to open it, it give me this error. image I also tried to modify the files but I'm not a expert on lua or python so there wasn't much I could do to discover the cause of this error. I also tried to install 3 times the mod, to specify the save file path, the facorio path and I tried to start factorio with only this mod on the mods folder but nothing will work. Any idea on how to fix this bug ?

Luke-101 commented 5 years ago

Also this is the log when I close factorio after the error:

LOG C:\Users\Luke\AppData\Roaming\Factorio\mods\L0laapk3_FactorioMaps_3.5.0>python auto.py No save name passed. Using most recent save: test factorio path: C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\factorio.exe output folder: script-output\FactorioMaps\test checking for updates enabling FactorioMaps mod cleaning up building autorun.lua building config.ini starting factorio WARNING: Running in limited support mode trough steam. Consider using standalone factorio instead. If you have any default arguments set in steam for factorio, delete them and restart the script. Please alt tab to steam and confirm the steam 'start game with arguments' popup. (Yes, you'll have to click this every time the game starts for the steam version) Process Process-2: Traceback (most recent call last): File "C:\Users\Luke\AppData\Local\Programs\Python\Python37\lib\site-packages\psutil\_pswindows.py", line 716, in wrapper return fun(self, *args, **kwargs) File "C:\Users\Luke\AppData\Local\Programs\Python\Python37\lib\site-packages\psutil\_pswindows.py", line 935, in create_time return cext.proc_create_time(self.pid) ProcessLookupError: [Errno 3] No such process During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Luke\AppData\Local\Programs\Python\Python37\lib\site-packages\psutil\__init__.py", line 473, in _init self.create_time() File "C:\Users\Luke\AppData\Local\Programs\Python\Python37\lib\site-packages\psutil\__init__.py", line 823, in create_time self._create_time = self._proc.create_time() File "C:\Users\Luke\AppData\Local\Programs\Python\Python37\lib\site-packages\psutil\_pswindows.py", line 718, in wrapper raise convert_oserror(err, pid=self.pid, name=self._name) psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=5572) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Luke\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 297, in _bootstrap self.run() File "C:\Users\Luke\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 99, in run self._target(*self._args, **self._kwargs) File "C:\Users\Luke\AppData\Roaming\Factorio\mods\L0laapk3_FactorioMaps_3.5.0\auto.py", line 185, in startGameAndReadGameLogs psutil.Process(pid).nice(psutil.BELOW_NORMAL_PRIORITY_CLASS if os.name == 'nt' else 10) File "C:\Users\Luke\AppData\Local\Programs\Python\Python37\lib\site-packages\psutil\__init__.py", line 446, in __init__ self._init(pid) File "C:\Users\Luke\AppData\Local\Programs\Python\Python37\lib\site-packages\psutil\__init__.py", line 486, in _init raise NoSuchProcess(pid, None, msg) psutil.NoSuchProcess: psutil.NoSuchProcess no process found with pid 5572
L0laapk3 commented 5 years ago

I'll have a look at it. Can you include your mods?

Luke-101 commented 5 years ago

It didn't work with any mods, but if you want I can give you the mods I use frequently

L0laapk3 commented 5 years ago

If it crashes without any other mods, I don't need any mods.

Is it crashing when you boot up the game, or when you're loading a save file? In the last case can you attach the save file?

Luke-101 commented 5 years ago

Sorry for the late reply. When I launch the game, it loads verything but then it gives me this error. the test save that you see in the log is a new world without any building. If you want there it is: test.zip

L0laapk3 commented 5 years ago

Unfortunately my laptop is kind of broken so I don't really have the means to check it out right now, but this sounds extremely weird, unless a factorio update broke something significant, not being able to load the game at all with no other mods at all makes me very confused and I would have definitely caught that or someone else would have. I will check it out when I can but it might take me some time.

Luke-101 commented 5 years ago

ok sure, take your time. In the meanwhile I will test some other things because it's also the only mod to give me this error, that's the real strange thing

Luke-101 commented 5 years ago

I just tested 2 other maps, created one when the mod was one and the other when it was off, and they gave me the same error (1° post) when I tried to opened them. I also tried to reinstall factorio before this test

L0laapk3 commented 5 years ago

I've tried to reproduce your error, but it just works normally for me without mods. The error from your screenshot does hint that there are some other mods causing some issues, are you sure that the error occurs with no other mods enabled?

Luke-101 commented 5 years ago

yes I'm sure. Just to be clear: to start with a new save file, you have to open factorio normaly, save and then open factorio with cmd auto.py (with the other istance of factorio closed), right ? Also the path for the mods is: C:\Users\Luke\AppData\Roaming\Factorio\mods, right ?

L0laapk3 commented 5 years ago

as long as the savefile exists you should be able to run the python auto.py command yea, you dont need to be running anything else.

Can you run it with --verbosegame as flag and see what it spits out?

Luke-101 commented 5 years ago

`C:\Users\Luke\AppData\Roaming\Factorio\mods\L0laapk3_FactorioMaps_3.5.0>python auto.py --verbosegame No save name passed. Using most recent save: test3 factorio path: C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\factorio.exe output folder: script-output\FactorioMaps\test3 checking for updates enabling FactorioMaps mod cleaning up building autorun.lua building config.ini starting factorio [GAME] 0.000 Initializing Steam API. WARNING: Running in limited support mode trough steam. Consider using standalone factorio instead. If you have any default arguments set in steam for factorio, delete them and restart the script. Please alt tab to steam and confirm the steam 'start game with arguments' popup. (Yes, you'll have to click this every time the game starts for the steam version) [GAME] 0.001 2019-10-08 20:09:11; Factorio 0.17.68 (build 47074, win64, steam) [GAME] 0.001 Operating system: Windows 10 (version 1809) [GAME] 0.001 Program arguments: "C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\factorio.exe" "--load-game" "C:\Users\Luke\AppData\Roaming\Factorio\saves\test3.zip" "--disable-audio" "--config" "C:\Users\Luke\AppData\Local\Temp\FactorioMaps-750382279\config/config.ini" "--mod-directory" "C:\Users\Luke\AppData\Roaming\Factorio\mods" "--disable-migration-window" [GAME] 0.001 Read data path: C:/Program Files (x86)/Steam/steamapps/common/Factorio/data [GAME] 0.001 Write data path: C:/Users/Luke/AppData/Local/Temp/FactorioMaps-750382279 [84647/242934MB] [GAME] 0.002 Binaries path: C:/Program Files (x86)/Steam/steamapps/common/Factorio/bin [GAME] 0.027 System info: [CPU: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx, 8 cores, RAM: 5543/10153 MB, page: 8803/11689 MB, virtual: 4273/134217727 MB, extended virtual: 0 MB] [GAME] 0.027 Display options: [FullScreen: 1] [VSync: 1] [UIScale: custom (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 0000] [Lang: en] [GAME] 0.035 Available displays: 1 [GAME] 0.035 [0]: \.\DISPLAY1 - AMD Radeon(TM) Vega 8 Graphics {0x80005, [0,0], 1920x1080, 32bit, 60Hz} [GAME] 0.083 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll [GAME] 0.145 Initialised Direct3D[0]: AMD Radeon(TM) Vega 8 Graphics; id: 1002-15d8; driver: aticfx64.dll 26.20.11002.12 [GAME] 0.145 D3D Feature Level: 11.1, DXGI 1.5+, SwapChain: 3,flip-discard,-,-,-,none [GAME] 0.145 [Local Video Memory] Budget: 6398MB, CurrentUsage: 0MB, Reservation: 0/3377MB [GAME] 0.145 [Non-Local Vid.Mem.] Budget: 0MB, CurrentUsage: 0MB, Reservation: 0/0MB [GAME] 0.145 Tiled resources: Tier 2 [GAME] 0.145 Unified Memory Architecture: Yes [GAME] 0.145 BGR 565 Supported: Yes [GAME] 0.145 MaximumFrameLatency: 3, GPUThreadPriority: 0 [GAME] 0.146 Graphics settings preset: integrated-gpuhigh [GAME] 0.146 Dedicated video memory size 2032 MB [GAME] 0.221 Desktop composition is active. [GAME] 0.221 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 100%] [DXT: low-quality] [GAME] 0.221 [Max load threads: 32] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: low] [Color: 32bit] [GAME] 0.221 Audio is disabled [GAME] 0.447 Loading mod core 0.0.0 (data.lua) [GAME] 0.747 Loading mod base 0.17.68 (data.lua) [GAME] 1.766 Loading mod base 0.17.68 (data-updates.lua) [GAME] 1.945 Loading mod L0laapk3_FactorioMaps 3.5.0 (data-final-fixes.lua) [GAME] 1.961 Error ModManager.cpp:1323: Failed to load mod "L0laapk3_FactorioMaps": Flush failed: Invalid argument stack traceback: [C]: in function 'log'
L0laapk3_FactorioMaps/data-final-fixes.lua:46: in function 'index'
L0laapk3_FactorioMaps
/data-final-fixes.lua:53: in main chunk
[GAME] 1.964 Loading mod core 0.0.0 (data.lua) [GAME] 2.100 Checksum for core: 3551490305 [GAME] 2.311 Error ModManager.cpp:1323: Error in assignID, recipe-category with name 'crafting' does not exist.

Source: default (utility-sprites). [GAME] 2.336 Crop bitmaps. [GAME] 2.364 Parallel Sprite Loader initialized (threads: 7) [GAME] 2.404 Initial atlas bitmap size is 16384 [GAME] 2.405 Created atlas bitmap 2048x416 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level] [GAME] 2.417 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82 [GAME] 2.444 Parallel Sprite Loader initialized (threads: 7) [GAME] 2.532 Sprites loaded [GAME] 2.546 Generated mipmaps (5) for atlas [0] of size 2048x416 [GAME] 2.546 Custom mipmaps uploaded. [GAME] 2.558 Factorio initialised [GAME] 2.569 Mods to disable:Failed to load mods: Flush failed: Invalid argument stack traceback: [C]: in function 'log'
L0laapk3_FactorioMaps/data-final-fixes.lua:46: in function 'index'
L0laapk3_FactorioMaps
/data-final-fixes.lua:53: in main chunk

Mods to be disabled: • L0laapk3_FactorioMaps`

L0laapk3 commented 5 years ago

this makes very little sense to me. I assume you also haven't messed with the base games files since you did a reinstall.

Can you post the log after you replace the data-final-fixes.lua file of factoriomaps with this one? https://transfer.sh/YU7sh/data-final-fixes.lua
I've added some extra logs.

OvermindDL1 commented 5 years ago
[GAME] 2.311 Error ModManager.cpp:1323: Error in assignID, recipe-category with name 'crafting' does not exist.

Source: default (utility-sprites).

Uh, what? This seems really odd... Is your factorio installation corrupt?

Luke-101 commented 5 years ago

So when I read again the log I noticed that I was on 0.17.68 and not the latest 0.17.69. So I forced the update from steam and then I redone the test and to my surprase there wasn't any error message but when the world was fully loaded the game crashed. This are the logs (verbose was very long this time so I put theme in files)(Multiple logs because the errors were different every time): log.txt log2.txt

So I think OvermindDL1 was right and my factorio was corrupt but not so much to crash when I played without this mod, very strange.

P.S. the last percentage can very from 0.3% to 100% (as in the log)

L0laapk3 commented 5 years ago

Nice that the original issue got resolved.

Further, theres a possibility previous attempts at this mod are causing the current attempts to also crash, can you --delete the script-output/factoriomaps/savename folder of the map youre trying to generate? Let me know if that fixes things.

Luke-101 commented 5 years ago

I tried to delete the folder manually and then with the argument but it instant crash after the sub hotbar (the copy, paste, delete one) disappeared, and my fps were below 10 But the files created are perfect P.S. the console after the crash writes "Processing test/1/nauvis/night (2 of 2)"

L0laapk3 commented 5 years ago

Sorry, what? I think you're confusing multiple things. When factoriomaps takes control, it completely freezes your game and then exits it, at no point can it cause bad fps. Did the map generate successfully?

Luke-101 commented 5 years ago

Well I think because the game just started when the crash appens probably It doesn't have any time to update that label. I was only writing down everything I saw. Just to be sure, can you give me a save to test ?

L0laapk3 commented 5 years ago

It should be able to generate a map of any save. Note that in the savefile you uploaded earlier, factoriomaps had already ran, you should not be saving after factoriomaps runs.

Can you describe the problem you're having from start? In the logs you posted, the first one seemed to just be caused by an artifact from previous failed runs and the second one seems to have been ended prematurely from what I can tell.

Luke-101 commented 5 years ago

So this was my process:

  1. started factorio normally
  2. created a map
  3. save the map as "tt"
  4. open factorio with the command: "python auto.py tt --verbosegame --delete"
  5. factorio started normaly, it loaded the map "tt"
  6. it crashed after a popup with a error message appeard
  7. this is the log for this time: log3.txt
OvermindDL1 commented 5 years ago

[GAME] 29.852 Quitting: window closed. Still makes me curious. It's not being manually closed? Or is that just what windows does when it receives a kill signal (where at least for me it says it received a kill signal and is dying)?

Luke-101 commented 5 years ago

Because there is a little confusion on what happens I made a video: video

OvermindDL1 commented 5 years ago

Any chance at using the current dev branch of this mod? The L0laapk3 added some debugging things recently that might help. If you aren't using git you can download a copy of it at https://github.com/L0laapk3/FactorioMaps/archive/dev.zip and just rename things as appropriate/usual. Then delete the entire script-output/FactorioMaps directory in your factorio work directory, then post the log after another run while running it with --verbose and --verboseGame or whatever it was? :-)

Luke-101 commented 5 years ago

log4.txt

OvermindDL1 commented 5 years ago

Hmm, interesting. Did it generate a proper map or is it 'wrong' somehow when you view it in the browser?

L0laapk3 commented 5 years ago

log3 and log4 look like, while there is an error, the map should be fully generated correctly. Is this true?

Luke-101 commented 5 years ago

yes it's true the files for the map works perfectly

L0laapk3 commented 4 years ago

Since its non critical and I cant manage to replicate it whatsoever, Im going to go ahead and close this ticket.