Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Android Studio 1.5.1 AVD Crashes

 
Ranch Hand
Posts: 234
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I am running Android Studio 1.5.1 in Windows 7 on a Dell i7 with 8 GB memory of which I have allocated 2 GB to Android, presumably its exclusive sandbox.

I've created a simple Gradle and downloaded several system images to test the various o/s versions.

I have created 2 Android Virtual Devices for :
Nexus 4 API 21 (arm)
Nexus 5 API 23 x86
The intention is to test the Java code using each of those environment.

Next I clicked Run -> Run 'app' -> checked launch emulator and selected Nexus 4 API 21 -> OK

Studio displayed the AVD and I can see various apps loading e.g. time, battery charging etc.

Then, after a few minutes, it crashed with a lot of messages saying "...too much work..."

Here is a sample from the console:
12-22 17:14:45.701 1099-1099/com.hfad.myfirstapp I/art: Not late-enabling -Xcheck:jni (already on)
12-22 17:14:47.925 1099-1106/com.hfad.myfirstapp W/art: Suspending all threads took: 265.654ms
12-22 17:14:50.938 1099-1111/com.hfad.myfirstapp I/art: Background sticky concurrent mark sweep GC freed 2743(244KB) AllocSpace objects, 0(0B) LOS objects, 29% free, 804KB/1135KB, paused 4.812ms total 359.103ms
12-22 17:14:51.150 1099-1126/com.hfad.myfirstapp D/OpenGLRenderer: Render dirty regions requested: true
12-22 17:14:51.247 1099-1099/com.hfad.myfirstapp D/Atlas: Validating map...
12-22 17:14:51.279 1099-1111/com.hfad.myfirstapp I/art: Background partial concurrent mark sweep GC freed 362(66KB) AllocSpace objects, 0(0B) LOS objects, 51% free, 949KB/1973KB, paused 1.251ms total 194.452ms
12-22 17:14:51.580 1099-1126/com.hfad.myfirstapp I/OpenGLRenderer: Initialized EGL, version 1.4
12-22 17:14:51.608 1099-1126/com.hfad.myfirstapp D/OpenGLRenderer: Enabling debug mode 0
12-22 17:14:51.734 1099-1126/com.hfad.myfirstapp W/EGL_emulation: eglSurfaceAttrib not implemented
12-22 17:14:51.734 1099-1126/com.hfad.myfirstapp W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xaeee6f00, error=EGL_SUCCESS
12-22 17:14:52.009 1099-1099/com.hfad.myfirstapp I/Choreographer: Skipped 41 frames! The application may be doing too much work on its main thread.
12-22 17:14:52.976 1099-1099/com.hfad.myfirstapp I/Choreographer: Skipped 57 frames! The application may be doing too much work on its main thread.
12-22 17:16:23.477 1099-1099/com.hfad.myfirstapp I/Choreographer: Skipped 62 frames! The application may be doing too much work on its main thread.
12-22 17:16:23.773 1099-1126/com.hfad.myfirstapp W/EGL_emulation: eglSurfaceAttrib not implemented
12-22 17:16:23.773 1099-1126/com.hfad.myfirstapp W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xaeee6f00, error=EGL_SUCCESS
12-22 17:16:24.169 1099-1099/com.hfad.myfirstapp I/Choreographer: Skipped 39 frames! The application may be doing too much work on its main thread.
12-22 17:16:25.184 1099-1099/com.hfad.myfirstapp I/Choreographer: Skipped 33 frames! The application may be doing too much work on its main thread.
12-22 17:20:06.481 1099-1106/com.hfad.myfirstapp W/art: Suspending all threads took: 10.226ms
12-22 17:21:25.135 1099-1106/com.hfad.myfirstapp W/art: Suspending all threads took: 7.085ms
12-22 17:25:30.072 1099-1106/com.hfad.myfirstapp W/art: Suspending all threads took: 10.219ms


What have I done wrong and how do I fix it?

Perhaps delete the other AVD, the Nexus 5 ?
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is com.hfad.myfirstapp your own app?
This error:
com.hfad.myfirstapp I/Choreographer: Skipped 41 frames! The application may be doing too much work on its main thread.
means the app is doing something time consuming in the UI thread. I believe this is a problem in your code, and not an error in your AVD.

What is this application doing? Some code might help.
 
AhFai Chan
Ranch Hand
Posts: 234
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Karthik Shiraly wrote:Is com.hfad.myfirstapp your own app?
This error:
com.hfad.myfirstapp I/Choreographer: Skipped 41 frames! The application may be doing too much work on its main thread.
means the app is doing something time consuming in the UI thread. I believe this is a problem in your code, and not an error in your AVD.

What is this application doing? Some code might help.




The odd part, the Nexus_4_API_21 (I think it is still Lollipop) AVD starts up and is responsive.
Prior to throwing those error messages in logcat, it says:
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.hfad.myfirstapp"
pkg: /data/local/tmp/com.hfad.myfirstapp
Successp?
etc...

then the error messages, but why is the AVD working?

Code for MainActivity.java follows




Stacktrace from logcat follows
12-23 10:31:06.850 1069-1069/? I/art: Not late-enabling -Xcheck:jni (already on)
12-23 10:31:08.107 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 6.836ms
12-23 10:31:08.756 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 159.294ms
12-23 10:31:09.104 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 5.408ms
12-23 10:31:09.658 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 27.921ms
12-23 10:31:10.144 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 33.759ms
12-23 10:31:10.276 1069-1083/com.hfad.myfirstapp W/art: Suspending all threads took: 20.853ms
12-23 10:31:10.366 1069-1083/com.hfad.myfirstapp I/art: Background sticky concurrent mark sweep GC freed 2781(250KB) AllocSpace objects, 0(0B) LOS objects, 27% free, 824KB/1135KB, paused 39.844ms total 308.166ms
12-23 10:31:10.619 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 8.637ms
12-23 10:31:10.987 1069-1114/com.hfad.myfirstapp D/OpenGLRenderer: Render dirty regions requested: true
12-23 10:31:11.012 1069-1069/com.hfad.myfirstapp D/Atlas: Validating map...
12-23 10:31:11.154 1069-1083/com.hfad.myfirstapp I/art: Background partial concurrent mark sweep GC freed 361(62KB) AllocSpace objects, 0(0B) LOS objects, 51% free, 948KB/1972KB, paused 1.146ms total 177.115ms
12-23 10:31:11.718 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 108.523ms
12-23 10:31:11.974 1069-1114/com.hfad.myfirstapp I/OpenGLRenderer: Initialized EGL, version 1.4
12-23 10:31:12.020 1069-1114/com.hfad.myfirstapp D/OpenGLRenderer: Enabling debug mode 0
12-23 10:31:12.123 1069-1114/com.hfad.myfirstapp W/EGL_emulation: eglSurfaceAttrib not implemented
12-23 10:31:12.123 1069-1114/com.hfad.myfirstapp W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xaeee8d20, error=EGL_SUCCESS
12-23 10:31:12.386 1069-1069/com.hfad.myfirstapp I/Choreographer: Skipped 74 frames! The application may be doing too much work on its main thread.
12-23 10:31:13.568 1069-1069/com.hfad.myfirstapp I/Choreographer: Skipped 69 frames! The application may be doing too much work on its main thread.
12-23 10:32:40.894 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 6.202ms
12-23 10:32:42.406 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 71.960ms
12-23 10:32:42.863 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 28.868ms
12-23 10:32:43.361 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 8.898ms
12-23 10:32:43.959 1069-1069/com.hfad.myfirstapp I/Choreographer: Skipped 166 frames! The application may be doing too much work on its main thread.
12-23 10:32:44.739 1069-1114/com.hfad.myfirstapp W/EGL_emulation: eglSurfaceAttrib not implemented
12-23 10:32:44.740 1069-1114/com.hfad.myfirstapp W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xaeee8d20, error=EGL_SUCCESS
12-23 10:32:45.143 1069-1069/com.hfad.myfirstapp I/Choreographer: Skipped 69 frames! The application may be doing too much work on its main thread.
12-23 10:32:45.346 1069-1076/com.hfad.myfirstapp W/art: Suspending all threads took: 6.952ms
12-23 10:32:46.300 1069-1069/com.hfad.myfirstapp I/Choreographer: Skipped 33 frames! The application may be doing too much work on its main thread.
 
AhFai Chan
Ranch Hand
Posts: 234
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Karthik Shiraly wrote:Is com.hfad.myfirstapp your own app?
This error:
com.hfad.myfirstapp I/Choreographer: Skipped 41 frames! The application may be doing too much work on its main thread.
means the app is doing something time consuming in the UI thread. I believe this is a problem in your code, and not an error in your AVD.

What is this application doing? Some code might help.



I managed to capture the first part of the logcat message:

Device connected: emulator-5554
Device is ready: Nexus_4_API_21 [emulator-5554]
Target device: Nexus_4_API_21 [emulator-5554]
Installing APK: C:\Users\ARTHUR\AndroidStudioProjects\MyFirstApp\app\build\outputs\apk\app-debug.apk
Uploading file to: /data/local/tmp/com.hfad.myfirstapp
Installing com.hfad.myfirstapp
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.hfad.myfirstapp"
pkg: /data/local/tmp/com.hfad.myfirstapp
Success


Launching application: com.hfad.myfirstapp/com.hfad.myfirstapp.MainActivity.
DEVICE SHELL COMMAND: am start -n "com.hfad.myfirstapp/com.hfad.myfirstapp.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER


The AVD works fine, far as I can tell, maybe it is just some idiosyncratic behaviour from Studio
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic