.NET MAUI

113 readers
2 users here now

founded 10 months ago
MODERATORS
101
 
 

In MAUI 8.03 we had the Flyout bug where the NavigationPage Title wouldn't update from the first page you had been on. In MAUI 8.06 that bug has been fixed but has introduced a new one on Windows (sigh).

Starting on Page1 I can use the Flyout to switch to Page2. Then, on Windows, if I use Flyout to switch back to already-existing Page1 it crashes with...

System.Runtime.InteropServices.COMException (0x800F1000): No installed components were detected.

Element is already the child of another element

It works on Android, and it works if you are creating a new page each time, it just doesn't work on Windows to switch back to an already-created page (which defeats the whole purpose of having a Flyout menu - switch between 2 pages without making a new one every time).

  1. Does anyone know of a workaround to this? I can't find anything that relates to this in the context of a MAUI Flyout.
  2. Does anyone have a real simple Flyout template that could be used for the repro (to put in the issue I'm gonna need to create). The one I'm working on has a whole bunch of my own libraries in it, so I'm gonna need to tear them all out before I can use it to make a repro (and of course they don't provide a template, and their sample doesn't work due to different bugs - sigh).
102
 
 

I've just run into a MAUI issue which is specific to Windows (works fine on Android), and so I looked for a Windows Lemmy Community and was surprised to find there wasn't one! So I have created one at [email protected]

Of course you are still welcome to post about MAUI issues in [email protected] but if the issue is specific to Windows (as I have just encountered) then there is now the Windows Development Community as well (and of course we already have Communities for Android and IOS development, for issues on those platforms).

103
 
 

I've just had this happen (and then stop again) for the second time in a few weeks. This is a new MAUI app where the only thing I've changed so far, other than add a few of my own (already previously tested and working) libraries, is change the home page, and the new home page only has a couple of labels on it, so it has no complexity at all added to it yet, and yet getting this odd alleged memory issue. The first time it happened I couldn't find a fix for it, left it for a while, came back (a week's worth of reboots later) and it was working again. Then today I made one trivial change - added a debug write - and the problem came back (but got past the new line without any issues). Then I rebooted and it's working again.

I have 32Gb of RAM, with 12Gb allocated to a RAMdisk, and I have my paging files set to use the RAMdisk.

It generated a log file which said...

"Native memory allocation (mmap) failed to map 186646528 bytes for G1 virtual space"

...so it only needed 180Mb, and down near the bottom it says...

"Memory: 4k page, system-wide physical 32579M (3638M free)"

...so I had more than enough space left (so the memory message may be a red herring for whatever did cause the crash). Googling that first message brings up a bunch of matches, but none of which are for MAUI Android (all different cases with different fixes).

This is using the Android emulator on a Windows machine where I've set the paging sizes to be system-managed. I'm not sure where the Android emulator actually gets memory from though - the system RAM? The paging RAM(disk)? The build directory? The user's App directory?

It reminds me of years ago there was a similar issue with Xamarin Android where the fix/workaround was to add a line to the csproj (I think it increased the heap or something from memory), but I haven't seen that pop up in a long time. Not sure if this is the same issue or a different one.

There's no repro for it cos I can't even reliably repro it. I'm just concerned that it's going to keep coming back given I haven't even added any complexity to it yet.

Has anyone run into this and/or knows how to fix it?

104
 
 

Marco Siccardi has shared an extensive post about MAUI menus (came up in my Mastodon feed, but lacked some relevant tags, so mostly only his followers would've seen it) that I thought some of you might find helpful. I wanted to share it here so that it's easier to find again later - Marco's post about MAUI menus

105
 
 

Test post (inbound bot working?)
@dotnetmaui
Testing if inbound works (outbound doesn't)

106
1
submitted 9 months ago* (last edited 9 months ago) by SmartmanApps to c/dotnetmaui
 
 

I'm just trying out the built-in builder.Logging.AddDebug(); in a MAUI app, but don't see the output anywhere. From several blogs I expected to see the messages in the Visual Studio Debug output window, but they aren't appearing.

Just using the stock-standard MAUI app, the only changes I have made are in App.cs as follows...

using Microsoft.Extensions.Logging;
using Microsoft.Maui.Controls;
namespace BaseMAUIApp;
internal class App :Application
{
public App(ILogger<App> logger) {
    logger.LogDebug("******************* Message from logger!");
// rest of code...

But I don't see my message anywhere. Is there something else I have to configure, or somewhere else I have to look?

107
108
109
 
 

MAUI dev experience on Windows 11 vs. Windows 10
@dotnetmaui
I'm taking delivery of a new dev machine in the next day or two, and the new one is Windows 11 compatible, so I have the option there to install Win11, but I also have the option of sticking with Win10 for a while. The only thing that really stands out to me with 11 is WSL, which is "nice but not necessary".

For those #dotNetMAUI devs who have developed on both, have you found Win11 to be better? Worse? About the same?
#dotNet

110
 
 

I had cause to mention this to someone today, and thought I would share this here for anyone who may not have seen it before and would be interested in this info - Creating MAUI UI's in C#

111
 
 

Original post from Mastodon test
@dotnetmaui
If you see this it worked! ๐Ÿ˜ƒ

112
113
4
submitted 10 months ago by mac to c/dotnetmaui