Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Imisnew2 opened this issue Aug 26, 2021 · 0 comments

Comments

@Imisnew2
Copy link

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.

Imisnew2 added a commit to Imisnew2/superwarp that referenced this issue Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant