-
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
[regression/8.0.0-preview.6.8686] [Android] BitmapFactory.DecodeStreamAsync crashes the app on .NET 8-preview.6 in Release mode #16514
Comments
|
We just bind the Android APIs to C# as-is, so aren't much involved in what they actually do. One difference is that .NET 8 Preview 6 now uses Android API 34 as the @AntPolkanov can you share a more complete Android log? Try this:
Share the |
Hi @AntPolkanov. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Thanks for looking into this, guys! |
If you add to your project: <PropertyGroup>
<AndroidEnableMarshalMethods>false</AndroidEnableMarshalMethods>
</PropertyGroup> Log messages like this should go away:
Does the problem go away with We have this feature disabled by default in the next release, and plan to make it "experimental" for .NET 8. |
@jonathanpeppers , it did help! Thank you. |
Thanks I will put your sample on the list to test if we turn on AndroidEnableMarshalMethods again. |
Description
I am using the FFImageLoading.Compat package to display jpg images in
CachedImage
.The package works fine on .NET 7 (Android and iOS), but fails on the latest .NET 8-preview.6 (Android only) in the Release mode (works in Debug though).
I pulled the package and added logging. It turns out that
DecodeAsync()
method in theBaseDecoder.cs
class fails when it callsawait BitmapFactory.DecodeStreamAsync(imageData, null, options).ConfigureAwait(false);
, see the exact line here: https://github.com/Redth/FFImageLoading.Compat/blob/3b171816d95b6d40d726dfe541d59c21acb29a8e/source/FFImageLoading/Platforms/Android/Decoders/BaseDecoder.cs#L41C28-L41C28 (cc: @Redth)The error happens when
libc
callsmemcpy()
. The tombstone file and logcat can be found in the reproduction repo.This issue blocks us from releasing our .NET MAUI app on Android.
Steps to Reproduce
FFImageLoading.Compat
packageCachedImage
on a pageExpected result: the image appears on the page
Actual result: the app crashes
Link to public reproduction project repository
https://github.com/AntPolkanov/MAUI.Bug.FFImageLoadingCompat
Version with bug
8.0.0-preview.6.8686
Last version that worked well
7.0.92
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
The text was updated successfully, but these errors were encountered: