Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModernWpf.SampleApp throws XamlParseException when viewing the "Threaded UI" example. #660

Open
dostjh opened this issue Dec 27, 2023 · 0 comments

Comments

@dostjh
Copy link

dostjh commented Dec 27, 2023

ModernWpf.SampleApp throws XamlParseException when viewing the "Threaded UI" example.

I'm cloned to commit 218e8ec.
I'm on Windows 11.

System.Windows.Markup.XamlParseException: ''Initialization of 'ModernWpf.Controls.ProgressBar' threw an exception.' Line number '29' and line position '15'.'

Inner Exception:
InvalidOperationException: The calling thread cannot access this object because a different thread owns it.

image

Callstack

>	PresentationFramework.dll!System.Windows.Markup.XamlReader.RewrapException(System.Exception e, System.Xaml.IXamlLineInfo lineInfo, System.Uri baseUri) Line 362	C#
 	PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader xamlReader, System.Xaml.IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, System.Xaml.XamlObjectWriterSettings settings, System.Uri baseUri) Line 121	C#
 	PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader xamlReader, bool skipJournaledProperties, object rootObject, System.Xaml.Permissions.XamlAccessLevel accessLevel, System.Uri baseUri) Line 38	C#
 	PresentationFramework.dll!System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream stream, System.Windows.Markup.ParserContext parserContext, object parent, bool closeStream) Line 764	C#
 	ModernWpf.SampleApp.exe!ModernWpf.SampleApp.ThreadedUI.ThreadedProgressBar.InitializeComponent() Line 1	C#
 	ModernWpf.SampleApp.exe!ModernWpf.SampleApp.ThreadedUI.ThreadedProgressBar.ThreadedProgressBar() Line 10	C#
 	[Native to Managed Transition]	
 	[Managed to Native Transition]	
 	mscorlib.dll!System.RuntimeType.CreateInstanceSlow(bool publicOnly, bool skipCheckThis, bool fillCache, ref System.Threading.StackCrawlMark stackMark)	Unknown
 	mscorlib.dll!System.Activator.CreateInstance(System.Type type, bool nonPublic)	Unknown
 	mscorlib.dll!System.Activator.CreateInstance(System.Type type)	Unknown
 	ModernWpf.SampleApp.exe!ModernWpf.SampleApp.ThreadedUI.ThreadedVisualHost.CreateChild() Line 48	C#
 	ModernWpf.SampleApp.exe!ModernWpf.SampleApp.ThreadedUI.ThreadedVisualHostBase.LoadChild.__ThreadProc|0() Line 187	C#
 	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown
 	mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()	Unknown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant