[InSteem] [v1.5.1] The app crashed when i tried to view my favorite post

in #utopian-io5 years ago (edited)

Project Information

Expected behavior

I was expecting that I will be able to view my favorite post without getting any trouble.

Actual behavior

I added a post from my feed as my favorite. But when I tried to view that post from "Your Favourites", the app froze for a couple of seconds and then crashed.

How to reproduce

  1. Open the app
  2. Choose a post from your Feed.
  3. Tap on ⋮ (Three dots/ Vertical ellipsis) and click "Add to Favourites".
  4. The post will save on your "View Favourites" menu. Click on that menu.
  5. Click on you're added post.
  6. Notice the bug.
  • Browser/App version: v1.5.1
  • Operating system: Android 6.0.1

Recording Of The Bug

bug

GitHub Account

https://github.com/sagorahmed

Logcat

04-01 15:32:13.341 28600 28600 E AndroidRuntime: FATAL EXCEPTION: main

04-01 15:32:13.341 28600 28600 E AndroidRuntime: Process: com.insteem.ipfreely.steem, PID: 28600

04-01 15:32:13.341 28600 28600 E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 100425612 byte allocation with 16775856 free bytes and 85MB until OOM

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at dalvik.system.VMRuntime.newNonMovableArray(Native Method)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:856)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:675)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:2230)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.content.res.Resources.loadDrawableForCookie(Resources.java:4284)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.content.res.Resources.loadDrawable(Resources.java:4158)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.content.res.Resources.getDrawable(Resources.java:2043)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.content.res.Resources.getDrawable(Resources.java:2025)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.content.Context.getDrawable(Context.java:464)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:463)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at com.insteem.ipfreely.steem.MiscConstants$Companion.getRandDrawable(MiscConstants.kt:342)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at com.insteem.ipfreely.steem.ArticleActivity.setMainImage(ArticleActivity.kt:348)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at com.insteem.ipfreely.steem.ArticleActivity.onStart(ArticleActivity.kt:285)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1266)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.app.Activity.performStart(Activity.java:6943)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3276)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.app.ActivityThread.access$1100(ActivityThread.java:229)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7325)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

04-01 15:32:13.341 28600 28600 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Sort:  

Hi @sagorahmed, thanks for making this contribution

I was able to reproduce the crash following the steps you provided. I like that you provided a crash log, this will help narrow the search for the root cause.

  1. The expected and actual behavior are well written.
  2. The steps you provided were easy to follow and reproduce.
  3. Lastly, I noticed the issue was opened 9 days ago with no form of acknowledgment from the PO. I know it can be frustrating but some times they get caught up with other things. Keep up the good work :)

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @fego! Keep up the good work!

Hi @sagorahmed!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @sagorahmed!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.31
TRX 0.12
JST 0.034
BTC 64418.55
ETH 3157.64
USDT 1.00
SBD 4.06