3

I have a report from a user with Samsung Note 3 and Android 4.4.4. It dumps here:

SM-N900P 4.4.4 19

java.lang.NullPointerException
    at android.view.ViewRootImpl.setMultiWindowScale(ViewRootImpl.java:7992)
    at android.view.WindowManagerGlobal.setMultiWindowScale(WindowManagerGlobal.java:538)
    at com.android.internal.policy.impl.MultiPhoneWindow.adjustScaleFactor(MultiPhoneWindow.java:1602)
    at com.android.internal.policy.impl.MultiPhoneWindow.access$2300(MultiPhoneWindow.java:107)
    at com.android.internal.policy.impl.MultiPhoneWindow$MultiPhoneDecorView.onAttachedToWindow(MultiPhoneWindow.java:1120)
    at android.view.View.dispatchAttachedToWindow(View.java:13637)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2703)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1533)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1270)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6686)
    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:5727)
    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)

It's not in my code and I can't reproduce it in an emulator since I can't create an AVD with 4.4.4. With the AVD 4.4.2 it works. I have tried the physical phone in a store/shop with version 4.4.2 and it works. I can however not get hold of a 4.4.4 version.

  1. How can I create and AVD with 4.4.4?
  2. Why is Google not providing a 4.4.4 AVD?
  3. Anyone an idea how to solve the dump?
  4. I can't even find the line 7992 and method setMultiWindowScale in AOSP?

Thanks!

Murtaza Khursheed Hussain
  • 15,176
  • 7
  • 58
  • 83
powder366
  • 4,351
  • 7
  • 47
  • 79
  • 1
    There is no setMultiWindowScale() in AOSP and an AVD wouldn't help here because it's part of Samsung's customized version of Android. So the only way to know what's broken would be to look at Samsung's proprietary source code. – alanv Oct 01 '14 at 01:00
  • 1
    I am also having this issue. It only happens on the Sprint version of the Note 3 (SM N900P). – theJosh Jan 31 '15 at 17:49
  • @theJosh are you counciously trying to add multi window support for your application? if so cross check your implementation [here](http://stackoverflow.com/a/14185426/1505341). Can you reproduce the problem on emulator? – Kerem Feb 07 '15 at 09:08
  • @mass I am using multi window support. I have purchased a Sprint Note 3 and I am able to recreate the issue but still having problems finding the exact cause. – theJosh Feb 08 '15 at 19:47
  • @powder366 Do you use ads in your app? I use Mopub. However the paid version of my app which is ad free does not have this issue. – theJosh Feb 09 '15 at 20:11

1 Answers1

2

How can I create and AVD with 4.4.4?

Genymotion will let you emulate a Samsung Note 3 running on 4.4.4.

It has plugin support for Eclipse and Android Studio, follow instructions here for installing.

enter image description here

Why is Google not providing a 4.4.4 AVD?

I don't know why not AVD, but they are providing binaries for 4.4.4 here if you have access to a Nexus device you may want to double check/confirm that the problem is Samsung related only.

Anyone an idea how to solve the dump?

Posted stack trace above looks like the exception was thrown after your application was attached to a multi window and the view was scaled, or at least it was going to be scaled if that NPE was not thrown. Check your manifest settings using this step by step guide for multi window support, check max and min window sizes. If the emulator does not work and if you can't reproduce the exception, as a last resort reach that user somehow and communicate to reproduce the problem/test your solution and iterate until its fixed. Good luck!

I can't even find the line 7992 and method setMultiWindowScale in AOSP?

As this looks like very much related to a Samsung specific implementation of the android.view.ViewRootImpl class to support multi window and other Samsung stuff, I doubt that you can find the actual source code unless Samsung has published it somewhere.

Community
  • 1
  • 1
Kerem
  • 2,867
  • 24
  • 35
  • The issue does not happen on the emulator. I have 2 note 3 devices for testing now. Everything works fine on the Verizon device but crashes consistently on the Sprint device. The reports from Crashlytics show the same results. – theJosh Feb 08 '15 at 19:50
  • I'm not absolutely sure about the difference between Sprint and Verizon, is it on the hardware or software only? Do you have a chance to debug arguments you are passing to the setMultiWindowScale method? Such as the scale factor or resolution. I'm afraid those 2 phones have different implementations of that class, which might be the root cause. In that case maybe you should consider disabling multi window support for that particular device until the bug is fixed by the manufacturer. – Kerem Feb 09 '15 at 07:38