Rework on NameplateService/Handler instead of using Nameplate to ImGUI #90

Closed
opened 2025-11-21 23:45:17 +00:00 by cake · 1 comment
Member

At the moment, we are using the Lightfinder bar with the Nameplate handler of the Dalamud; we want to move away from it to use ImGUI, as people are crashing using this Nameplate handler.

Crash reports:
Application: ffxiv_dx11.exe
CoreCLR Version: 9.0.325.11113
.NET Version: 9.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack:
   at System.Runtime.ExceptionServices.InternalCalls.<RhpSfiInit>g____PInvoke|0_0(System.Runtime.StackFrameIterator*, Void*, Int32, Boolean*)
   at System.Runtime.ExceptionServices.InternalCalls.<RhpSfiInit>g____PInvoke|0_0(System.Runtime.StackFrameIterator*, Void*, Int32, Boolean*)
   at System.Runtime.EH.DispatchEx(System.Runtime.StackFrameIterator ByRef, ExInfo ByRef)
   at System.Runtime.EH.RhThrowHwEx(UInt32, ExInfo ByRef)
   at LightlessSync.Services.NameplateHandler.UpdateNameplateNodes()
   at Dalamud.Game.Addon.Lifecycle.AddonLifecycle.InvokeListenersSafely(Dalamud.Game.Addon.Lifecycle.AddonEvent, Dalamud.Game.Addon.Lifecycle.AddonArgTypes.AddonArgs, System.String)
   at Dalamud.Game.Addon.Lifecycle.AddonLifecycle.OnAddonDraw(FFXIVClientStructs.FFXIV.Component.GUI.AtkUnitBase*)
   at Dalamud.Game.Framework.HandleFrameworkUpdate(FFXIVClientStructs.FFXIV.Client.System.Framework.Framework*)
   
