dotnet/wpf · error · COMException
0x80041703
0x80041703
Error message
Filter does not have a working file. This is typically caused by a missing or failed call to IPersistFile::Load.
What it means
COMException from XamlFilter.GetChunk: the filter is asked for the next chunk, but its internal XamlReader is null because IPersistFile::Load was never called or failed, so there is no working XAML content to index. The message identifies the missing Load call as the cause.
Solutions
- Call IPersistFile::Load on the filter (or IFilter initialization) before requesting chunks
- Handle the COM error and return FILTER_E_ACCESS to the indexing client instead of propagating
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XamlFilter.cs:219 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dotnet/wpf@81131a70a4 (2026-09-14).
Data as JSON: /api/errors/37e19fdd3e1e777e.
Report an issue: GitHub.
Appendix: source
Thrown at src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/IO/Packaging/XamlFilter.cs:219
/// On end of stream, this function will return null.
/// </remarks>
public ManagedChunk GetChunk()
{
if (!_filterContents)
{
// Contents not being filtered, no chunks to return in that case.
_currentContent = null;
// End of chunks.
return null;
}
IndexingContentUnit contentUnit;
// If client code forgot to load the stream, throw appropriate exception.
if (_xamlReader == null)
{
throw new COMException(SR.FilterGetChunkNoStream, (int)FilterErrorCode.FILTER_E_ACCESS);
}
// If at end of chunks, report the condition.
if (_filterState == FilterState.EndOfStream)
{
//Ensure _xamlReader has been closed
EnsureXmlReaderIsClosed();
// End of chunks.
return null;
}
try
{
contentUnit = NextContentUnit();
}
catch (XmlException xmlException)
{View on GitHub (pinned to 81131a70a4)