Exception: "Unable to find main thread" #263
-
|
I've created a new MAUI app project and added the DrawnUI.Maui package to the project. Now when I run it, I get the InvalidOperationException thrown by MainThread.PlatformBeginInvokeOnMainThread. I haven't been able to find any references to this behavior. Can anyone provide insight? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 8 replies
-
|
Hi just to make sure, what is the nuget version you added, and i suppuse we are talking about windows? .net9 or .net10? |
Beta Was this translation helpful? Give feedback.
-
|
That's a very interesting issue that i'm failing to reproduce, just created a new project on purpose.. I was catching a similar issue before 1.7.4.1, but this one had to go away with this: 79d25d8. If you could provide a repro project or more ideas that would be awesome. |
Beta Was this translation helpful? Give feedback.
-
|
@Chris-TritonAppworks Can i possibly ask you to test with a prerelease nuget version: |
Beta Was this translation helpful? Give feedback.
-
|
I have also created another variation of startup with |
Beta Was this translation helpful? Give feedback.
-
|
@taublast: Maybe this can help: because I had the same problem after updating from 1.7.2.2 to 1.7.4.1 I downloaded your source package. I could solve the problem in making the same modification to 'Looper.cs' as you already did in 'Super.Windows.cs' (see added modified Looper.cs, StartOnMainThread). I tested with the included samples 'Tutorials' and 'Sandbox'. The MainThread is found after 3-4 unsuccessful tries. (sorry - adding as 'cs' file was refused, why?) |
Beta Was this translation helpful? Give feedback.
-
|
@Chris-TritonAppworks @QrtAwb I think this is now fixed in the nuget If someone could please confirm it fixed the issue, then we could merge and close this. |
Beta Was this translation helpful? Give feedback.
@Chris-TritonAppworks @QrtAwb I think this is now fixed in the nuget
1.7.4.4as i finally touched theLooper, thanks to you!If someone could please confirm it fixed the issue, then we could merge and close this.