Application: ffxiv_dx11.exe
CoreCLR Version: 9.0.325.11113
.NET Version: 9.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack:
   at System.Runtime.ExceptionServices.InternalCalls.<RhpSfiInit>gPInvoke|0_0(System.Runtime.StackFrameIterator, Void, Int32, Boolean*)
   at System.Runtime.ExceptionServices.InternalCalls.<RhpSfiInit>gPInvoke|0_0(System.Runtime.StackFrameIterator, Void, Int32, Boolean)
   at System.Runtime.EH.DispatchEx(System.Runtime.StackFrameIterator ByRef, ExInfo ByRef)
   at System.Runtime.EH.RhThrowHwEx(UInt32, ExInfo ByRef)
   at LightlessSync.PlayerData.Handlers.PairHandler.get_PlayerCharacterId()
   at LightlessSync.Services.NameplateHandler+<>c.<get_VisibleUserIds>b42_0(LightlessSync.PlayerData.Pairs.Pair)
   at System.Linq.Enumerable+ListWhereSelectIterator`2[[System.Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.UInt64, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at LightlessSync.Services.NameplateHandler.get_VisibleUserIds()
   at LightlessSync.Services.NameplateHandler.UpdateNameplateNodes()
   at LightlessSync.Services.NameplateHandler.NameplateDrawDetour(Dalamud.Game.Addon.Lifecycle.AddonEvent, Dalamud.Game.Addon.Lifecycle.AddonArgTypes.AddonArgs)
   at Dalamud.Game.Addon.Lifecycle.AddonLifecycle.InvokeListenersSafely(Dalamud.Game.Addon.Lifecycle.AddonEvent, Dalamud.Game.Addon.Lifecycle.AddonArgTypes.AddonArgs, System.String)
   at Dalamud.Game.Addon.Lifecycle.AddonLifecycle.OnAddonDraw(FFXIVClientStructs.FFXIV.Component.GUI.AtkUnitBase)
   at Dalamud.Game.Framework.HandleFrameworkUpdate(FFXIVClientStructs.FFXIV.Client.System.Framework.Framework*)

We can use the library https://github.com/sourpuh/ffxiv_pictomancy to render 3D overlays using in-game objects and bind to them. This would be perfect to use in this case, and we can look into it as a main way to render it .

At the moment, we are using the Lightfinder bar with the Nameplate handler of the Dalamud; we want to move away from it to use ImGUI, as people are crashing using this Nameplate handler. ``` Crash reports: Application: ffxiv_dx11.exe CoreCLR Version: 9.0.325.11113 .NET Version: 9.0.3 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Stack: at System.Runtime.ExceptionServices.InternalCalls.<RhpSfiInit>g____PInvoke|0_0(System.Runtime.StackFrameIterator*, Void*, Int32, Boolean*) at System.Runtime.ExceptionServices.InternalCalls.<RhpSfiInit>g____PInvoke|0_0(System.Runtime.StackFrameIterator*, Void*, Int32, Boolean*) at System.Runtime.EH.DispatchEx(System.Runtime.StackFrameIterator ByRef, ExInfo ByRef) at System.Runtime.EH.RhThrowHwEx(UInt32, ExInfo ByRef) at LightlessSync.Services.NameplateHandler.UpdateNameplateNodes() at Dalamud.Game.Addon.Lifecycle.AddonLifecycle.InvokeListenersSafely(Dalamud.Game.Addon.Lifecycle.AddonEvent, Dalamud.Game.Addon.Lifecycle.AddonArgTypes.AddonArgs, System.String) at Dalamud.Game.Addon.Lifecycle.AddonLifecycle.OnAddonDraw(FFXIVClientStructs.FFXIV.Component.GUI.AtkUnitBase*) at Dalamud.Game.Framework.HandleFrameworkUpdate(FFXIVClientStructs.FFXIV.Client.System.Framework.Framework*) Application: ffxiv_dx11.exe CoreCLR Version: 9.0.325.11113 .NET Version: 9.0.3 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Stack: at System.Runtime.ExceptionServices.InternalCalls.<RhpSfiInit>gPInvoke|0_0(System.Runtime.StackFrameIterator, Void, Int32, Boolean*) at System.Runtime.ExceptionServices.InternalCalls.<RhpSfiInit>gPInvoke|0_0(System.Runtime.StackFrameIterator, Void, Int32, Boolean) at System.Runtime.EH.DispatchEx(System.Runtime.StackFrameIterator ByRef, ExInfo ByRef) at System.Runtime.EH.RhThrowHwEx(UInt32, ExInfo ByRef) at LightlessSync.PlayerData.Handlers.PairHandler.get_PlayerCharacterId() at LightlessSync.Services.NameplateHandler+<>c.<get_VisibleUserIds>b42_0(LightlessSync.PlayerData.Pairs.Pair) at System.Linq.Enumerable+ListWhereSelectIterator`2[[System.Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.UInt64, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() at LightlessSync.Services.NameplateHandler.get_VisibleUserIds() at LightlessSync.Services.NameplateHandler.UpdateNameplateNodes() at LightlessSync.Services.NameplateHandler.NameplateDrawDetour(Dalamud.Game.Addon.Lifecycle.AddonEvent, Dalamud.Game.Addon.Lifecycle.AddonArgTypes.AddonArgs) at Dalamud.Game.Addon.Lifecycle.AddonLifecycle.InvokeListenersSafely(Dalamud.Game.Addon.Lifecycle.AddonEvent, Dalamud.Game.Addon.Lifecycle.AddonArgTypes.AddonArgs, System.String) at Dalamud.Game.Addon.Lifecycle.AddonLifecycle.OnAddonDraw(FFXIVClientStructs.FFXIV.Component.GUI.AtkUnitBase) at Dalamud.Game.Framework.HandleFrameworkUpdate(FFXIVClientStructs.FFXIV.Client.System.Framework.Framework*) ``` We can use the library https://github.com/sourpuh/ffxiv_pictomancy to render 3D overlays using in-game objects and bind to them. This would be perfect to use in this case, and we can look into it as a main way to render it .
Owner

Further, for Nameplate Color changes we can use sighooks rather than the service. Its okay if we don't have priority in the queue

Further, for Nameplate Color changes we can use sighooks rather than the service. Its okay if we don't have priority in the queue
cake self-assigned this 2025-11-21 23:56:10 +00:00
cake closed this issue 2025-12-28 03:57:01 +00:00
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Lightless-Sync/LightlessClient#90