WPF: XamlParseException & # 8594; AccessViolation when loading a resource dictionary

This WPF application is for .NET 3.5 and is built using 4.0 Visual Studio 2010 tools (csc.exe version 4.0.30319.1).

I am not sure what to do with this exception that I see. The same exe works for several months on all machines, but only today the client came across this. I cannot play it locally, all I need is a stack trace from our log files below.

I made a quick sample application with Visual Studio 2010 that simply shows a button in a window, and the Content string button is pulled from the resource dictionary. This worked on the client machine, so it seems that the .NET installation is not completely closed there ...

Any ideas on what to explore or look further? Maybe some state of .NET clients is being installed?

EDIT: The client uninstalled and reinstalled .NET 3.5 and fixed the problem. I suppose there was some strange condition in their installation that caused this problem.

System.Windows.Markup.XamlParseException: the value "MainWindowViewResources.xaml" cannot be assigned to the "Source" property of the "System.Windows.ResourceDictionary" object. Attempted to read or write protected memory. This often indicates that another memory is corrupted. Error in the object "System.Windows.ResourceDictionary" in the markup file "symformconfig; component / view / mainwindowview.xaml". ---> System.AccessViolationException: attempt to read or write protected memory. This often indicates that another memory is corrupted. in System.IO.Packaging.PackagePart.CleanUpRequestedStreamsList () in System.IO.Packaging.PackagePart.GetStream (FileMode mode, access to FileAccess) in System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseIO.Stream () .PackWebResponse.GetResponseStream () in System.IO.Packaging.PackWebResponse.get_ContentType () in MS.Internal.WpfWebRequestHelper.GetContentType (response WebResponse) in MS.Internal.WpfWebRequestHelper.GetResponseStream (request WebRequest, ContentType & contentType) in System.Windows. ResourceDictionary.set_Source (Uri value) --- The end of the internal check of the exception stack --- in System.Windows.Markup.XamlParseException.ThrowException (String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlOjectIbIlOmIOmIbOmIjectlbjectsbamlObjectIbOlImObjectIbOmIjectbamdsObjectId Type objectType) in System.Windows.Markup.XamlParseException.ThrowException (ParserContext ParserContext, Int32, Int32 LINENUMBER linePosition, message string, Exception InnerException) in System.Windows.Markup.BamlRecordReader.ThrowExceptionWithLine (String message, innerException exception) in System.Windows.Markup.BamlRecordReader.ReadPropertyRecordBase (String attribValue, Int16 attributeId, Int16 converterTypeId) in System.Windows.Markup.BamlRecordReader.ReadPropertyConverterRecordperperordordperordword .ReadRecord (BamlRecord bamlRecord) in System.Windows.Markup.BamlRecordReader.Read (Boolean singleRecord) in System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment () in System.Windows.Markup.TarWuder.u .XamlReader.LoadBaml (stream stream, ParserContext parser, parent, closeStream boolean) in System.Windows.Application.LoadComponent (object component, Uri resourceLocator) in Symform.Node.Configuration.MainWindowView.InitializeComponent () in Symform.Node.Configuration.MainWindowView..ctor () in Symform.Node.Configuration.App.OnStartup (StartupEventArgs e) in System.Windows.Application. <.ctor> b__0 (object not used) in System.Windows.Threading.ExceptionWrapper.InternalRealCall (delegate callback, object args, logical isSingleParameter) in System.Windows.Threading.ExceptionWrapper.TryCatchWhen (object source, delegate callback, arguments object, boolean isSingleParameter, delegate catchHandler)Windows.Threading.ExceptionWrapper.TryCatchWhen (object source, delegate callback, object arguments, boolean isSingleParameter, delegate catchHandler)Windows.Threading.ExceptionWrapper.TryCatchWhen (object source, delegate callback, object arguments, boolean isSingleParameter, delegate catchHandler)

+3
2

.NET 3.5 . , - , .

+1

, BuildAction MainWindowViewResources.xaml "", "". "".

+1

Source: https://habr.com/ru/post/1772734/


All Articles