FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
06/16/14 10:45 AM (10 years ago)

help with errors on app

hi guys, i got my app up and running thanks to smugs advice on a xml file, which came from a plugin i had used on the ios app,the apps starts fine, but crashes after startup, with these errors, can anyone point me in the right direction,these below where all in red in the logcat 06-16 21:32:28.548: E/AndroidRuntime(9473): FATAL EXCEPTION: Thread-618 06-16 21:32:28.548: E/AndroidRuntime(9473): java.lang.OutOfMemoryError 06-16 21:32:28.548: E/AndroidRuntime(9473): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 06-16 21:32:28.548: E/AndroidRuntime(9473): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:527) 06-16 21:32:28.548: E/AndroidRuntime(9473): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:599) 06-16 21:32:28.548: E/AndroidRuntime(9473): at com.uktheatres.BT_imageLoader.loadImage(BT_imageLoader.java:99) 06-16 21:32:28.548: E/AndroidRuntime(9473): at com.uktheatres.BT_imageLoader.access$0(BT_imageLoader.java:95) 06-16 21:32:28.548: E/AndroidRuntime(9473): at com.uktheatres.BT_imageLoader$1.run(BT_imageLoader.java:72) Thanks sean
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
06/16/14 02:01 PM (10 years ago)
Are your image filenames properly set to avoid conflict?
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/16/14 02:09 PM (10 years ago)
all the images are held externally ie a url
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/16/14 02:09 PM (10 years ago)
It looks to me to be related to loading images and running out of memory. Are your app images optimised? Instead f referencing as URL's it might be better to put them in the project - i.e. res/drawable unless they are part of html.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/16/14 09:06 PM (10 years ago)
What's happening 'right before' that fatal exception? Usally the activities leading up to the crash are suspect, but aren't visible in the paste you provided... Cheers! -- Smug
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/16/14 11:30 PM (10 years ago)
06-17 10:23:19.190: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/find3.png... 06-17 10:23:19.190: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.190: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/shows.png... 06-17 10:23:19.190: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.190: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.190: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/shows.png... 06-17 10:23:19.190: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.200: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/find3.png... 06-17 10:23:19.200: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.200: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/shows.png... 06-17 10:23:19.200: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.200: W/ZZ(4062): BT_imageLoader:loadImage loading image from http://www.webmonkeys.co/uktheatres/plusshow.png... 06-17 10:23:19.200: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/plusshow.png... 06-17 10:23:19.200: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.220: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/find3.png... 06-17 10:23:19.220: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.220: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/shows.png... 06-17 10:23:19.220: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.230: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/plusshow.png... 06-17 10:23:19.230: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.230: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/shows.png... 06-17 10:23:19.230: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.230: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/find3.png... 06-17 10:23:19.230: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.230: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/shows.png... 06-17 10:23:19.230: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.230: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/plusshow.png... 06-17 10:23:19.230: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.320: W/ZZ(4062): BT_activity_host:handleReportToCloudResults appLastModifiedOnServer (value on server): Mon, 16 Jun 2014 15:50:40 -0700 06-17 10:23:19.320: W/ZZ(4062): BT_fileManager: readTextFileFromCache: "appModified.txt" 06-17 10:23:19.320: W/ZZ(4062): BT_activity_host:handleReportToCloudResults previousModified (value on device): Mon, 16 Jun 2014 15:50:40 -0700 06-17 10:23:19.320: W/ZZ(4062): BT_fileManager: saveTextFileToCache: appModified.txt 06-17 10:23:19.330: W/ZZ(4062): BT_activity_host:handleReportToCloudResults server data not changed, no refresh needed 06-17 10:23:19.430: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/find3.png... 06-17 10:23:19.430: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.430: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/shows.png... 06-17 10:23:19.430: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.440: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/plusshow.png... 06-17 10:23:19.440: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.440: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/shows.png... 06-17 10:23:19.440: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.450: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/find3.png... 06-17 10:23:19.450: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.450: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/shows.png... 06-17 10:23:19.450: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.460: W/ZZ(4062): BT_imageLoader:loadImage Found image in cache. Not downloading from: http://www.webmonkeys.co/uktheatres/plusshow.png... 06-17 10:23:19.460: W/ZZ(4062): WB_screen_menuImage:density for this device is 2.0 06-17 10:23:19.660: D/dalvikvm(4062): GC_FOR_ALLOC freed 1313K, 7% free 57918K/62151K, paused 154ms, total 160ms 06-17 10:23:19.820: D/dalvikvm(4062): GC_FOR_ALLOC freed 133K, 6% free 61568K/64839K, paused 91ms, total 92ms 06-17 10:23:19.920: D/dalvikvm(4062): GC_BEFORE_OOM freed 9K, 6% free 61559K/64839K, paused 98ms, total 98ms 06-17 10:23:19.920: E/dalvikvm-heap(4062): Out of memory on a 2745136-byte allocation. 06-17 10:23:19.920: I/dalvikvm(4062): "Thread-421" prio=5 tid=25 RUNNABLE 06-17 10:23:19.920: I/dalvikvm(4062): | group="main" sCount=0 dsCount=0 obj=0x42b24260 self=0x5c8f6238 06-17 10:23:19.920: I/dalvikvm(4062): | sysTid=4164 nice=0 sched=0/0 cgrp=apps handle=1553326008 06-17 10:23:19.920: I/dalvikvm(4062): | schedstat=( 0 0 0 ) utm=16 stm=1 core=1 06-17 10:23:19.920: I/dalvikvm(4062): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 06-17 10:23:19.920: I/dalvikvm(4062): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:527) 06-17 10:23:19.920: I/dalvikvm(4062): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:599) 06-17 10:23:19.920: I/dalvikvm(4062): at com.uktheatres.BT_imageLoader.loadImage(BT_imageLoader.java:99) 06-17 10:23:19.920: I/dalvikvm(4062): at com.uktheatres.BT_imageLoader.access$0(BT_imageLoader.java:95) 06-17 10:23:19.920: I/dalvikvm(4062): at com.uktheatres.BT_imageLoader$1.run(BT_imageLoader.java:72) 06-17 10:23:19.920: D/skia(4062): --- decoder->decode returned false 06-17 10:23:19.920: W/dalvikvm(4062): threadid=25: thread exiting with uncaught exception (group=0x4177b450) 06-17 10:23:19.920: E/AndroidRuntime(4062): FATAL EXCEPTION: Thread-421 06-17 10:23:19.920: E/AndroidRuntime(4062): java.lang.OutOfMemoryError 06-17 10:23:19.920: E/AndroidRuntime(4062): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 06-17 10:23:19.920: E/AndroidRuntime(4062): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:527) 06-17 10:23:19.920: E/AndroidRuntime(4062): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:599) 06-17 10:23:19.920: E/AndroidRuntime(4062): at com.uktheatres.BT_imageLoader.loadImage(BT_imageLoader.java:99) 06-17 10:23:19.920: E/AndroidRuntime(4062): at com.uktheatres.BT_imageLoader.access$0(BT_imageLoader.java:95) 06-17 10:23:19.920: E/AndroidRuntime(4062): at com.uktheatres.BT_imageLoader$1.run(BT_imageLoader.java:72)
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/16/14 11:32 PM (10 years ago)
is that enough for you smug, i was going to put all the images with both the ios and android version on next build, but if its gonna help now, i will do it now, unless you can see something im missing smug Thanks sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/17/14 01:49 AM (10 years ago)
Graphics and Android is an issue, I don't know why but it is, android is sensitive to sizes of graphics - there a re a few posts about this in the forums. Two things from my own experience that will help and I would strongly recommend. 1) Optimise your images, by making them the the size you need and not bigger. There are two parts to this: a) make them the right height and width. For example, I've noticed the last image in your app before the crash was 840px × 817px, the one before is 198px × 197px, but I think they are both used in the same place (I looked at the ios version). b) use this online utility to shrink them once they are the right size https://tinypng.com/ 2) After you have done that, I bet your app will not crash in the same place, but moving them all into the project will also be a good step.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/17/14 01:50 AM (10 years ago)
Hmmm.... Is this on an emulator or on a device? It may be that the emulator (if this is the only tested platform) needs more memory allocated to it. Emulators traditionally won't have the same resources as a 'real' device. If you're experiencing this on a 'device' then I'd check the images to ensure nothing is too big. I don't see anything going 'wrong' at first glance... it just looks like you're loading images from cache... Cheers! -- Smug
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/17/14 02:28 AM (10 years ago)
cheers guys, i do use that tiny png alan, but some images might have slipped through, i will get all the images in a folder and optimise and resize, so there all as small as i can get them, cheers for the pointers, i know where to start now Thanks sean
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/17/14 05:08 AM (10 years ago)
Let us know how it goes Sean Cheers, Alan
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/17/14 06:18 AM (10 years ago)
will do alan, I'm still working on finishing compiling the images, then i get them all in a folder and make sure there all set sizes and then i can start compiling android, will keep you informed how it go,s dude, thanks sean
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
06/17/14 10:50 AM (10 years ago)
ps its on a real device smug, as i learned last time with eclipse, the simulators are troublesome, cheers sean
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.