[2.0.44] Error message with invalid characters when modifying color LUTs

Place for things which are bugs but we have no idea how to solve them. Things related to hardware, libraries, strange setups, etc.
Osmo
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

[2.0.44] Error message with invalid characters when modifying color LUTs

Post by Osmo »

Steps to reproduce:
- Make an empty mod
- Put the following code in data-updates.lua

Code: Select all

data.raw["utility-constants"]["default"].daytime_color_lookup = {{0, "__core__/invalid-path"}}
The following error message appears, containing invalid characters:

Code: Select all

Failed to load mods: Failed to get last_write_time: �� ������� ����� ��������� ����.: "F:\SteamLibrary\steamapps\common\Factorio\data\core\invalid-path": __core__/invalid-path
This is what it looks like ingame:
изображение.png
изображение.png (15.97 KiB) Viewed 293 times
Expected behavior would be an error message like this:

Code: Select all

Failed to load mods: File __core__/invalid-path not found
Attachments
factorio-current.log
(7.35 KiB) Downloaded 25 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 15676
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.44] Error message with invalid characters when modifying color LUTs

Post by Rseding91 »

Thanks for the report however I am unable to reproduce any issue. When I test I get this:
04-08-2025, 09-54-05.png
04-08-2025, 09-54-05.png (18.11 KiB) Viewed 238 times
If you want to get ahold of me I'm almost always on Discord.
eugenekay
Filter Inserter
Filter Inserter
Posts: 504
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.44] Error message with invalid characters when modifying color LUTs

Post by eugenekay »

What Operating System / File System are you using? Windows-NTFS, with the Cyrillic extensions it looks like? Not Fat32 / ReFS or anything weird?

Factorio uses standardized functions & error handling for disk operations, but some filesystems provide different Error codes. It looks like both of these are failing the same at “last_write_time”, which would be attempting a fopen() call.

In any case, it sure seems like Factorio is handling this properly with an Error message instead of a Crash: it just isn’t 100% complete.

Edit: It’s even simpler. Windows localizes error messages by default. The string “the system cannot find the file specified” is being generated by the OS; not by Factorio; so it is being passed in Cyrillic. Factorio is (probably) only expecting ASCII characters in the error message, so you get funky Unicode boxes. Change your OS language to English and retry to confirm.

Here is the (proper) Error string: не удается найти указанный файл. Note that the word- spacings are the exact same as your error message: 2-7-5-9-4.

Good Luck!
Osmo
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: [2.0.44] Error message with invalid characters when modifying color LUTs

Post by Osmo »

It does seem to be related to system locale, however this is different from loading an image in other parts of the game, where there is presumably a custom error message in the game. The example i provided is what it looks like when specifying an invalid path in other places, such as icons

Code: Select all

Failed to load mods: File __core__/invalid-path not found
It looke like color LUTs in particular dont use the same error handling as other image files
Post Reply

Return to “1 / 0 magic”