-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Crash on ios when open new screen or navigate back to it #24032
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Closed similar issues:
|
@jfversluis Could you help, what can be the reason of creating ios view with additional parameter in ctor? As I see from logs, sometimes this happens just during simple navigatio |
Without a reproduction project of sorts its very hard to say something useful about it unfortunately |
As I investigate, one of case(but not only): this happened, when we have CachedImage from FFImageLoading library on the ContentPage
|
So, it seems, that when in MauiView.SetNeedsLayout try to get Superview, crash appeared if Superview is not visible |
In this project reproduced not very often, need try to open several times and switch between tabs. |
@DmitryNikiforovCoherent @jfversluis @Redth we are also seeing this with FFImageLoading as we convert our app. It's one of the last major issues we're having. Any ideas? |
I see the repro also uses FFImageLoading. If we take FFImageLoading out of the equation, does it work then? Just to establish if this is something in MAUI or FFImageLoading? |
I'm not sure, according to the analytics, sometimes we also faced with this issue with next logs Without FFImageLoading.Maui.Platform.CachedImageHandler.ImageLoadingSizeChanged in stacktrace. But with FFImageLoading it's the simplest way to reproduce, because it has standard behavior to change control size after page loaded. As I mentioned above, it seems, sometimes, if control hidden, and child try to change size, get_Superview throw an exception |
If you need to fix fast, just downgrade maui to 8.0.40. For me this helps |
@jfversluis @PureWeen @samhouts Seeing this in production in our iOS app making it incredibly unstable for users, as mentioned above, this happens constantly in regular navigation and no FFImageLoading library in our app. This is a critical issue for us. MAUI 8.0.80 SIGABRT: Failed to marshal the Objective-C object 0x153507310 (type: Microsoft_Maui_Platform_LayoutView). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance (because the type 'Microsoft.Maui.Platform.LayoutView' does not have a constructor that takes one NativeHandle argument).
|
Wish we could, production software relies on higher dependencies such as Prism which relies on 8.0.60. There has to be a stable version on .NET8 MAUI before we entertain .NET9, this is costing companies money now. |
Is there anyone that's hitting this issue that's using Shell? I have a theory, but it's something that'll only manifest if you're not using shell |
100% not using shell. |
The same, we are not using shell |
SR9 should be out next week Speaking of, if anyone can test the nugets from #24477 that would be helpful |
If you could provide a link I can test, we're having to go with 8.0.81-ci.net8.24413.37 at present as we can't wait any longer and it's more stable than 8.0.80, if you provide a link I can test before we put out a very hot fix. |
You can check current 8.0.81-ci from link https://dev.azure.com/xamarin/public/_build/results?buildId=121542&view=results (As @PureWeen provided above)
|
Thanks, I am already using those libs with no issue, I was asking if I could get the nugets for #24477 which is a different issue (although related) |
The latest nightlies should have the new version of the fix from #24477 https://github.com/dotnet/maui/wiki/Nightly-Builds Let me know if that works If not, I have an idea about how to add that code back in. But if I don't have to :-) that'd be nice Going to reopen this issue until I get some validation from y'all so we don't miss it |
Still crashing here with build 82. |
@PureWeen We couldn't wait so have a beta build release already out in testflight using 8.0.81-ci.net8.24413.37 with no navigation issues in release mode, client is testing atm. Once we have that out I'll re-test with the nightly builds |
yea, we rolled the change back for 82 because of a regression it caused There's a different fix now on our main branch that you can test with nightlies |
Here's what regressed Not sure if this will apply to any of your scenarios but might help you know what to focus your testing on. |
Just FYI, our iOS app went out into store release with 8.0.81-ci.net8.24413.37, not seeing this crash at all anymore so the fix is good, didn't appear in beta testing either. This app has over 100 pages and a lot of navigation interaction per session. |
@reid-kirkpatrick @DmitryNikiforovCoherent @pboisso @sumowesley @thisisthekap @mackayn If you have a chance to test the latest nightly can you see if it works there as well? https://github.com/dotnet/maui/wiki/Nightly-Builds Want to make sure this gets fixed for you all in SR9 |
@PureWeen as far as I can tell after updating this is still working well. Thank you! |
Hi @PureWeen, I've tried 8.0.82 native, and I had a crash in three navigations. I then installed 8.0.90-ci.net8.24454.1 from the nightly build. This crashed after a few iterations (5,3,6) as I switched between two screens. i then went back to the version using 8.0.40. While this has leak warnings from the navigation manager (not present in on the nightly build), I got to 16 page swaps before stopping. Here is the first crash log:
|
Tried the nightly, I couldn't repo the navigation issue, had other issues such as setting the Date picker's binding to null kills the app where as 8.0.81-ci.net8.24413.37 it was fine but this is a nightly build so I'm aware it's WIP. |
Do you have a repro for this one?
Or can you paste the error trace here? |
Sorry, I'm away on vacation for a few weeks and don't have access to dev hardware, hence why I went with 8.0.81-ci.net8.24413.37 to get a working solution out to the client before my vacation time. |
is this on Windows? |
@PureWeen I am seeing instances of this when running the 9 RC. Did this make not make it in? Any updated timeframe on SR9? |
FYI @PureWeen, still crashing here with latest 8.0.90 SR9. |
Description
It seems, there were similar issues previously
#23139,
but now issue appeared after upgrade to maui to 8.0.70 and removing .UseMauiCompatibility()
Sometimes view try to created with NativeHandle argument in constructor
This crash can appeared with Microsoft.Maui.Platform.ContentView|LayoutView and some custom views(so, adding constructor with ObjCRuntime.NativeHandle resolve issue for custom views, but no any options to resolve crashes with ContentView, LayoutView)
Steps to Reproduce
Sometimes just randomly appeared when navigate to new screen or navigate back to existing
Link to public reproduction project repository
No response
Version with bug
8.0.70 SR7
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.40 SR5
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
For custom views we can just add constructor with ObjCRuntime.NativeHandle handle, but no any ways to fix ios ContentView/LayoutView
Relevant log output
The text was updated successfully, but these errors were encountered: