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

java.lang.OutOfMemoryError on some devices. #2

Open
Elaws opened this issue Jul 27, 2020 · 3 comments
Open

java.lang.OutOfMemoryError on some devices. #2

Elaws opened this issue Jul 27, 2020 · 3 comments

Comments

@Elaws
Copy link

Elaws commented Jul 27, 2020

Describe the bug

While uploading an app to Android Play Store, Pre-launch report found crashes on 3 devices (over 11 tested). The logcat of 2 of the errors include a reference to this library.

Logcat :

java.lang.OutOfMemoryError 1
java.lang.OutOfMemoryError 2

And just in case, the 3rd error in case it is linked with the previous ones :

java.lang.NoSuchFieldError

Smartphone :

OOM1

  • Device: Motorola Moto G4 Play
  • OS: Android 6.0
  • SDK version : 23

OOM2

  • Device: Motorola Moto Z
  • OS: Android 7.0
  • SDK version : Not mentionned

NoSuchFieldError

  • Device: Huawei P8 Lite
  • OS: Android 5.0
  • SDK version : Not mentionned
@JoeTomkinson
Copy link
Owner

Thank you for raising the issue, can you elaborate a little on how you're using the showcase view in your application.

Should I assume you're using a custom image on one of the overlays?

@Elaws
Copy link
Author

Elaws commented Jul 27, 2020

Thanks for your answer :

I've only used "rounded rectangle" showcase views a single "no focus" showcase view. No custom image has been used on one of the overlays.

Rounded rectangle views :

I use a boolean ("hasTuto") to define whether showcase view should be displayed or not once a button or textView has been touched. Their event handlers are similar and look like this :

public void OnButtonTouch(object sender, View.TouchEventArgs touchEventArgs)
        {
            View view = (View)sender;

            if(hasTuto)
               Tuto(view);
            else 
               // Normal behavior
        }

Tuto function being :

        public void Tuto(View view)
        {
            ShowCaseView showcase = new ShowCaseView.Builder()
                .Context(this)
                .FocusOn(view)
                .FocusShape(Xama.JTPorts.ShowcaseView.Models.FocusShape.RoundedRectangle)
                .CloseOnTouch(true)
                .BackgroundColor(Color.LightBlue)
                .FocusBorderColor(Color.White)
                .Title("tutoName")
                .Build();

            showcase.Show();
        }

No focus view :

This view is used on any listView item click :

 public void OnListViewItemClick(object sender, AdapterView.ItemClickEventArgs args)
        {
            if (hasTuto)
                Tuto();
            else
                // Normal behavior
        }

Tuto function being here :

        public void Tuto()
        {
            ShowCaseView showcase = new ShowCaseView.Builder()
                .Context(this)
                .CloseOnTouch(true)
                .BackgroundColor(Color.LightBlue)
                .FocusBorderColor(Color.White)
                .FocusBorderSize(15)
                .Title("tutoText")
                .FocusCircleRadiusFactor(1.5)
                .Build();

            showcase.Show();
        }

@JoeTomkinson
Copy link
Owner

Bear with me, I'll recreate the above in the sample application and get back to you as soon as I am able.

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

2 participants