Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Crashing when opening app #9

Open
potchin opened this issue Aug 4, 2016 · 9 comments
Open

Crashing when opening app #9

potchin opened this issue Aug 4, 2016 · 9 comments
Assignees
Labels

Comments

@potchin
Copy link

potchin commented Aug 4, 2016

I have submitted a report via the android feedback mechanism but no idea if its ended up in the right hands.

The app installed fine and I was able to subscribe to my channel. After a few days I can no longer open the app. It immediately crashes with ..

Exception class name:
java.lang.OutOfMemoryError
Source file:
VMRuntime.java
Source Class
dalvik.system.VMRuntime
Line number
-2

My device has plenty of RAM available and the same occurs immediately after a reboot. Strangely I still receive notifications from my subscriptions as normal, its just opening the app which doesnt work. After uninstalling and reinstalling it works for a few days then the problem reoccurs.

Running CyanagenMod 13 (MM) on a OnePlus One

@Mechazawa
Copy link
Member

Sorry, I don't go on the developer console a lot so I generally don't see them. The way the app currently handles images is pretty optimized. It reserves memory for each instance instead of sharing. I assume that you have a lot of notifications that it tries to load when you open the app.

I might be able to rewrite this portion this weekend.

@Mechazawa Mechazawa self-assigned this Aug 4, 2016
@Mechazawa Mechazawa added the bug label Aug 4, 2016
@potchin
Copy link
Author

potchin commented Aug 4, 2016

There shouldnt be that many notifications, maybe 6 per day, all from the same channel.

I just "reported" it via android again a few minutes ago if you want more info.

@potchin
Copy link
Author

potchin commented Aug 4, 2016

I just checked and the image for my service is 39.55 kB. Hoping thats not too big

@Mechazawa
Copy link
Member

For some reason it tries to allocate ~ 23MB per image which is a lot! I'll have a look as soon as I have time from work.

@potchin
Copy link
Author

potchin commented Aug 4, 2016

Wow, that is a lot. Guessing you have this info from the crash report but the image im using for my channel is...

https://openclipart.org/image/2400px/svg_to_png/217511/1429747035.png

@Mechazawa
Copy link
Member

Just did a quick and dirty check and it looks about accurate

 ~/Downloads> convert 1429747035.{png,bmp}
 ~/Downloads> ls -lh 1429747035.*
-rw-r--r-- 1 shodan shodan 22M Aug  4 21:02 1429747035.bmp
-rw-r--r-- 1 shodan shodan 40K Aug  4 21:02 1429747035.png

@potchin
Copy link
Author

potchin commented Aug 4, 2016

Ah, didnt realise it coverted to bmp. The resolution is massive (2,400px × 2,400px ) so thats no surprise. I'm gonna update my channel to have a lower resolution image.

Guess its still a bug but it makes sense knowing the image is converted to a bitmap.

@Mechazawa
Copy link
Member

Still a bug none the less. I vaguely remember building in resizing into the app. But from what I can remember I only did it in the notification tray... Should be a quick and simple patch,

@Mechazawa
Copy link
Member

Quick sidenote: Internally applications will in general convert images to bitmap representations because it's fast and easier to manage.

@Mechazawa Mechazawa assigned Mechazawa and unassigned Mechazawa Aug 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants