java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.View.getAlpha()' on a null object reference

JIRA | OldNightlyBug | 1 year ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    When I try to add an icon to the home screen, trebuchet crashes. Here is the adb log: D/AndroidRuntime( 2913): Shutting down VM E/AndroidRuntime( 2913): FATAL EXCEPTION: main E/AndroidRuntime( 2913): Process: com.cyanogenmod.trebuchet, PID: 2913 E/AndroidRuntime( 2913): java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.View.getAlpha()' on a null object reference E/AndroidRuntime( 2913): at com.android.launcher3.SearchDropTargetBar.onDragStart(SearchDropTargetBar.java:212) E/AndroidRuntime( 2913): at com.android.launcher3.DragController.startDrag(DragController.java:221) E/AndroidRuntime( 2913): at com.android.launcher3.Workspace.beginDragShared(Workspace.java:2966) E/AndroidRuntime( 2913): at com.android.launcher3.AppsCustomizePagedView.beginDraggingApplication(AppsCustomizePagedView.java:626) E/AndroidRuntime( 2913): at com.android.launcher3.AppsCustomizePagedView.beginDragging(AppsCustomizePagedView.java:842) E/AndroidRuntime( 2913): at com.android.launcher3.PagedViewWithDraggableItems.onLongClick(PagedViewWithDraggableItems.java:117) E/AndroidRuntime( 2913): at android.view.View.performLongClick(View.java:4828) E/AndroidRuntime( 2913): at android.widget.TextView.performLongClick(TextView.java:8687) E/AndroidRuntime( 2913): at com.android.launcher3.CheckLongPressHelper$CheckForLongPress.run(CheckLongPressHelper.java:30) E/AndroidRuntime( 2913): at android.os.Handler.handleCallback(Handler.java:739) E/AndroidRuntime( 2913): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 2913): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 2913): at android.app.ActivityThread.main(ActivityThread.java:5294) E/AndroidRuntime( 2913): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 2913): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 2913): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) E/AndroidRuntime( 2913): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) W/ActivityManager( 560): Force finishing activity 1 com.cyanogenmod.trebuchet/com.android.launcher3.Launcher I/OpenGLRenderer( 560): Initialized EGL, version 1.4 W/ActivityManager( 560): Activity pause timeout for ActivityRecord{1b194a23 u0 com.cyanogenmod.trebuchet/com.android.launcher3.Launcher t38 f} I/ActivityManager( 560): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.cyanogenmod.trebuchet/com.android.launcher3.Launcher} from uid 0 on display 0

    JIRA | 1 year ago | OldNightlyBug
    java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.View.getAlpha()' on a null object reference
  2. 0

    When I try to add an icon to the home screen, trebuchet crashes. Here is the adb log: D/AndroidRuntime( 2913): Shutting down VM E/AndroidRuntime( 2913): FATAL EXCEPTION: main E/AndroidRuntime( 2913): Process: com.cyanogenmod.trebuchet, PID: 2913 E/AndroidRuntime( 2913): java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.View.getAlpha()' on a null object reference E/AndroidRuntime( 2913): at com.android.launcher3.SearchDropTargetBar.onDragStart(SearchDropTargetBar.java:212) E/AndroidRuntime( 2913): at com.android.launcher3.DragController.startDrag(DragController.java:221) E/AndroidRuntime( 2913): at com.android.launcher3.Workspace.beginDragShared(Workspace.java:2966) E/AndroidRuntime( 2913): at com.android.launcher3.AppsCustomizePagedView.beginDraggingApplication(AppsCustomizePagedView.java:626) E/AndroidRuntime( 2913): at com.android.launcher3.AppsCustomizePagedView.beginDragging(AppsCustomizePagedView.java:842) E/AndroidRuntime( 2913): at com.android.launcher3.PagedViewWithDraggableItems.onLongClick(PagedViewWithDraggableItems.java:117) E/AndroidRuntime( 2913): at android.view.View.performLongClick(View.java:4828) E/AndroidRuntime( 2913): at android.widget.TextView.performLongClick(TextView.java:8687) E/AndroidRuntime( 2913): at com.android.launcher3.CheckLongPressHelper$CheckForLongPress.run(CheckLongPressHelper.java:30) E/AndroidRuntime( 2913): at android.os.Handler.handleCallback(Handler.java:739) E/AndroidRuntime( 2913): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 2913): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 2913): at android.app.ActivityThread.main(ActivityThread.java:5294) E/AndroidRuntime( 2913): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 2913): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 2913): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) E/AndroidRuntime( 2913): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) W/ActivityManager( 560): Force finishing activity 1 com.cyanogenmod.trebuchet/com.android.launcher3.Launcher I/OpenGLRenderer( 560): Initialized EGL, version 1.4 W/ActivityManager( 560): Activity pause timeout for ActivityRecord{1b194a23 u0 com.cyanogenmod.trebuchet/com.android.launcher3.Launcher t38 f} I/ActivityManager( 560): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.cyanogenmod.trebuchet/com.android.launcher3.Launcher} from uid 0 on display 0

    JIRA | 1 year ago | OldNightlyBug
    java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.View.getAlpha()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'float android.view.View.getAlpha()' on a null object reference

      at com.android.launcher3.SearchDropTargetBar.onDragStart()
    2. com.android.launcher3
      PagedViewWithDraggableItems.onLongClick
      1. com.android.launcher3.SearchDropTargetBar.onDragStart(SearchDropTargetBar.java:212)
      2. com.android.launcher3.DragController.startDrag(DragController.java:221)
      3. com.android.launcher3.Workspace.beginDragShared(Workspace.java:2966)
      4. com.android.launcher3.AppsCustomizePagedView.beginDraggingApplication(AppsCustomizePagedView.java:626)
      5. com.android.launcher3.AppsCustomizePagedView.beginDragging(AppsCustomizePagedView.java:842)
      6. com.android.launcher3.PagedViewWithDraggableItems.onLongClick(PagedViewWithDraggableItems.java:117)
      6 frames
    3. Android Platform
      TextView.performLongClick
      1. android.view.View.performLongClick(View.java:4828)
      2. android.widget.TextView.performLongClick(TextView.java:8687)
      2 frames
    4. com.android.launcher3
      CheckLongPressHelper$CheckForLongPress.run
      1. com.android.launcher3.CheckLongPressHelper$CheckForLongPress.run(CheckLongPressHelper.java:30)
      1 frame
    5. Android Platform
      ActivityThread.main
      1. android.os.Handler.handleCallback(Handler.java:739)
      2. android.os.Handler.dispatchMessage(Handler.java:95)
      3. android.os.Looper.loop(Looper.java:135)
      4. android.app.ActivityThread.main(ActivityThread.java:5294)
      4 frames
    6. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    7. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
      2 frames