Tischel / TPie

FFXIV Dalamud plugin for ring-shaped hotbars
GNU Affero General Public License v3.0
34 stars 16 forks source link

Macro Icons, and possible crash #55

Closed Tyndareus closed 1 month ago

Tyndareus commented 1 month ago

It seems TPie might be caching macro icons on startup?

I'm using a UI mod which replaces the base textures for macro icons (at least one of the settings suggests so), it also replaces the gearset icons, but when using the macro ring entry the icon can't be found. And the gear set entry uses the old icons. If theres a different way to manage this let me know, I would like to have my UI and the rings have visual parity so it doesn't look completely different.

As for the crash I have noticed happening after messing around with a macro entry and trying to find the gearset icons that the UI mod replaces. I pulled 62021 which I think is just the job list display for warrior but doesn't appear in the search or can't be found with entering the icon ID.

Last thing in the dalamud log is;

2024-07-11 13:42:00.776 +01:00 [ERR] Exception during raise of Void Draw()
Dalamud.Interface.Textures.Internal.IconNotFoundException: The icon with the ID 6673  ItemHq with language  was not found.
   at Dalamud.Interface.Textures.Internal.TextureManagerPluginScoped.GetFromGameIcon(GameIconLookup& lookup) in C:\goatsoft\companysecrets\dalamud\\Interface\Textures\Internal\TextureManagerPluginScoped.cs:line 273
   at TPie.Models.Elements.RingElement.Draw(Vector2 position, Vector2 size, Single scale, Boolean selected, UInt32 color, Single alpha, Boolean tooltip, ImDrawListPtr drawList) in /work/repo/TPie/Models/Elements/RingElement.cs:line 31
   at TPie.Models.Elements.GameMacroElement.Draw(Vector2 position, Vector2 size, Single scale, Boolean selected, UInt32 color, Single alpha, Boolean tooltip, ImDrawListPtr drawList) in /work/repo/TPie/Models/Elements/GameMacroElement.cs:line 71
   at TPie.Models.Ring.Draw(String id) in /work/repo/TPie/Models/Ring.cs:line 335
   at TPie.RingsManager.Draw() in /work/repo/TPie/RingsManager.cs:line 70
   at Dalamud.Utility.EventHandlerExtensions.HandleInvoke(Action act) in C:\goatsoft\companysecrets\dalamud\\Utility\EventHandlerExtensions.cs:line 124
2024-07-11 13:42:00.782 +01:00 [INF] LASTEXCEPTION:eyJXaGVuIjoiMjAyNC0wNy0xMVQxMzo0MjowMC43ODI0Nzk0KzAxOjAwIiwiSW5mbyI6IkRhbGFtdWQuSW50ZXJmYWNlLlRleHR1cmVzLkludGVybmFsLkljb25Ob3RGb3VuZEV4Y2VwdGlvbjogVGhlIGljb24gd2l0aCB0aGUgSUQgNjY3MyAgSXRlbUhxIHdpdGggbGFuZ3VhZ2UgIHdhcyBub3QgZm91bmQuXHJcbiAgIGF0IERhbGFtdWQuSW50ZXJmYWNlLlRleHR1cmVzLkludGVybmFsLlRleHR1cmVNYW5hZ2VyUGx1Z2luU2NvcGVkLkdldEZyb21HYW1lSWNvbihHYW1lSWNvbkxvb2t1cCYgbG9va3VwKSBpbiBDOlxcZ29hdHNvZnRcXGNvbXBhbnlzZWNyZXRzXFxkYWxhbXVkXFxcXEludGVyZmFjZVxcVGV4dHVyZXNcXEludGVybmFsXFxUZXh0dXJlTWFuYWdlclBsdWdpblNjb3BlZC5jczpsaW5lIDI3M1xyXG4gICBhdCBUUGllLkNvbmZpZy5SaW5nU2V0dGluZ3NXaW5kb3cuRHJhdygpIGluIC93b3JrL3JlcG8vVFBpZS9Db25maWcvUmluZ1NldHRpbmdzV2luZG93LmNzOmxpbmUgMTU3XHJcbiAgIGF0IERhbGFtdWQuSW50ZXJmYWNlLldpbmRvd2luZy5XaW5kb3cuRHJhd0ludGVybmFsKERhbGFtdWRDb25maWd1cmF0aW9uIGNvbmZpZ3VyYXRpb24pIGluIEM6XFxnb2F0c29mdFxcY29tcGFueXNlY3JldHNcXGRhbGFtdWRcXFxcSW50ZXJmYWNlXFxXaW5kb3dpbmdcXFdpbmRvdy5jczpsaW5lIDM0NiIsIkNvbnRleHQiOiJbV2luZG93U3lzdGVtXSBFcnJvciBkdXJpbmcgRHJhdygpOiBSaW5nIFNldHRpbmdzIn0=
2024-07-11 13:42:00.782 +01:00 [ERR] [WindowSystem] Error during Draw(): Ring Settings
Dalamud.Interface.Textures.Internal.IconNotFoundException: The icon with the ID 6673  ItemHq with language  was not found.
   at Dalamud.Interface.Textures.Internal.TextureManagerPluginScoped.GetFromGameIcon(GameIconLookup& lookup) in C:\goatsoft\companysecrets\dalamud\\Interface\Textures\Internal\TextureManagerPluginScoped.cs:line 273
   at TPie.Config.RingSettingsWindow.Draw() in /work/repo/TPie/Config/RingSettingsWindow.cs:line 157
   at Dalamud.Interface.Windowing.Window.DrawInternal(DalamudConfiguration configuration) in C:\goatsoft\companysecrets\dalamud\\Interface\Windowing\Window.cs:line 346
2024-07-11 13:44:02.792 +01:00 [VRB] [VFS] Initializing VFS database at ###AppData\Roaming\XIVLauncher\dalamudVfs.db

Actually maybe dalamud is caching the icons... If its attempting to run GetFromGameIcon

Tischel commented 1 month ago

Are you using Penumbra to apply the texture mods?

Tyndareus commented 1 month ago

Yeah, there was a comment in the FFXIV/UI modding discord about it being a cause of the lack of texture sharing a little after I posted this.

Would still have a check over the crash though, theres no dump so assuming its a client memory crash - I haven't checked through any code but are there any allocations being driven during the icon lookup but not being cleaned due to the exception? But if thats a dalamud thing then no worries can close, I'm sure it will get fixed at some point its not like I am constantly crashing its only when I filter around icons by writing in random IDs

Tischel commented 1 month ago

I've added some defensive code to prevent crashes. But Penumbra / Dalamud are not working well in regards to custom/modded textures right now.