Skip to first unread message

joni m

unread,
Dec 25, 2014, 7:30:01 AM12/25/14
to mitappinv...@googlegroups.com
Hi
I have 2 vertical arrangement (arr1,arr2) with 10 JPG images in each of them
I have 1 additional vertical arrangement with 1 long JPG image (100kb)
blocks board is empty
my apk file size: 3.5 MB

every time when I start the app it crashes "unfortunately <app name> has stopeed"
If I change image in additional vertical arrangement to another smaller image its work partially (somtimes it works and sometime crashes)
I add an attachment
thanks
crash.JPG

Enis

unread,
Dec 25, 2014, 8:12:21 AM12/25/14
to
How big is your AIA file?  When you say "When I start the app," does that mean in the emulator or on a device?  What you've shown in your post doesn't tell us much unfortunately, and with no blocks, it's virtually impossible for us to see what's happening.  Why don't you remove ALL of your images, then put them back one by one, with a test between each.  Perhaps you have a bad graphic or two.  Please read my tips below.  Happy Holidays!
____________________________________________________________________

http://twodogapps.com?page_id=686

For our App Inventor Tips, visit TwoDogApps.com by clicking here!


joni m

unread,
Dec 25, 2014, 9:05:01 AM12/25/14
to mitappinv...@googlegroups.com
my AIA size is 2.6MB
app starts in the device
I know that AIA size is limited to 5 MB so I dont see any reason for the crash
and I dont use blocks because I dont need them right now, I just start to build the app

note: when I remove some images from screen1 (but does not delete them from app inventor) it works good

Taifun

unread,
Dec 25, 2014, 10:24:09 AM12/25/14
to mitappinv...@googlegroups.com
to find out, why it force closes. you can use logcat, see also
let us know the logcat result...
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.

joni m

unread,
Dec 26, 2014, 6:17:30 AM12/26/14
to mitappinv...@googlegroups.com
I get this over and over in logcat: (I tried on the emulator)

12-26 11:12:56.839: D/AppInvHTTPD(244): NanoHTTPD: getPoolSize() = 2
12-26 11:12:56.859: I/global(244): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
12-26 11:12:56.869: I/global(244): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
12-26 11:12:56.869: D/AppInvHTTPD(244): POST '/_values' 

and I had some recoeds in red:

12-26 11:07:18.468: E/ActivityManager(68): ANR in edu.mit.appinventor.aicompanion3 (edu.mit.appinventor.aicompanion3/.Screen1)
12-26 11:07:18.468: E/ActivityManager(68): Reason: keyDispatchingTimedOut
12-26 11:07:18.468: E/ActivityManager(68): Load: 7.79 / 2.04 / 0.69
12-26 11:07:18.468: E/ActivityManager(68): CPU usage from 8428ms to 2295ms ago:
12-26 11:07:18.468: E/ActivityManager(68):   or.aicompanion3: 58% = 48% user + 10% kernel / faults: 3393 minor 109 major
12-26 11:07:18.468: E/ActivityManager(68):   system_server: 17% = 8% user + 9% kernel / faults: 2355 minor 77 major
12-26 11:07:18.468: E/ActivityManager(68):   e.process.gapps: 11% = 5% user + 6% kernel / faults: 1933 minor 35 major
12-26 11:07:18.468: E/ActivityManager(68):   android.protips: 5% = 1% user + 4% kernel / faults: 3074 minor 1 major
12-26 11:07:18.468: E/ActivityManager(68):   m.android.music: 5% = 2% user + 3% kernel / faults: 3103 minor 4 major
12-26 11:07:18.468: E/ActivityManager(68):   app_process: 2% = 1% user + 1% kernel / faults: 536 minor 2 major
12-26 11:07:18.468: E/ActivityManager(68):   d.process.media: 1% = 0% user + 0% kernel / faults: 690 minor 4 major
12-26 11:07:18.468: E/ActivityManager(68):   d.process.acore: 0% = 0% user + 0% kernel / faults: 382 minor 6 major
12-26 11:07:18.468: E/ActivityManager(68):   ndroid.launcher: 0% = 0% user + 0% kernel / faults: 261 minor 8 major
12-26 11:07:18.468: E/ActivityManager(68):   .quicksearchbox: 0% = 0% user + 0% kernel / faults: 343 minor 1 major
12-26 11:07:18.468: E/ActivityManager(68):   com.android.mms: 0% = 0% user + 0% kernel / faults: 302 minor 2 major
12-26 11:07:18.468: E/ActivityManager(68):   adbd: 0% = 0% user + 0% kernel
12-26 11:07:18.468: E/ActivityManager(68):   kswapd0: 0% = 0% user + 0% kernel
12-26 11:07:18.468: E/ActivityManager(68):   mmcqd: 0% = 0% user + 0% kernel
12-26 11:07:18.468: E/ActivityManager(68):   vold: 0% = 0% user + 0% kernel / faults: 53 minor 2 major
12-26 11:07:18.468: E/ActivityManager(68):   m.android.phone: 0% = 0% user + 0% kernel / faults: 202 minor
12-26 11:07:18.468: E/ActivityManager(68):  -vold: 0% = 0% user + 0% kernel
12-26 11:07:18.468: E/ActivityManager(68): TOTAL: 100% = 68% user + 31% kernel


Taifun

unread,
Dec 26, 2014, 8:07:29 AM12/26/14
to mitappinv...@googlegroups.com
this is your error
ANR in edu.mit.appinventor.aicompanion3 (edu.mit.appinventor.aicompanion3/.Screen1)
Reason: keyDispatchingTimedOut

you can find more information after doing a Google serch

what kind of logic are you using in your screen? any complex task?
which device do you use for your tests?
did you test after building your app with the apk file?
Taifun

joni m

unread,
Dec 28, 2014, 2:22:19 PM12/28/14
to mitappinv...@googlegroups.com
yes I test with apk file on my android device
there is no logic at all (blocks board is empty) I just add 22 images (screenshots) and maximum size of all of them is 2.5MB 

joni m

unread,
Dec 28, 2014, 2:52:34 PM12/28/14
to mitappinv...@googlegroups.com
I get runtime error
heap size = 40903kb
allocated =24372kb

what does it means

Taifun

unread,
Dec 28, 2014, 5:01:38 PM12/28/14
to mitappinv...@googlegroups.com
which device do you use for your tests? most probably an older one?
do you have to display all images at the same time in your app?
probably you can reuse an image component and add some logic to your app?
Taifun

Don Merchant

unread,
Dec 29, 2014, 8:17:27 PM12/29/14
to mitappinv...@googlegroups.com
Taifun,

Your link in your post above regarding the SDK utilities points to an expired webpage.

Taifun

unread,
Dec 30, 2014, 9:59:30 AM12/30/14
to mitappinv...@googlegroups.com
@Don: it seems to be, Tony's website expired, hopefully his site is up and running again soon!
Taifun

joni m

unread,
Dec 30, 2014, 11:18:07 AM12/30/14
to mitappinv...@googlegroups.com
my device is HTC one V4.1.1
I have 10 image components and I use each one of them to display 3 or 2 different images
but it depends on what button I press , when button is pressed former image is change to the new one (set image1.picture to ...)
do you need more info?
thanks

Taifun

unread,
Dec 30, 2014, 11:46:57 AM12/30/14
to mitappinv...@googlegroups.com
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

joni m

unread,
Dec 31, 2014, 3:34:08 AM12/31/14
to mitappinv...@googlegroups.com
screenshot attached
image.JPG

Taifun

unread,
Dec 31, 2014, 10:51:32 AM12/31/14
to mitappinv...@googlegroups.com
what you can do is to reduce the image sizes and/or display less images the same time
Taifun

joni m

unread,
Dec 31, 2014, 4:38:38 PM12/31/14
to mitappinv...@googlegroups.com
I must have all images and I succeed to reduce just 200kb and its not enough 
I tried before to upload the image from website link instead to upload the image to app inventor but it takes a long time until picture is display 
(5 sec instead of 1 sec) there is a way to speed it up?
Reply all
Reply to author
Forward
0 new messages