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

No images fail to apear only in realease mode (Android) #1325

Open
JohnDoeMan opened this issue Jul 27, 2019 · 8 comments
Open

No images fail to apear only in realease mode (Android) #1325

JohnDoeMan opened this issue Jul 27, 2019 · 8 comments

Comments

@JohnDoeMan
Copy link

JohnDoeMan commented Jul 27, 2019

Description

Images (SVG) don't show when compiling Release. No problem when in debug mode.
After some testing it seems that it only fails in Visual Studio 2019 while in 2017 works fine.

Steps to Reproduce

Xamarin.Forms 4.1.0.6.18606
Xamarin.FFImageLoading.* 2.4.11.982

Release config:
PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
DebugSymbols>true
DebugType>pdbonly
Optimize>true
OutputPath>bin\Release
ErrorReport>prompt
WarningLevel>4
AndroidManagedSymbols>true
AndroidUseSharedRuntime>false
AndroidEnableMultiDex>true
AndroidSupportedAbis>armeabi-v7a;arm64-v8a

Initialization
Xamarin.Forms.Forms.SetFlags("FastRenderers_Experimental");
var config = new FFImageLoading.Config.Configuration()
{
VerboseLogging = false,
VerbosePerformanceLogging = false,
VerboseMemoryCacheLogging = false,
VerboseLoadingCancelledLogging = false,
Logger = new CustomLogger(),
HttpHeadersTimeout=60,
HttpReadTimeout=60,
};

        ImageService.Instance.Initialize(config);

Expected Behavior

Images should show like in debug mode

Actual Behavior

Images don't show

Basic Information

  • Version with issue: 2.4.11.982
  • Last known good version:
  • Platform: Android

Screenshots

Reproduction Link / Code

@evadmit
Copy link

evadmit commented Jul 28, 2019

I have the same issue. I tried to add linkerpleaseinclude, but it doesn't help.....

@dfandler
Copy link

I have the same issue I get following output:
System.DllNotFoundException: libjnigraphics.so at (wrapper managed-to-native) Android.Runtime.JNIEnv.AndroidBitmap_lockPixels(intptr,intptr,intptr&) at Android.Runtime.JNIEnv.AndroidBitmap_lockPixels (System.IntPtr jbitmap, System.IntPtr& addrPtr) [0x00005] in <f70276a2e2664631999d2ae3ffb8ada4>:0 at Android.Graphics.Bitmap.LockPixels () [0x00006] in <f70276a2e2664631999d2ae3ffb8ada4>:0 at FFImageLoading.Svg.Platform.SvgDataResolver.Decode (SkiaSharp.SKPicture picture, SkiaSharp.SKBitmap bitmap, FFImageLoading.Work.DataResolverResult resolvedData) [0x00114] in <abbbca1a40c84694bf7ea1ccd5f2f827>:0 at FFImageLoading.Svg.Platform.SvgDataResolver.Resolve (System.String identifier, FFImageLoading.Work.TaskParameter parameters, System.Threading.CancellationToken token) [0x00674] in <abbbca1a40c84694bf7ea1ccd5f2f827>:0 at FFImageLoading.DataResolvers.WrappedDataResolver.Resolve (System.String identifier, FFImageLoading.Work.TaskParameter parameters, System.Threading.CancellationToken token) [0x00098] in <a159011f32534c8eb0455a9cf0bad5a7>:0 at FFImageLoading.Work.ImageLoaderTask3[TDecoderContainer,TImageContainer,TImageView].RunAsync () [0x0034a] in :0 `

I think this is related to following issue on Xamarin android:
dotnet/android#3096

it works on another build machine with Xamarin android version 9.2.3.0 and visual studio for Mac 8.0.8

It fails on Xamarin android version 9.4.0.51 and visual studio for Mac 8.2

@brouillette
Copy link

brouillette commented Jul 30, 2019

I have the same issue.
edit: this only seems to be a problem with Android versions lower than 6.0

@FetFrumos
Copy link

Any news? I have this problem on android 5.1

@dhruvcom
Copy link

dhruvcom commented Aug 8, 2019

I also experiencing the same issue. However, this problem only exists in devices running API 21 or below. There's one more interesting thing I observed that dll named as libraryjnigraphics.so fails.

@francisco-macedo
Copy link

francisco-macedo commented Aug 26, 2019

I'm experiencing the same issue. My APK is built targeting Android 9.0 and supporting "armeabi-v7a;arm64-v8a". My customers get a libjnigraphics.so exception on Android 6.0 (Marshmallow) devices when the app tries to use some image-related functions. My developer setup is:

  • Microsoft Visual Studio Community 2019 v16.2.3 running on Windows 10
  • Xamarin.Android SDK 9.4.1.0
  • Xamarin 16.2.0.95

2 weeks ago, I was using Visual Studio 2017, targeting Android 8.0 devices and supporting only "armeabi-v7a". The same project worked fine on Android 6.0 devices. I'm suspecting it has someting to do with "arm64-v8a".

@dsarbut
Copy link

dsarbut commented Sep 16, 2019

Same issue here. Only happens in release-mode on an Android 5.1.1 device (Samsung T-280)
Build APK with:

  • VS2019 16.2.5
  • Xamarin 16.2.0.95
  • Xamarin.Android.SDK 9.4.1.1

This issue does not reproduce if the APK is built with:

  • VS2017 15.9.15
  • Xamarin 4.12.3.83
  • Xamarin.Android.SDK 9.1.7.0

I'm guessing that this is more a Xamarin.Android issue than a FFImageLoading issue.

@lefthand29
Copy link

I had the same issue on Android 6 and under, on release mode only.

  • VS for Mac 2019
  • Xamarin.Android 9.4
  • Xamarin.FFImageLoading.* 2.4.11.982

I agree with @dsarbut that this is likely a Xamarin.Android issue.
dotnet/android#3096

I solved this with updating Xamarin.Android from 9.4 to Commercial Xamarin.Android 10.0 (d16-3) Preview which you can get from https://github.com/xamarin/xamarin-android/blob/master/README.md. After updating, SVG images are shown as they do in debug mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants