#Error trying to move to a profile

1 messages · Page 1 of 1 (latest)

waxen mist
#

[2025-11-30][20:02:28][tao::platform_impl::platform::event_loop::runner][WARN] NewEvents emitted without explicit RedrawEventsCleared
[2025-11-30][20:02:28][tao::platform_impl::platform::event_loop::runner][WARN] RedrawEventsCleared emitted without explicit MainEventsCleared
[2025-11-30][20:02:30][panic][ERROR] thread 'tokio-runtime-worker' panicked at 'index out of bounds: the len is 1 but the index is 1': src\events\outbound\states.rs:40

The software doesn't change to the selected profile.

upper wolfBOT
waxen mist
#

i fixed it by doing

    let instance = instance.clone();
    if state as usize >= instance.states.len() {
        return Err(anyhow::anyhow!("State index out of bounds: {} >= {}", state, instance.states.len()));
    }

in line 39 of states.rs

odd wing
#

the fix stops problematic actions being added

waxen mist
#

i mean, the problem was that it was working and post-restart that profile wasn't, so maybe it would be good to throw an error instead of panicking?

odd wing
#

unless you set that property manually in the config to make it panic

waxen mist
#

yeah, no, 2.7.1 still has the same bug

#

maybe it fixed putting new elements that causes the bug, but the panic itself hasn't been addressed

odd wing
odd wing
#

thanks for the PR @waxen mist, edited and merged

#

-# but it is patched both in the set_state and in the Multi OBS plugin so not really that necessary

waxen mist
#

Maybe I needed to recreate the folder with the new fix ñ

#

Thank you for considering merging it!

odd wing