Skip to content

_rotate_log_file breaks non-debug web exports #570

@rikmarais

Description

@rikmarais

https://github.com/GodotModding/godot-mod-loader/blob/4.x-dev/addons/mod_loader/api/log.gd#L587 and https://github.com/GodotModding/godot-mod-loader/blob/4.x-dev/addons/mod_loader/setup/setup_log.gd#L178 assert when a log_file cannot be created but lack an early exit.

In non-debug web exports, the asserts are ignored and there is an obscure index out of bounds exception.

Image

In a debug web export, the asserts appear in the browser console, but there's no index out of bounds exception.

Image

I'm not sure why the log file can't be created in a web export or why it causes an exception in a non-debug export but not in a debug export, though.

Here is a minimal reproducible example project:
modloaderwebrelease.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.xbugSomething isn't workingweb

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions