How to reproduce "createWindowSurface failed EGL_BAD_ALLOC" exception on my device? - android

ava.lang.RuntimeException: createWindowSurface failed EGL_BAD_ALLOC
at android.view.HardwareRenderer$GlRenderer.createSurface(HardwareRenderer.java:1387)
at android.view.HardwareRenderer$GlRenderer.createEglSurface(HardwareRenderer.java:1279)
at android.view.HardwareRenderer$GlRenderer.initialize(HardwareRenderer.java:1096)
at android.view.HardwareRenderer.initializeIfNeeded(HardwareRenderer.java:605)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2596)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2430)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2005)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1076)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5905)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:807)
at android.view.Choreographer.doCallbacks(Choreographer.java:601)
at android.view.Choreographer.doFrame(Choreographer.java:562)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:791)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5633)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:896)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:712)
at dalvik.system.NativeStart.main(NativeStart.java)
I am not using any OpenGl or anything of that sort. And hardwareAccelaration is also false

Related

NoClassDefFoundError when Sending email wiith the library: mysql-connector-java-5.0.8-bin

I have an issue in my android application when I try to send an email. If I use the library for send mail(mail.jar, activation.jar, additionnal.jar) and connector for android: mysql-connector-java-5.0.8-bin.jar throws an error:
java.lang.NoClassDefFoundError: com.example.timis.util.sendMails.Sendmail$1
at com.example.timis.util.sendMails.Sendmail.sendMail(Sendmail.java:31)
at com.example.timis.tour.LoginActivity.onCreate(LoginActivity.java:189)
at android.app.Activity.performCreate(Activity.java:5458)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2376)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2470)
at android.app.ActivityThread.access$900(ActivityThread.java:174)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1307)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5593)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
If I remove mysql-connector-java-5.0.8-bin it works well.

ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.support.v7.widget.Toolbar$SavedStat

App crashes on Samsung galaxy devices randomly.
java.lang.RuntimeException: Unable to start activity ComponentInfo: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.support.v7.widget.Toolbar$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2404)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4073)
at android.app.ActivityThread.access$1000(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1314)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.support.v7.widget.Toolbar$SavedState
at android.support.v7.widget.Toolbar.onRestoreInstanceState(Toolbar.java:1048)
at android.view.View.dispatchRestoreInstanceState(View.java:13757)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2855)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2861)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2861)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2861)
at android.view.View.restoreHierarchyState(View.java:13735)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1936)
at android.app.Activity.onRestoreInstanceState(Activity.java:997)
at android.app.Activity.performRestoreInstanceState(Activity.java:969)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1144)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2382)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4073)
at android.app.ActivityThread.access$1000(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1314)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(NativeStart.java)

Dev Tools app on Android Emulator crashing on sdcard scanning?

So I open Dev Tools app to refresh emulator's sd card. The sd card has been re-created, is not read-only and I can create folders on it, move files, etc.
And when I click on "Scan SD Card" button
the app crashes.
Did anyone have issues like this on the Emulator? Emulator is running SDK 19 (4.4.2), it's x86 image with XXHDPI resolution.
I am running Android Studio 1.0 and AVD was created using Android Studio 0.8 or something.
It's odd that I cannot find similar issues on Internet, like it's happening to me only.
EDIT
Logcat Error I get is
Process: com.android.development, PID: 2035
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3823)
at android.view.View.performClick(View.java:4438)
at android.view.View$PerformClick.run(View.java:18422)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at android.view.View$1.onClick(View.java:3818)
            at android.view.View.performClick(View.java:4438)
            at android.view.View$PerformClick.run(View.java:18422)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED from pid=2035, uid=10021
at android.os.Parcel.readException(Parcel.java:1465)
at android.os.Parcel.readException(Parcel.java:1419)
at android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:2373)
at android.app.ContextImpl.sendBroadcast(ContextImpl.java:1127)
at android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:365)
at com.android.development.MediaScannerActivity.startScan(MediaScannerActivity.java:123)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at android.view.View$1.onClick(View.java:3818)
            at android.view.View.performClick(View.java:4438)
            at android.view.View$PerformClick.run(View.java:18422)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)
Try running it from the 'ADB Command Prompt'
This command did the trick for me:
adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///mnt/sdcard/DCIM/100ANDRO/
Now, I can see images uploaded from the Android Device Monitor.

createWindowSurface failed EGL_NOT_INITIALIZED when screen is turned on

I am getting this exception randomly when screen is turned on:
java.lang.RuntimeException: createWindowSurface failed EGL_NOT_INITIALIZED
at android.view.HardwareRenderer$GlRenderer.createSurface(HardwareRenderer.java:1349)
at android.view.HardwareRenderer$GlRenderer.createEglSurface(HardwareRenderer.java:1241)
at android.view.HardwareRenderer$GlRenderer.initialize(HardwareRenderer.java:1058)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1875)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6630)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)
at android.view.Choreographer.doCallbacks(Choreographer.java:603)
at android.view.Choreographer.doFrame(Choreographer.java:573)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5479)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Why is this happening and is there some api to check if EGL_NOT_INITIALIZED, that way I can delay starting the activity.
( this happens mostly on samsung galaxy tab 4 10.1 SM-T530 )

java.lang.RuntimeException: createWindowSurface failed EGL_BAD_ALLOC

java.lang.RuntimeException: createWindowSurface failed EGL_BAD_ALLOC
at android.view.HardwareRenderer$GlRenderer.createSurface(HardwareRenderer.java:1359)
at android.view.HardwareRenderer$GlRenderer.createEglSurface(HardwareRenderer.java:1245)
at android.view.HardwareRenderer$GlRenderer.initialize(HardwareRenderer.java:1062)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1877)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1256)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6652)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:813)
at android.view.Choreographer.doCallbacks(Choreographer.java:613)
at android.view.Choreographer.doFrame(Choreographer.java:583)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:799)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
Yesterday, a user reported this bug in Google Play in one of my apps. Don't know why this occured. I am not sure atleast how to reproduce this. I found a similar question with no answers.

Categories

Resources