Cryptic error help

Place to get help with not working mods / modding interface.
User avatar
KyuVulpes
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Apr 02, 2026 1:58 am
Contact:

Cryptic error help

Post by KyuVulpes »

I have been slowly chipping away at porting a mod I forked a while ago. Slowly chipping things away during the porting to 2.0. However, after a point, I suddenly got this error message:

Code: Select all

1.141 Error ModManager.cpp:1767: Failed to load mod "Kyus_Realistic_Electric_Trains_fix": bad argument #6 of 8 to '?' (string expected, got table)
stack traceback:
	[C]: in ?
Does anyone have an idea as to what could be causing this? I've asked friends, I tried to see if the local AI/LLM's I have on my machine could figure it out. Nothing seems to change, I've tried following the execution order and commenting things out code that way, but I don't think I fully understand what is going on. If anyone wants to have a look at the code, it can be found on my personal GitLab and on GitLab.

I have attached the log file, but I have also inlined it here:

Code: Select all

   0.000 2026-04-01 20:52:00; Factorio 2.0.76 (build 84451, linux64, steam, space-age)
   0.110 Operating system: Linux (Arch rolling)
   0.000 Initializing Steam API.
   0.110 Program arguments: "/home/kyu/mounts/Games/SteamLibrary/steamapps/common/Factorio/bin/x64/factorio" 
   0.110 Config path: /home/kyu/.factorio/config/config.ini
   0.110 Read data path: /home/kyu/mounts/Games/SteamLibrary/steamapps/common/Factorio/data
   0.110 Write data path: /home/kyu/.factorio [394594/953869MB]
   0.110 Binaries path: /home/kyu/mounts/Games/SteamLibrary/steamapps/common/Factorio/bin
   0.118 System info: [CPU: AMD Ryzen 7 5800X3D 8-Core Processor, 16 cores, RAM: 128725 MB]
   0.118 Environment: DISPLAY=:1 WAYLAND_DISPLAY=wayland-0 DESKTOP_SESSION=plasma XDG_SESSION_DESKTOP=KDE XDG_CURRENT_DESKTOP=KDE SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.121 Display options: [FullScreen: true] [VSync: true] [UIScale: automatic (100.0%)] [Native DPI: true] [Screen: 0] [Special: lmw] [Lang: en]
   0.497 Video driver: wayland
   0.497 Available displays: 3
   0.497  [0]: Acer Technologies XB273U Z - {[2560,0], 2560x1440, SDL_PIXELFORMAT_RGB888, 240Hz}
   0.497  [1]: Acer Technologies KG271U - {[5120,0], 2560x1440, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.497  [2]: Microstep MSI MP273Q E2 - {[0,0], 2560x1440, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.611 Initialised OpenGL:[0] zink Vulkan 1.4(AMD Radeon RX 7900 XT (RADV NAVI31) (MESA_RADV)); driver: 4.6 (Core Profile) Mesa 26.0.3-arch1.1
   0.611   [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes, ARB_pipeline_statistics_query:yes, ARB_gl_spirv:yes, ARB_ES2_compatibility:yes
   0.611   [Version] 4.6
   0.611 Verbose GraphicsInterfaceOpenGL.cpp:1020: [Caps] Tex:16384, TexArr:8192, TexBufSz:524288kB; TexUnits:160; UboSz:2097151kB
   0.736 Graphics settings preset: very-high
   0.736   Dedicated video memory size 20464 MB (detected from AMD Radeon RX 7900 XT (RADV NAVI31); VendorID: 0x1002; DeviceID: 0x744c)
   0.747 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality]
   0.747                   [Max threads (load/render): 32/14] [Max texture size: 0] [Tex.Stream.: false] [Rotation quality: normal] [Other: STDCWTl] [B:0,C:0,S:100]
   0.768 [Audio] Driver:pipewire, Device:Game Audio, Depth:16, Frequency:44100, Channels:2, Interpolation:linear
   0.826 Joystick device connected: instance: 0, Thrustmaster T.16000M
   0.826 Joystick device connected: instance: 1, Thrustmaster TWCS Throttle
   0.988 Info ModManager.cpp:449: FeatureFlag expansion-shaders = false
   0.988 Info ModManager.cpp:449: FeatureFlag freezing = false
   0.988 Info ModManager.cpp:449: FeatureFlag quality = false
   0.988 Info ModManager.cpp:449: FeatureFlag rail-bridges = false
   0.988 Info ModManager.cpp:449: FeatureFlag segmented-units = false
   0.988 Info ModManager.cpp:449: FeatureFlag space-travel = false
   0.988 Info ModManager.cpp:449: FeatureFlag spoiling = false
   1.000 Verbose PipelineStateObject.cpp:104: Time to load shaders: 0.011422 seconds.
   1.001 Loading mod settings Kyus_Realistic_Electric_Trains_fix 0.4.9 (settings.lua)
   1.004 Loading mod core 0.0.0 (data.lua)
   1.022 Loading mod base 2.0.76 (data.lua)
   1.135 Loading mod Kyus_Realistic_Electric_Trains_fix 0.4.9 (data.lua)
   1.141 Error ModManager.cpp:1767: Failed to load mod "Kyus_Realistic_Electric_Trains_fix": bad argument #6 of 8 to '?' (string expected, got table)
stack traceback:
	[C]: in ?
   1.143 Loading mod core 0.0.0 (data.lua)
   1.168 Checksum for core: 1551277403
   1.193 Error ModManager.cpp:1767: Error in assignID: recipe-category with name 'recycling' does not exist.

Source: default (utility-constants).
   1.194 Verbose ModManager.cpp:648: Time to load mods: 0.205841
   1.197 Info PlayerData.cpp:66: Local player-data.json unavailable
   1.197 Info PlayerData.cpp:69: Cloud player-data.json available, timestamp 1774952690
   1.198 Post-data load graphics options: [Light occlusion: YES]
   1.272 Initial atlas bitmap size is 16384
   1.272 Created an atlas bitmap (size 4096x496) [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.272 Loading 3D bitmaps.
   1.284 Verbose TextureProcessor.cpp:1135: GPU accelerated compression test: Time 11.796 ms; YCoCg_DXT PSNR: 35.83, BC3 PSNR: 33.82
   1.284 Texture processor created (4096). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   1.285 Parallel sprite loader initialized (threads: 15, bitmaps: 146)
   1.349 Sprites loaded
   1.352 Generated mipmaps (5) for atlas [0] of size 4096x496   
   1.353 Custom mipmaps uploaded (117)
   1.353 Verbose AtlasBuilder.cpp:830: Atlas memory size: 7.75MB; 0.00MB (virtual)
   1.353 Verbose AtlasBuilder.cpp:703: Size of sprites outside of atlas: 0.00MB
   1.353 Verbose ParallelSpriteLoader.cpp:145: Sprite loader stats> Worker loaded max size: 2.78MB, Total worker loaded max size: 5.22MB
   1.353 Verbose AtlasBuilder.cpp:1336: Prepared alpha-mask lookup table. Count = 1
   1.365 Video memory usage: 10.32 MB (Atlases: 10.32 MB, Textures: 0.00 MB)
   1.368 Factorio initialised
   1.385 Verbose SteamContext.cpp:577: SteamUserStats initialized.
1555.092 Quitting: user-quit.
1555.192 Steam API shutdown.
1555.194 Goodbye
Attachments
factorio-current.log
(5.32 KiB) Downloaded 3 times
User avatar
Osmo
Filter Inserter
Filter Inserter
Posts: 261
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: Cryptic error help

Post by Osmo »

You have a table somewhere in data.raw which expects a string (or possibly some other type mismatch). The game then fails to load prototypes due to that. Where is the question, and the error is not helpful. Usually the game tells the prototype in which the error occured, but sometimes stuff like this can happen. Your best bet is probably not data.extending some prototypes until you find the one that causes the error.
User avatar
KyuVulpes
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Apr 02, 2026 1:58 am
Contact:

Re: Cryptic error help

Post by KyuVulpes »

Osmo wrote: Thu Apr 02, 2026 3:20 am You have a table somewhere in data.raw which expects a string (or possibly some other type mismatch). The game then fails to load prototypes due to that. Where is the question, and the error is not helpful. Usually the game tells the prototype in which the error occured, but sometimes stuff like this can happen. Your best bet is probably not data.extending some prototypes until you find the one that causes the error.
Ok, that helps me get on a track of where I should be looking. Thank you.
Post Reply

Return to “Modding help”