-2

I'm creating an app that will use images. So the user will pick or take photo. I'm using the latest version of CropImage library. I checked for permissions as in the CropImage library. But immediately the choose photo or camera activity opens, my app close without any error. This is the last sentence of my android studio monitor "D/OpenGLRenderer: Terminated EGL display (0x1)" from debugger.

What can I do about this?

Stacktrace:

09-19 21:35:19.142 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f7f043ae0) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:19.143 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f7f043ae0), client(35), share_fd(48)
09-19 21:35:19.143 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f7f043a40) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:19.144 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f7f043a40), client(35), share_fd(49)
09-19 21:35:19.146 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f7f044080) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:19.146 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f7f044080), client(35), share_fd(44)
09-19 21:35:19.148 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f723cfe60) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:19.150 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f723cfe60), client(35), share_fd(47)
09-19 21:35:19.150 30868-30958/com.ngs.example D/Surface: Surface::disconnect(this=0x7f87f5f000,api=1)
09-19 21:35:19.156 30868-30958/com.ngs.example D/Surface: Surface::disconnect(this=0x7f71079000,api=1)
09-19 21:35:19.157 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f72386c20) (w:520 h:224 s:528 f:0x1 u:0x000b00)
09-19 21:35:19.158 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f72386c20), client(35), share_fd(53)
09-19 21:35:19.158 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f723d0d60) (w:520 h:224 s:528 f:0x1 u:0x000b00)
09-19 21:35:19.159 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f723d0d60), client(35), share_fd(46)
09-19 21:35:19.159 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f7f043c20) (w:520 h:224 s:528 f:0x1 u:0x000b00)
09-19 21:35:19.160 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f7f043c20), client(35), share_fd(51)
09-19 21:35:19.160 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f72386d60) (w:520 h:224 s:528 f:0x1 u:0x000b00)
09-19 21:35:19.161 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f72386d60), client(35), share_fd(50)
09-19 21:35:19.161 30868-30958/com.ngs.example D/Surface: Surface::disconnect(this=0x7f71079000,api=1)
09-19 21:35:19.162 30868-30958/com.ngs.example D/OpenGLRenderer: endAllStagingAnimators on 0x7f718fb000 (MenuPopupWindow$MenuDropDownListView @a3e5a62) with handle 0x7f717bf540
09-19 21:35:19.167 30868-30868/com.ngs.example E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
09-19 21:35:19.167 30868-30868/com.ngs.example E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
09-19 21:35:19.339 30868-30868/com.ngs.example D/WindowClient: Remove from mViews: android.widget.PopupWindow$PopupDecorView{bb453dc V.E...... ......ID 0,0-392,96}, this = android.view.WindowManagerGlobal@82ae1e2
09-19 21:35:19.489 30868-30958/com.ngs.example I/[MALI][Gralloc]: [+]r_hnd(0x7f7f043c20), client(35), share_fd(41)
09-19 21:35:19.489 30868-30958/com.ngs.example D/GraphicBuffer: register, handle(0x7f7f043c20) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:19.508 30868-30868/com.ngs.example V/ActivityThread: Finishing stop of ActivityRecord{179011a token=android.os.BinderProxy@2f7944b {com.ngs.example/com.ngs.example.MainActivity}}: show=false win=com.android.internal.policy.PhoneWindow@118d224
09-19 21:35:19.510 30868-30868/com.ngs.example V/PhoneWindow: DecorView setVisiblity: visibility = 4 ,Parent =ViewRoot{1e13973 com.ngs.example/com.ngs.example.MainActivity,ident = 0}, this =com.android.internal.policy.PhoneWindow$DecorView{8904d4 I.E...... R......D 0,0-720,1280}
09-19 21:35:19.510 30868-30868/com.ngs.example D/ActivityThread: ACT-STOP_ACTIVITY_HIDE handled : 0 / android.os.BinderProxy@2f7944b
09-19 21:35:19.544 30868-30958/com.ngs.example I/[MALI][Gralloc]: [+]r_hnd(0x7f72386d60), client(35), share_fd(42)
09-19 21:35:19.545 30868-30958/com.ngs.example D/GraphicBuffer: register, handle(0x7f72386d60) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:20.381 30868-30868/com.ngs.example D/SettingsInterface:  from settings cache , name = sound_effects_enabled , value = 0
09-19 21:35:20.411 30868-30868/com.ngs.example D/ActivityThread: ACT-AM_ON_PAUSE_CALLED ActivityRecord{c9afbd3 token=android.os.BinderProxy@ee9b310 {com.ngs.example/com.ngs.example.UserProfile}}
09-19 21:35:20.425 30868-30868/com.ngs.example D/ActivityThread: ACT-PAUSE_ACTIVITY handled : 1 / android.os.BinderProxy@ee9b310
09-19 21:35:21.333 30868-30868/com.ngs.example V/ActivityThread: Finishing stop of ActivityRecord{c9afbd3 token=android.os.BinderProxy@ee9b310 {com.ngs.example/com.ngs.example.UserProfile}}: show=true win=com.android.internal.policy.PhoneWindow@e22ec90
09-19 21:35:21.334 30868-30868/com.ngs.example D/ActivityThread: ACT-STOP_ACTIVITY_SHOW handled : 0 / android.os.BinderProxy@ee9b310
09-19 21:35:22.405 30868-30868/com.ngs.example V/PhoneWindow: DecorView setVisiblity: visibility = 4 ,Parent =ViewRoot{ad1ab94 com.ngs.example/com.ngs.example.UserProfile,ident = 3}, this =com.android.internal.policy.PhoneWindow$DecorView{8f822f I.E...... R......D 0,0-720,1280}
09-19 21:35:22.406 30868-30868/com.ngs.example D/ActivityThread: ACT-HIDE_WINDOW handled : 0 / android.os.BinderProxy@ee9b310
09-19 21:35:22.408 30868-30958/com.ngs.example D/Surface: Surface::disconnect(this=0x7f7107ac00,api=1)
09-19 21:35:22.413 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f7f043c20) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:22.415 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f7f043c20), client(35), share_fd(41)
09-19 21:35:22.415 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f72386d60) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:22.418 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f72386d60), client(35), share_fd(42)
09-19 21:35:22.419 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f72386400) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:22.421 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f72386400), client(35), share_fd(56)
09-19 21:35:22.422 30868-30958/com.ngs.example D/GraphicBuffer: unregister, handle(0x7f7f044300) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
09-19 21:35:22.424 30868-30958/com.ngs.example I/[MALI][Gralloc]: [-]r_hnd(0x7f7f044300), client(35), share_fd(55)
09-19 21:35:22.424 30868-30958/com.ngs.example D/Surface: Surface::disconnect(this=0x7f7107ac00,api=1)
09-19 21:35:22.454 30868-30958/com.ngs.example D/OpenGLRenderer: Destroyed EGL context (0x7f82d85800)
09-19 21:35:22.457 30868-30958/com.ngs.example D/OpenGLRenderer: Terminated EGL display (0x1)

The CropImage lib example I used.

  • Please edit your question to provide a [mcve]. This would include [the complete Java stack trace associated with your crash](https://stackoverflow.com/questions/23353173/unfortunately-myapp-has-stopped-how-can-i-solve-this) and all relevant source code tied to where the crash occurs. – CommonsWare Sep 19 '16 at 20:54
  • The app closes either when the camera intent is launching or the Gallery intent is launching – Etta Egbe Joseph Sep 19 '16 at 21:04
  • Then show the code for those intents. – greenapps Sep 19 '16 at 21:19
  • I just found out that my app goes out of the allocated 28.82 MB memory. Please how can i resolve this memory issue. – Etta Egbe Joseph Sep 21 '16 at 07:28

1 Answers1

0

Scale the image when loading by using inSampleSize

See https://developer.android.com/training/displaying-bitmaps/load-bitmap.html

user3838124
  • 36
  • 1
  • 3