Skip to content

_modList.setActive does not function correctly when called within _organizer.onFinishedRun #2280

@KylerNyhagen

Description

@KylerNyhagen

The problem:

When developing a plugin that disables and re-enables plugins when a tool is started and when a tool is finished, I observed that setActive for mods does not function properly when called within onFinishedRun - The behavior is inconsistent, if called through a for loop (where each mod is passed individually), the first mod will fail, the rest will work.

If passed as a list, all mods fail to reload their plugins.

To Reproduce:

Steps to reproduce the behavior:

  1. create an onFinishedRun that sets a mods state to active when an application is closed
  2. Open and close the application
  3. Observe the mod does not properly reload the plugins associated with the mod
  4. use the same setActive function on a plugintool button, observe it launches fine

Video of reproduction:

Reproduction

Environment:

  • Mod Organizer Version that exhibits the issue: 2.5.2
  • Last Mod Organizer Version that did not exhibit the issue (if applicable): N/A
  • Desktop OS/version used to run Mod Organizer: Windows 11

Details:

Video of reproduction and details are attached.

Link to Mod Organizer logs:

Right click on the log window at the bottom of MO2, set log level to debug, restart Mo2 and reproduce the problem.
To access the log files you can press the Open folder icon over the modlist and select "Open MO2 Logs folder".

USVFS:

GIST

MO Interface:

GIST

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions