Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on 4.4.2 and 4.3 #1

Closed
uberspot opened this issue Mar 28, 2014 · 4 comments
Closed

Crash on 4.4.2 and 4.3 #1

uberspot opened this issue Mar 28, 2014 · 4 comments

Comments

@uberspot
Copy link

Cool project first of all. :) I find it very useful.

Now whenever I Build and Launch it on Nexus 4 with 4.4.2 or Moto X with 4.3 it crashes with the following.
Is this a bug or am I doing something wrong?

    03-28 14:04:44.331: E/WindowManager(1241): android.view.WindowLeaked: Activity com.android.grafika.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{52837850 V.E..... R....... 0,0-729,276} that was originally added here
    03-28 14:04:44.331: E/WindowManager(1241):  at android.view.ViewRootImpl.<init>(ViewRootImpl.java:348)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.app.Dialog.show(Dialog.java:286)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.app.AlertDialog$Builder.show(AlertDialog.java:951)
    03-28 14:04:44.331: E/WindowManager(1241):  at com.android.grafika.ContentManager.prepareContent(ContentManager.java:126)
    03-28 14:04:44.331: E/WindowManager(1241):  at com.android.grafika.ContentManager.createAll(ContentManager.java:113)
    03-28 14:04:44.331: E/WindowManager(1241):  at com.android.grafika.MainActivity.onCreate(MainActivity.java:121)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.app.Activity.performCreate(Activity.java:5231)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.app.ActivityThread.access$800(ActivityThread.java:135)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.os.Handler.dispatchMessage(Handler.java:102)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.os.Looper.loop(Looper.java:136)
    03-28 14:04:44.331: E/WindowManager(1241):  at android.app.ActivityThread.main(ActivityThread.java:5017)
    03-28 14:04:44.331: E/WindowManager(1241):  at java.lang.reflect.Method.invokeNative(Native Method)
    03-28 14:04:44.331: E/WindowManager(1241):  at java.lang.reflect.Method.invoke(Method.java:515)
    03-28 14:04:44.331: E/WindowManager(1241):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    03-28 14:04:44.331: E/WindowManager(1241):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    03-28 14:04:44.331: E/WindowManager(1241):  at dalvik.system.NativeStart.main(Native Method)
@fadden
Copy link
Contributor

fadden commented Mar 28, 2014

I believe that's just an advisory message from WindowManager. Is there another exception following it? Looks like it's complaining about the dialog that creates the two generated movies.

I think it means that the mPrepDialog.dismiss() call in ContentManager$GenerateTask#onPostExecute() isn't happening. Do you see the "onPostExecute -- dismss" message in the log?

@uberspot
Copy link
Author

Nope, the log posted above is all I get. After that the app crashes and nothing else is seen.

@fadden
Copy link
Contributor

fadden commented Mar 28, 2014

I think this is a consequence of #2 . The actual exception appears in the log before the WindowLeaked message (possibly 100+ lines up). I can reproduce the behavior by adding an exception throw in GeneratedMovie#prepareEncoder(), clearing the existing movies, and launching the app.

This could be handled better.

@fadden
Copy link
Contributor

fadden commented Mar 31, 2014

New version is up. It now reports failures in the initial video generation with a dialog, and lets you continue on. Various activities are likely to fail, but at least you get to see a failure message now.

Tested with the AOSP emulator, which always fails (because it always uses the software AVC codec).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants