Skip to content

fix GC thread crash in WimFileSystem dispose#263

Open
svenclaesson wants to merge 1 commit intoDiscUtils:developfrom
svenclaesson:fix_wim_dispose
Open

fix GC thread crash in WimFileSystem dispose#263
svenclaesson wants to merge 1 commit intoDiscUtils:developfrom
svenclaesson:fix_wim_dispose

Conversation

@svenclaesson
Copy link

@svenclaesson svenclaesson commented Oct 20, 2022

If this code in constructor of WimFileSystem throws

ShortResourceHeader metaDataFileInfo = _file.LocateImage(index);
if (metaDataFileInfo == null)
{
throw new ArgumentException("No such image: " + index, nameof(index));
}

_metaDataStream is never set

Later the GC will call the deconstructor in DiscFileSystem Dispose(false) that will throw when _metaDataStream is not set

This is a major problem for us when trying to work with a corrupt wim-image.

@svenclaesson
Copy link
Author

@LordMike please consider this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant