Skip to content

Windower hanging on shutdown / returning to POL when addon uses packets API in 'unload' event. #1079

@Imisnew2

Description

@Imisnew2

If an addon has registered an unload event, then Windower may hang when returning to POL (e.g. via hitting 'back' from the title screen) or when shutting down (e.g. via the /shutdown text command).

Here is a minimal addon reproducer.

_addon.name = 'Testing'
_addon.author = 'Imisnew'
_addon.commands = {'testing'}
_addon.version = '1.0.0.0'

windower.register_event('unload', function()
    -- Unsure if the packet type is relevant
    windower.packets.inject_incoming(0x052, string.char(0,0,0,0,0,0,0,0))
    windower.packets.inject_incoming(0x052, string.char(0,0,0,0,1,0,0,0))
end)

The steps to reproduce would be:

  • Disable all addons and plugins (e.g. only LuaCore is loaded when FFXI starts)
    • I achieved this by editing 'autoload.txt' after logging into POL
  • Load this addon
  • Either: /shutdown, or /logout followed by backing out of the title screen so that we return to POL.

Some popular addons have code that injects packets on unload, which is how this was discovered.

Note: Other APIs, such as print(...) can also cause Windower to either hang or crash (with a C++ runtime error), but these were not observed to reliably cause Windower to hang or crash.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions