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

Fatal signal 6 (SIGABRT) crash on android release when forcing screen orientation #22106

Closed
H-A-Hristov opened this issue Apr 28, 2024 · 7 comments
Labels
platform/android 🤖 s/needs-attention Issue has more information and needs another look t/bug Something isn't working

Comments

@H-A-Hristov
Copy link

H-A-Hristov commented Apr 28, 2024

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

  1. Android release build.
  2. Concurrent GC turned on.
  3. ScreenOrientation = ScreenOrientation.Portrait set as annotation to the Main activity.

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

@H-A-Hristov H-A-Hristov added the t/bug Something isn't working label Apr 28, 2024
@PureWeen PureWeen added platform/android 🤖 s/needs-info Issue needs more info from the author labels Apr 28, 2024
@PureWeen
Copy link
Member

@MAUIoxo
Copy link

MAUIoxo commented Apr 28, 2024

I have a similar issue when changing Orientation, but in combination with the Community Toolkit Popup:

IMG_0426

This results in the following Exception:

IMG_0427

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?

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Apr 28, 2024
@PureWeen
Copy link
Member

@MAUIoxo that might be different
Can you log that with MCT?

@PureWeen PureWeen added s/needs-info Issue needs more info from the author and removed s/needs-attention Issue has more information and needs another look labels Apr 28, 2024
@MAUIoxo
Copy link

MAUIoxo commented Apr 29, 2024

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

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Apr 29, 2024
@H-A-Hristov
Copy link
Author

H-A-Hristov commented Apr 29, 2024

Update on the matter:
I got a suggestion to disable trimming (and AOT compilations respectively) and test again.
And so I did, combined with re-enabling the concurrent GC.

This solved the issue.
The more interesting part - even enabling trimming and AOT, I cannot reproduce the problem again.
I was able to reproduce it at will, by adding either screen orientation, or the concurrent GC option.

This is the log you requested:
log.txt

Anyway, I plan to accept my miracle and move on.

@MAUIoxo
Copy link

MAUIoxo commented Apr 29, 2024

Disabling AOT did not work for me. I finally created my own Popup now which works in any Orientation

@PureWeen
Copy link
Member

PureWeen commented May 7, 2024

This issue was moved to CommunityToolkit/Maui#1864

@dotnet dotnet locked and limited conversation to collaborators May 7, 2024
@PureWeen PureWeen closed this as completed May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/android 🤖 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants