-
Notifications
You must be signed in to change notification settings - Fork 396
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
Fatal signal 6 (SIGABRT) crash on android release when forcing screen orientation #1864
Comments
Issue moved from dotnet/maui#22106
From @PureWeen on Sunday, April 28, 2024 6:27:18 PM Can you attach a logcat file with your crash? |
Issue moved from dotnet/maui#22106
From @MAUIoxo on Sunday, April 28, 2024 7:34:32 PM I have a similar issue when changing Orientation, but in combination with the Community Toolkit Popup: This results in the following Exception: This came since a couple of Nightly builds and used to work previously, but strangely enough also in combination with changed Orientation. I don’t change it in Code-Behind, but normally in Simulator or on a real Device, both crash. Was there a change having an impact on changed orientation, lately? |
Issue moved from dotnet/maui#22106
From @PureWeen on Sunday, April 28, 2024 7:48:59 PM @MAUIoxo that might be different |
Issue moved from dotnet/maui#22106
From @MAUIoxo on Monday, April 29, 2024 7:10:40 AM I can't, but in Debug Mode, at least for my issue, I got the following Stacktrace info: Object reference not set to an instance of an object. at CommunityToolkit.Maui.Core.Views.MauiPopup.SetShadowView(UIView& target)
at CommunityToolkit.Maui.Core.Views.MauiPopup.ViewDidLayoutSubviews()
at UIKit.UIApplication.UIApplicationMain(Int32 , String[] , IntPtr , IntPtr ) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 58
at UIKit.UIApplication.Main(String[] , Type , Type ) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
at MacroOptimizerApp.Program.Main(String[] args) in D:\Development\C#\OptimizerApp\OptimizerApp\Platforms\iOS\Program.cs:line 13 |
Issue moved from dotnet/maui#22106
From @H-A-Hristov on Monday, April 29, 2024 10:12:25 AM Update on the matter: This solved the issue. This is the log you requested: Anyway, I plan to accept my miracle and move on. |
Issue moved from dotnet/maui#22106
From @MAUIoxo on Monday, April 29, 2024 4:18:24 PM Disabling AOT did not work for me. I finally created my own |
The issue describes a problem on Android but the call stack and exception is on iOS. Please clarify |
@VladislavAntonyuk Anyway, I must admit that VS warned me, more than once, to test my release build. And while I am very curious to know what was the connection between forcing screen orientation and concurrent GC in android, the Jessie Zhang's solution did get me going. |
I think the issue on the iOS side is related to Issue #1844. |
I did not use any special View or something that could be null by my Code. It was a simple Popup like the following: <toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="MyApp.SpecialPopup"
CanBeDismissedByTappingOutsideOfPopup="False">
<VerticalStackLayout Padding="20"
HorizontalOptions="Center"
VerticalOptions="Center">
<Label Text="Welcome to the Fullscreen Popup!"
HorizontalOptions="Center" />
<Button Text="Close"
Clicked="OnCloseButtonClicked"/>
</VerticalStackLayout>
</toolkit:Popup> And in Code-behind I created a new instance of it and displayed it via: var myPopup = new SpecialPopup();
…
Application.Current?.MainPage?.ShowPopup(myPopup); This used to work as expected and I am pretty sure I also changed orientation before with it. Now, something is different and leading to the crash when Orientation is changed. |
@MAUIoxo , Isn't the Issue you discovered similar to the post below? |
@cat0363 , @PureWeen I made this issue, about android 12 device, that was crashing with the exception above, under the condition of release build, android platform and activated concurrent garbage collection. I did NOT write anything about IOS, about Community Toolkit, about Popups, or about Null Pointer Exceptions. Another person claimed that he is having the SAME issue, and for god know what reason, this issue got moved to CommunityToolkit repo. |
@H-A-Hristov , You do not claim that the issue occurred using Community Toolkit, so it appears that the issue was tied to Community Toolkit due to another issue related to device orientation.
Since you haven't mentioned the relationship with the Community Toolkit, it would be better to ask for a clear reason why it is associated. At least, based on the information we currently have, it seems that only the issues occurring on the iOS side are related to the Community Toolkit, and the issues occurring on the Android side are unrelated. This is the reason why no further judgment can be made without the reproduction code. If you can reproduce this problem without the Community Toolkit, it's not related to the Community Toolkit. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 2 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
Here the required information asked above: |
@MAUIoxo , In your code, you specify "FullScreen" for the value of the Size property. What is this?
Were you able to specify "FullScreen" in the Size property of Community Toolkit's Popup? |
@PureWeen it does appear that we have 2 separate issues within this issue. The OP was Android based but then the bug appears to have been diverted into an iOS Popup bug. Is there a way to copy this issue back into the MAUI repo and we keep the iOS bits here? |
@cat0363 - I must apologize for writing the Code having "FullScreen" in it. What I posted was shortened from my mind. I looked it up in my Git history as I changed to my own implementation of a Popup. From my history it had a |
@MAUIoxo , Thank you for your reply. At least for #1844, no concrete reproduction code is provided. |
I commented in #1844 and wrote some Code so you can create a project and test |
We haven't received a reproduction sample from you. The issue is closed. |
Issue moved from dotnet/maui#22106
From @H-A-Hristov on Sunday, April 28, 2024 12:39:38 PM
Description
Fatal signal 6 (SIGABRT) crash in logcat, when running release build on android 12 device, using forced orientation and activated concurrent GC.
Debug version works.
Not specifying orientation works.
Disabling concurrent GC works.
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.7/8.0.100
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
Debug version works.
Not specifying orientation works.
Disabling concurrent GC works.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: