FyroxEngine/Fyrox · warning

Unable to load options file

Error message

Unable to load options file {:?}, fallback to defaults! Reason: {}

What it means

When loading a resource's options file fails with an error other than NotFound (which is treated as 'no options' and silently returns None), Fyrox logs this warning and falls back to default import options. It means the options file exists or the filesystem error is otherwise unexpected, but it could not be read/parsed as an IO-level load.

Solutions

  1. Check filesystem permissions on the .options file and its directory.
  2. Close processes holding the file (editors, sync tools) and retry the load.
  3. Delete the unreadable options file and let the importer regenerate it with defaults.
  4. Inspect the 'Reason' in the log message for the underlying io::ErrorKind.

Example fix

// before: options file with 000 permissions
-rw-------  texture.options
// after
chmod 644 texture.options
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: io.load_file on the settings path returns a FileError that is not Io-NotFound — e.g. permission denied, read failure, or a non-IO error — inside try_get_import_settings during resource load.

Common situations: Options file locked by another process, read-permission problems after copying assets with wrong ownership, disk/device errors, or network-mounted asset drives dropping offline.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of FyroxEngine/Fyrox@76c91aad8e (2026-09-10). Data as JSON: /api/errors/c2c83a415a5f02d6. Report an issue: GitHub.

Appendix: source

Thrown at fyrox-resource/src/options.rs:103

                Log::warn(format!(
                    "Malformed options file {:?}, fallback to defaults! Reason: {}",
                    settings_path, e
                ));

                None
            }
        },
        Err(e) => {
            // Missing options file is a normal situation, the engine will use default import options
            // instead. Any other error indicates a real issue that needs to be highlighted to the
            // user.
            if let FileError::Io(ref err) = e {
                if err.kind() == ErrorKind::NotFound {
                    return None;
                }
            }

            Log::warn(format!(
                "Unable to load options file {:?}, fallback to defaults! Reason: {}",
                settings_path, e
            ));

            None
        }
    }
}

/// Same as [`try_get_import_settings`], but returns opaque import settings.
pub async fn try_get_import_settings_opaque<T>(
    resource_path: &Path,
    io: &dyn ResourceIo,
) -> Option<Box<dyn BaseImportOptions>>
where
    T: ImportOptions,
{
    try_get_import_settings::<T>(resource_path, io)

View on GitHub (pinned to 76c91aad8e)