You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our app is crashing on large devices (tablets and foldable) with the following stack trace:
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.setVisibility(int)' on a null object reference
at com.wootric.androidsdk.views.SurveyFragment.onCreateView (SurveyFragment.java:161)
at android.app.Fragment.performCreateView (Fragment.java:2505)
at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1303)
at android.app.FragmentManagerImpl.addAddedFragments (FragmentManager.java:2463)
at android.app.FragmentManagerImpl.executeOpsTogether (FragmentManager.java:2234)
at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute (FragmentManager.java:2190)
at android.app.FragmentManagerImpl.execPendingActions (FragmentManager.java:2091)
at android.app.FragmentManagerImpl$1.run (FragmentManager.java:742)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:223)
at android.app.ActivityThread.main (ActivityThread.java:7943)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:603)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:947)
The crash happens as soon as the survey is started.
Inspecting the stack trace and your code it seems that the SurveyFragment is expecting the LinearLayout with id
In the layout/wootric_footer.xml:36 it's present: <LinearLayout android:id="@+id/wootric_powered_by" ...
While in the same file for large devices layout-sw600dp/wootric_footer.xml:10 the same layout has a different id: <LinearLayout android:id="@+id/wootric_layout_powered_by" ...
Which then causes this code in the SurveyFragment.java:148 to return null and later cause a NPE. mPoweredBy = (LinearLayout) view.findViewById(R.id.wootric_powered_by);
Note that wootric_layout_powered_by is being used in SurveyLayoutTablet.java:261, so it can't simply be removed. mPoweredByLayout = (LinearLayout) findViewById(R.id.wootric_layout_powered_by);
Our app is crashing on large devices (tablets and foldable) with the following stack trace:
The crash happens as soon as the survey is started.
We configure Wootric in the following way:
The text was updated successfully, but these errors were encountered: