Android app launches on some models with a chance to always be black screen

Source: Internet
Author: User
Tags lenovo

============ Problem Description ============


We have developed an app using mono for Android and found that on some models (such as Lenovo A3000-h), there will always be a black screen, no interface to the program (as well as no debug breakpoints), and some models will not.

By careful observation, found in the background "currently running the program" column, when successfully started, the volume of the program is about 21MB. When the startup fails (always black screen), the program occupies a volume of about 9MB.

In addition, through the Eclipse monitoring program to start the log, the comparison found some differences.

Log on successful startup
02-24 16:00:47.038: i/activitymanager (515):  start u0 {act=android.intent.action.main  cat=[android.intent.category.launcher] flg=0x10200000 cmp=com. GDSCP. Modileenforces/mobileenforces. Beginactivity} from pid 101602-24 16:00:47.073: w/trace (515):    02-24  16:00:47.078: i/bufferqueue (133):  [unnamed-133-2248] (this:0x41f5b448,api:0)   Bufferqueue02-24 16:00:47.078: i/bufferqueue (133):  [unnamed-133-2248] (this:0x41f5b448,api:0)  consumerconnect02-24 16:00:47.078: i/bufferqueue (133):  [unnamed-133-2248] (this:0x41f5b448 , api:0)  setconsumername: unnamed-133-224802-24 16:00:47.078: i/surfacetexture (133):  [ UNNAMED-133-2248] (this:0x41f5e5e8,api:0)  surfacetexture02-24 16:00:47.078: i/bufferqueue (133): &NBSP;[UNNAMED-133-2248] (this:0x41f5b448,api:0)  setsynchronousmode: enabled=102-24 16:00:47.078 :  i/bufferqueue (133):  [unnamed-133-2248] (this:0x41f5b448,api:0)  setDefaultBufferSize: w=1, h=102-24  16:00:47.078: i/bufferqueue (133):  [starting com. GDSCP. Modileenforces] (this:0x41f5b448,api:0)  setconsumername: starting com. GDSCP. Modileenforces02-24 16:00:47.080: w/trace (515):    02-24 16:00:47.085: i/ Bufferqueue (133):  [starting com. GDSCP. Modileenforces] (this:0x41f5b448,api:0)  setDefaultBufferSize: w=1024, h=55202-24  16:00:47.088: w/trace (515):    02-24 16:00:47.093: e/launcher (1016):  new  onsaveinstancestate <f2><f2><f2><f2><f2><f2><f2><f2 ><f2><f2><f2><f2><f2><f2>02-24 16:00:47.094: e/launcher (1016) :  onpause flag orientation falg        =202-24  16:00:47.097: w/trace (515): &NBSP;&NBSP;&NBsp;  02-24 16:00:47.109: i/bufferqueue (133):  [starting com. GDSCP. Modileenforces] (this:0x41f5b448,api:0)  connect: api=202-24 16:00:47.109: i/bufferqueue (133 ):  [starting com. GDSCP. Modileenforces] (this:0x41f5b448,api:2)  setsynchronousmode: enabled=102-24 16:00:47.109: i/ Bufferqueue (133):  [starting com. GDSCP. Modileenforces] (this:0x41f5b448,api:2)  new graphicbuffer needed02-24 16:00:47.113: i/ Graphicbuffer (133): allocate buffer  (w:1024 h:552 f:1)  err (0) 02-24  16:00:47.115: i/activitymanager (515):  start proc com. GDSCP. Modileenforces for activity com. GDSCP. Modileenforces/mobileenforces. beginactivity: pid=2225 uid=10106 gids={50106, 3003, 1015, 1028}02-24  16:00:47.117: w/trace (515):    02-24 16:00:47.117: w/trace (515):    02-24 16: 00:47.118: i/bufferqueue (133):      [new] gb=0x41f63690, handle= 0x41f63090, w=1024, h=552, s=1024, fmt=102-24 16:00:47.125: w/trace (515):    02-24 16:00:47.135: i/surfacetexture (133):  [starting com. GDSCP. Modileenforces] (this:0x41f5e5e8,api:2)  [void* android::surfacetexture::createimage (EGLDisplay,  const android::sp<android::graphicbuffer>&)]02-24 16:00:47.138: w/trace (1016):  &NBSP;&NBSP;///////////////////////02-24&NBSP;16:00:47.150:&NBSP;I/COM.UMENG.COMMON.B (1016): Could  Not get location from gps or cell-id, lack access_coarse_location  or access_coarse_location permission?02-24 16:00:47.160: w/trace (2225):    02-24 16:00:47.160: w/trace (2225):    02-24 16:00:47.167: w/adb_ SERVICES (2431):  create_local_service_sockET ()  name=jdwp:222502-24 16:00:47.168: w/adb_services (2431):  looking for pid &NBSP;2225&NBSP;IN&NBSP;JDWP&NBSP;PROCESS&NBSP;LIST&NBSP;RETURN&NBSP;FDS0 (&NBSP;FDS1) 02-24  16:00:47.168: w/adb_services (2431): trying to write to jdwp socket=16  Pid=2225 count=1 out_fds=2002-24 16:00:47.182: w/trace (515):   02-24  16:00:47.184: w/trace (515):    02-24 16:00:47.184: i/windowmanager (515):  Losing focus: window{41b51e38 u0 com.lenovo.launcher/com.lenovo.launcher2.launcher}02-24  16:00:47.184: w/trace (515):    02-24 16:00:47.205: w/trace (515):    02-24 16:00:47.214: i/activitythread (2225):  pub com. GDSCP. Modileenforces.mono.monoruntimeprovider.__mono_init__: mono. Monoruntimeprovider02-24 16:00:47.218: w/monodroid-debugger (2225):  not starting the debugger as the timeout value has been reached;  Current-time: 1393228847  timeout: 139288649902-24 16:00:47.227: e/mono (2225):  warning: the runtime version supported by this application is  unavailable.02-24 16:00:47.229: e/mono (2225): using default runtime:  V2.0.5072702-24 16:00:47.242: i/surfacetextureclient (133): [stc::queuebuffer]  (this:0 x41ad6840)  fps:0.19, dur:69222.88, max:69032.22, min:5.7302-24 16:00:47.242: i/ Surfacetextureclient (133):  [stc::queuebuffer] this:0x41ad6840, api:1, last queue  time elapsed:69032.2202-24 16:00:47.242: i/bufferqueue (133):  [FramebufferSurface] ( THIS:0X41AD9008,API:1)  [release] fps:0.19, dur:69222.92, max:69032.27, min:5.6902-24  16:00:47.242: i/bufferqueue (1):  [framebuffersurface] (this:0x41ad9008,api:1)  [queue] fps:0.19, dur:69222.87, max : 69032.27,&NBSP;MIN:5.6102-24&NBSP;16:00:47.250:&NBSP;W/LIBC (2225):warning:generic atexit () called from Legacy GKFX library02-24 16:00:47.263:W/MONODROID-GC (2225): Gref GC Threshol d:4680002-24 16:00:47.521:w/trace (515): 02-24 16:00:47.531:w/trace (515):02-24 16:00:47.618: i/appcheck (3425):  oldcom.lenovo.launcher------------new:com. GDSCP. Modileenforces02-24 16:00:47.618: i/appcheck (3425):  runningtask------------Action: Com.lenovo.safecenter.activityswitch com. GDSCP. Modileenforces com.lenovo.launcher02-24 16:00:47.621: w/trace (3425):    02-24  16:00:47.621: i/leemcenterreceiver (3425):  onreceive () 02-24 16:00:47.622: i/appcheck ( 3425):  runningtask------------End02-24 16:00:47.623: i/appcheck (3425):  Recenttask------------action:com.lenovo.safecenter.activityswitch2 com. GDSCP. Modileenforces com.lenovo.launcher02-24 16:00:47.625: i/appcheck (3425):  Recenttask------------End02-24 16:00:47.626: i/leemcenterreceiver (3425):  newpkg interval  == 139322884762502-24 16:00:47.626: i/leemcenterreceiver (3425): cur ==  1393228847626 boottime == 0 time&nBsp;== 139322884762502-24 16:00:47.628: w/trace (3425):    02-24 16:00:47.628 :  w/trace (3425): &NBSP;&NBSP;&NBSP;02-24&NBSP;16:00:47.628:&NBSP;I/YDP (3425):  pkg---->com. GDSCP. MODILEENFORCES02-24&NBSP;16:00:47.628:&NBSP;E/YDP (3425):  checkapp pkgname:com. GDSCP. Modileenforces02-24 16:00:47.640: i/safepaymen (3425):  clearnotify pkg: Com.lenovo.launcher02-24 16:00:47.647: w/trace (3425):    02-24 16:00:47.647:  w/trace (3425):    02-24 16:00:47.649: w/trace (3425):    //// The order of startup failures is different//create an instance first, then start. If the startup fails, it is started and then the instance is created. 02-24 16:00:47.671: e/launcher (1016): ontrimm<f2><f2><f2><f2><f2> <F2><F2><F2><F2><F2><F2><F2><F2>02-24 16:00:47.671:  E/appscustomizetabhost (1016): ontrimmemory reset        000000000000000000000097777766666666111111  02-24 16:00:47.697: w/parcel (515): attempt to read object from  Parcel 0x57357554 at offset 68 that is not in the object  list02-24 16:00:47.810: i/bufferqueue (133):  [com.lenovo.launcher/ Com.lenovo.launcher2.Launcher] (this:0x41f68008,api:1)  disconnect: api=102-24 16:00:47.810:  i/surfacetexture (133): [com.lenovo.launcher/com.lenovo.launcher2.launcher] [virtual  Android::status_t android::surfacetexture::forceauxconversionlocked ()] mcurrenttexture:1,  Mcurrentbuf:0x41f874f802-24 16:00:47.810: i/bufferqueue (133):  [com.lenovo.launcher/ Com.lenovo.launcher2.Launcher] (this:0x41f68008,api:0)  getReleasedBuffers: returning mask  0xffffffff02-24 16:00:47.810: i/surfacetexture (133):  [com.lenovo.launcher/ Com.lenovo.launcher2.Launcher] (this:0x41e38b58,api:0)  destroying eglimage DP Y=0x1 img=0x41e3895002-24 16:00:47.811: i/surfacetexture (133):  [com.lenovo.launcher/ Com.lenovo.launcher2.Launcher] (this:0x41e38b58,api:0)  destroying eglimage dpy=0x1 img= 0x4203c27002-24 16:00:47.811: i/surfacetexture (133):  [com.lenovo.launcher/ Com.lenovo.launcher2.Launcher] (this:0x41e38b58,api:0)  destroying eglimage dpy=0x1 img= 0x41f877b802-24 16:00:47.812: i/surfacetexture (133):  [com.lenovo.launcher/ Com.lenovo.launcher2.Launcher] (this:0x41e38b58,api:0)  destroying eglimage dpy=0x1 img= 0x41f7cab802-24 16:00:47.818: i/mono-stdout (2225):   02-24 16:00:47.836: i/ Mono-stdout (2225):  16:00:47 | info | >>>initialize the  Database>>>> 02-24 16:00:47.836: i/mono-stdout (2225):   //started successfully calling the corresponding output ...... Thereafter slightly

Log on when startup fails 2L

============ Solution 1============


Don't take the time to develop Android in C #

============ Solution 2============


I can see so many error.

Android app launches on some models with a chance to always be black screen

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.