Bug 41511 - XF2.2 Animation Failures: java.lang.reflectAttempt to read from field 'int android.view.View.mViewFlags' on a null object reference
Summary: XF2.2 Animation Failures: java.lang.reflectAttempt to read from field 'int an...
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.2.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: E.Z. Hart [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-06-04 20:09 UTC by aed
Modified: 2017-06-19 18:41 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: Yes
Last known good build: XF2.1

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description aed 2016-06-04 20:09:46 UTC
This error started happening in XF2.2

From a quick google search it is due to animations.

The suggested fix is is to update the Local Maven repositories for support libraries used when building Xamarin.Forms.Droid to v32 or above. This can be done in the Android SDK manager.


Can we get that done?

Solution: https://code.google.com/p/android/issues/detail?id=203546


Full stack trace below:

java.lang.NullPointerException: Attempt to read from field 'int android.view.View.mViewFlags' on a null object reference
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3404)
	at android.view.View.updateDisplayListIfDirty(View.java:15264)
	at android.view.View.draw(View.java:16043)
	at android.view.ViewGroup.drawChild(ViewGroup.java:3615)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3405)
	at android.view.View.updateDisplayListIfDirty(View.java:15264)
	at android.view.View.draw(View.java:16043)
	at android.view.ViewGroup.drawChild(ViewGroup.java:3615)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3405)
	at android.view.View.draw(View.java:16276)
	at android.view.View.updateDisplayListIfDirty(View.java:15269)
	at android.view.View.draw(View.java:16043)
	at android.view.ViewGroup.drawChild(ViewGroup.java:3615)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3405)
	at android.view.View.draw(View.java:16276)
	at android.view.View.updateDisplayListIfDirty(View.java:15269)
	at android.view.View.draw(View.java:16043)
	at android.view.ViewGroup.drawChild(ViewGroup.java:3615)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3405)
	at android.view.View.updateDisplayListIfDirty(View.java:15264)
	at android.view.View.draw(View.java:16043)
	at android.view.ViewGroup.drawChild(ViewGroup.java:3615)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3405)
	at android.view.View.updateDisplayListIfDirty(View.java:15264)
	at android.view.View.draw(View.java:16043)
	at android.view.ViewGroup.drawChild(ViewGroup.java:3615)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3405)
	at android.view.View.updateDisplayListIfDirty(View.java:15264)
	at android.view.View.draw(View.java:16043)
	at android.view.ViewGroup.drawChild(ViewGroup.java:3615)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3405)
	at android.view.View.updateDisplayListIfDirty(View.java:15264)
	at android.view.View.draw(View.java:16043)
	at android.view.ViewGroup.drawChild(ViewGroup.java:3615)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3405)
	at android.view.View.updateDisplayListIfDirty(View.java:15264)
	at android.view.View.draw(View.java:16043)
	at android.view.ViewGroup.drawChild(ViewGroup.java:3615)
	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3405)
	at android.view.View.draw(View.java:16276)
	at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:2740)
	at android.view.View.updateDisplayListIfDirty(View.java:15269)
	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:295)
	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:301)
	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:336)
	at android.view.ViewRootImpl.draw(ViewRootImpl.java:2760)
	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2564)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2164)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1174)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6241)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:873)
	at android.view.Choreographer.doCallbacks(Choreographer.java:676)
	at android.view.Choreographer.doFrame(Choreographer.java:606)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:859)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:168)
	at android.app.ActivityThread.main(ActivityThread.java:5845)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
Comment 1 E.Z. Hart [MSFT] 2016-06-06 18:20:48 UTC
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue, we would very much appreciate it. 

For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team
Comment 2 aed 2016-06-06 18:33:55 UTC
Can you please first comment on what version of the Android Local Maven Repositories are used in the XF2.2 build?

The bug is very difficult to repro consistently but our app looks like Tinder. After a few swipes, it crashes. I can build a stripped down repro but it will take a long time, and since the fix for this is already discussed in the Google support forums, I'd rather hear from you first.

The link contains an Android based repro: https://code.google.com/p/android/issues/detail?id=203546
Comment 3 E.Z. Hart [MSFT] 2016-06-07 17:22:05 UTC
Which versions of the support libraries are you using in your project? Which nuget package versions do you have installed for the following:

Xamarin.Android.Support.v4 
Xamarin.Android.Support.Design 
Xamarin.Android.Support.v7.AppCompat
Xamarin.Android.Support.v7.CardView 
Xamarin.Android.Support.v7.MediaRouter
Comment 4 aed 2016-06-08 03:29:27 UTC
I just updated to XF2.3.0.46-pre3 and moved Xamarin Studio to the beta channel. The problem persists.

The nugets are all 23.3.0

Android support library, as seen in Android SDK manager, is 23.2.1.
Comment 5 Rui Marinho 2016-08-11 10:45:28 UTC
Can you try with latest stable of Xamarin Studio and XamarinForms 2.3.1 ?
Comment 6 Samantha Houts [MSFT] 2017-06-19 18:41:15 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!