GodotModding / GodotModding/godot-mod-loader

`_rotate_log_file` breaks non-debug web exports

Open
#570 2 comments 0 reactions 0 assignees View on GitHub
4.x bug web
Dominant language
GDScript
Stars
675
Forks
54
Avg merge
2m
Merged PRs (30d)
2

Description

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](https://github.com/user-attachments/files/21760155/modloaderwebrelease.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.