Files
integration/Plugins/UEWingman/Source/UEWingman/Private/WingServer.md
2026-04-08 19:39:39 -04:00

1.1 KiB

WingServer Bug Report

1. Stale global server pointer after startup failure

Initialize() assigns GWingServer = this before the socket has actually been created, bound, and listened on. If any of those steps fail, the function returns early, and Deinitialize() also returns early when bRunning is still false, so GWingServer is never cleared again. That leaves the static helpers in WingServer.h pointing at an object that is no longer a valid running server, which can crash later calls or make commandlet-mode ticking silently operate on a dead subsystem.

2. Handler registry is not invalidated on module unload

OnModulesChanged() rebuilds the handler registry only when Reason == EModuleChangeReason::ModuleLoaded, so module unloads are ignored. In an editor session with hot reload or plugin unload, WingHandlerRegistry can keep commands whose UClass objects have gone away, which means the server may advertise or dispatch stale handlers into unloaded code. The registry needs to be refreshed or cleared for unloads as well, not just loads.