You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds a small payload sniff before PluginImageCache hands downloaded plugin icons/images to the texture manager.
If a plugin repository icon URL returns a successful HTTP response that is not actually image data, the plugin installer now logs the bad payload and skips it instead of sending arbitrary bytes through WIC/TexFile decoding.
Motivation
While testing under XIVLauncher.Core/Wine, opening /xlplugins caused the plugin installer to fetch some icon URLs that ended in .png but redirected to JSON (application/json). Dalamud then attempted to decode those JSON bytes as an image/TexFile, logged texture decode failures, and the runtime later crashed.
Example failing path from logs:
PluginImageCache.TryLoadImage
TextureManager.CreateFromImageAsync
TextureManager.Wic.NoThrottleCreateFromWicStream
fallback NoThrottleCreateFromTexFile
The file is not a TexFile
The immediate bad responses were from plugin icon URLs that looked image-like but returned JSON after redirect.
Changes
Adds IsSupportedImagePayload(...) to PluginImageCache.
Runtime crash from dalamud_appcrash_20260606_201952_019_556.log:
CLR error occurred
System Time: 2026-06-07 00:19:56.5434476 +00:00
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 5 5600X 6-Core Processor
GPU Desc: NVIDIA GeForce RTX 3050
Additional Information
{
Application: ffxiv_dx11.exe
CoreCLR Version: 10.0.25.52411
.NET Version: 10.0.0
Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00006FFFFDE0FA59 (0x00006FFFFDD60000) with exit code 0x80131506.
}
Thread: 0x230
Call Stack
{
[0] kernelbase.dll+D197
[1] Dalamud.Boot.dll+6731C (`InitializeImpl'::`2'::<lambda_5>::operator()+0x11C)
[2] Dalamud.Boot.dll+6A190 (utils::thunk<int __cdecl(...)>::detour+0xE0)
}
The repro path I hit was opening /xlplugins. The Plugin Installer was trying to load a third-party icon URL ending in .png, but that request redirected to an API endpoint returning JSON. The log then shows WIC decode failing with 0x88982F50, TexFile fallback failing with The file is not a TexFile., and the exception surfacing through Dalamud.Interface.Internal.Windows.PluginImageCache.TryLoadImage(...).
I can provide the sanitized crash/log bundle if useful, but I redacted third-party plugin/repo names and URLs from the public comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds a small payload sniff before
PluginImageCachehands downloaded plugin icons/images to the texture manager.If a plugin repository icon URL returns a successful HTTP response that is not actually image data, the plugin installer now logs the bad payload and skips it instead of sending arbitrary bytes through WIC/TexFile decoding.
Motivation
While testing under XIVLauncher.Core/Wine, opening
/xlpluginscaused the plugin installer to fetch some icon URLs that ended in.pngbut redirected to JSON (application/json). Dalamud then attempted to decode those JSON bytes as an image/TexFile, logged texture decode failures, and the runtime later crashed.Example failing path from logs:
PluginImageCache.TryLoadImageTextureManager.CreateFromImageAsyncTextureManager.Wic.NoThrottleCreateFromWicStreamNoThrottleCreateFromTexFileThe file is not a TexFileThe immediate bad responses were from plugin icon URLs that looked image-like but returned JSON after redirect.
Changes
IsSupportedImagePayload(...)toPluginImageCache.TexFilepayloads viaTexFileExtensions.IsPossiblyTexFile2D.Validation
dotnet build Dalamud/Dalamud.csproj -c Debug