question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I don’t have much to work with but consistently get this crash on APIs 24 and over. I’m using version 2.2.20 but was also getting the issue on 2.2.10 This crash started appearing after I did a big refactoring to move to a Viewmodel pattern. This entails that there are a lot more operations running in parallel whereas we used to load stuff linearly (and slowly…)

Thanks for any help.

10-09 11:24:10.989 E/mono-rt ( 1665): Stacktrace:
10-09 11:24:10.989 E/mono-rt ( 1665): 
10-09 11:24:10.989 E/mono-rt ( 1665):   at <unknown> <0xffffffff>
10-09 11:24:10.989 E/mono-rt ( 1665):   at (wrapper managed-to-native) Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a (intptr,intptr&,intptr,intptr,intptr,Java.Interop.JniArgumentValue*) <0x00012>
10-09 11:24:10.989 E/mono-rt ( 1665):   at Java.Interop.JniEnvironment/InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference,Java.Interop.JniObjectReference,Java.Interop.JniMethodInfo,Java.Interop.JniArgumentValue*) [0x00074] in <e499a5498b1b48379b88fe5ed629079f>:0
10-09 11:24:10.989 E/mono-rt ( 1665):   at Java.Interop.JniPeerMembers/JniInstanceMethods.InvokeVirtualVoidMethod (string,Java.Interop.IJavaPeerable,Java.Interop.JniArgumentValue*) [0x0005f] in <e499a5498b1b48379b88fe5ed629079f>:0
10-09 11:24:10.989 E/mono-rt ( 1665):   at Android.Widget.ImageView.SetImageDrawable (Android.Graphics.Drawables.Drawable) [0x00038] in <2e14bb2dd93a405e81838369ed72695b>:0
10-09 11:24:10.989 E/mono-rt ( 1665):   at FFImageLoading.Views.ManagedImageView.SetImageDrawable (Android.Graphics.Drawables.Drawable) [0x00077] in C:\projects\ffimageloading\source\FFImageLoading.Droid\Views\ManagedImageView.cs:165
10-09 11:24:10.989 E/mono-rt ( 1665):   at FFImageLoading.Targets.ImageViewTarget.Set (FFImageLoading.Work.IImageLoaderTask,FFImageLoading.Drawables.SelfDisposingBitmapDrawable,bool) [0x00020] in C:\projects\ffimageloading\source\FFImageLoading.Droid\Targets\ImageViewTarget.cs:55
10-09 11:24:10.989 E/mono-rt ( 1665):   at FFImageLoading.PlatformImageLoaderTask`1/<>c__DisplayClass4_0<TImageView_REF>.<SetTargetAsync>b__0 () [0x0000b] in C:\projects\ffimageloading\source\FFImageLoading.Droid\Work\PlatformImageLoadingTask.cs:84
10-09 11:24:10.989 E/mono-rt ( 1665):   at FFImageLoading.Helpers.MainThreadDispatcher/<>c__DisplayClass5_0.<PostAsync>b__0 () [0x00008] in C:\projects\ffimageloading\source\FFImageLoading.Droid\Helpers\MainThreadDispatcher.cs:44
10-09 11:24:10.989 E/mono-rt ( 1665):   at Java.Lang.Thread/RunnableImplementor.Run () [0x0000e] in <2e14bb2dd93a405e81838369ed72695b>:0
10-09 11:24:10.989 E/mono-rt ( 1665):   at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) [0x00008] in <2e14bb2dd93a405e81838369ed72695b>:0
10-09 11:24:10.989 E/mono-rt ( 1665):   at (wrapper dynamic-method) object.8cfad20b-a362-4eda-8465-1706fdaaa79d (intptr,intptr) [0x00011] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
10-09 11:24:10.990 E/mono-rt ( 1665):   at (wrapper native-to-managed) object.8cfad20b-a362-4eda-8465-1706fdaaa79d (intptr,intptr) [0x00021] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
10-09 11:24:10.990 E/mono-rt ( 1665): /proc/self/maps:
10-09 11:24:10.990 E/mono-rt ( 1665): 12c00000-12e17000 rw-p 00000000 00:01 12296                              /dev/ashmem/dalvik-main space (deleted)
10-09 11:24:10.990 E/mono-rt ( 1665): 12e17000-1339e000 rw-p 00217000 00:01 12296                              /dev/ashmem/dalvik-main space (deleted)
10-09 11:24:10.990 E/mono-rt ( 1665): 1339e000-22c00000 ---p 0079e000 00:01 12296                              /dev/ashmem/dalvik-main space (deleted)
10-09 11:24:10.990 E/mono-rt ( 1665): 22c00000-22c01000 rw-p 00000000 00:01 12297                              /dev/ashmem/dalvik-main space 1 (deleted)
10-09 11:24:10.990 E/mono-rt ( 1665): 22c01000-32c00000 ---p 00001000 00:01 12297                              /dev/ashmem/dalvik-main space 1 (deleted)
10-09 11:24:10.990 E/mono-rt ( 1665): 582b7000-582bb000 r-xp 00000000 08:06 247                                /system/bin/app_process32
...

10-09 11:38:57.296 F/libc    ( 2002): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 2002 (istribution_dev)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fedemkrcommented, Nov 14, 2017

I’m using v2.2.25 and it’s still happenning. In my case, I have a ViewPager and in one of the pages I have a fragment with a MvxGridView. Each item has a FFImageLoading.Views.ImageViewAsync that is loaded in an adapter using

var image = view.FindViewById<ImageViewAsync>(Resource.Id.attachment_image);

var work = ImageService.Instance.LoadUrl(item.ImagePath)
              .LoadingPlaceholder("@drawable/no_attachment", FFImageLoading.Work.ImageSource.CompiledResource)
              .ErrorPlaceholder("@drawable/no_attachment", FFImageLoading.Work.ImageSource.CompiledResource)
              .DownSample(100, 100)
              .Into(image);

The crash occurs when images are loading at the first time (i.e. they are not catched yet) and I navigate from one of the pages to another view and then navigate back to the viewpager’s view.

I’ve workarounded this by creating a class to hold and cancel all the IScheduledWork:

public class ImageScheduledWorkHelper
{
    private List<IScheduledWork> imageScheduledWorks = new List<IScheduledWork>();

    private ImageScheduledWorkHelper()
    {
    }

    private static Lazy<ImageScheduledWorkHelper> _instance = new Lazy<ImageScheduledWorkHelper>(() => new ImageScheduledWorkHelper());
    public static ImageScheduledWorkHelper Instance => _instance.Value;

    public void Add(IScheduledWork work)
    {
        this.imageScheduledWorks.Add(work);
    }

    public void CancelAll()
    {
        foreach (var sw in this.imageScheduledWorks)
        {
            if (!sw.IsCompleted)
                sw.Cancel();
        }

        this.imageScheduledWorks.Clear();
    }
}

So after loading Into the image using the ImageService.Instance.LoadUrl I just add to the helper the IScheduledWork returned using ImageScheduledWorkHelper.Instance.Add(work); and then in the OnPause method of the ViewPager’s view I just call ImageScheduledWorkHelper.Instance.CancelAll(); to prevent the scheduled works to continue loading the images.

Hope it helps someone in the meantime.

0reactions
sylvain-toptalcommented, Oct 26, 2017

havent had time to try, sorry

Read more comments on GitHub >

github_iconTop Results From Across the Web

My app crashes on API 16 - 24 but works on API 25 up ...
My app crashes with the error "Unfortunately app has stopped" every time on android emulators with API 16 to 24 but runs on...
Read more >
Runtime crash on API 24 #246
Usabilla crashes on app initialization when using API 24 SDK version: 7.2.2 It works fine on 7.1.2 java.lang.
Read more >
Crashes | App quality
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
App crashes when java.date.LocalDate is being passed as ...
LocalDate type is being defined as destination argument type application crashes on launch on devices with API < 26. On devices with higher...
Read more >
Meeting SDK still crashes on Android 12 or 13 - when ...
After upgrading our app to Android 13 API 33, the Zoom SDK started crashing for our users that are on Android 12 and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found