Bug 41888 - App crashes when calling PushAsync from ListView context action
Summary: App crashes when calling PushAsync from ListView context action
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-06-16 11:52 UTC by Serge
Modified: 2016-10-22 01:19 UTC (History)
4 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

Sample to reproduce (1.76 MB, application/x-zip-compressed)
2016-06-16 11:52 UTC, Serge

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 for Bug 41888 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Serge 2016-06-16 11:52:16 UTC
Created attachment 16361 [details]
Sample to reproduce

App crashes only if ListItem has more than one context action. With one context action app works without crash.

Stack trace:
E/AndroidRuntime( 7014): java.lang.ClassCastException: android.support.v7.view.menu.ActionMenuItemView cannot be cast to android.view.ViewGroup
E/AndroidRuntime( 7014):        at android.support.v4.app.BackStackRecord.configureTransitions(BackStackRecord.java:1165)
E/AndroidRuntime( 7014):        at android.support.v4.app.BackStackRecord.beginTransition(BackStackRecord.java:1048)
E/AndroidRuntime( 7014):        at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:662)
E/AndroidRuntime( 7014):        at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
E/AndroidRuntime( 7014):        at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
E/AndroidRuntime( 7014):        at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime( 7014):        at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 7014):        at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 7014):        at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime( 7014):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 7014):        at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 7014):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime( 7014):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
W/ActivityManager(  437):   Force finishing activity 1 Droid.Droid/md5cd196a6425dce1b049cfb656151f604f.MainActivity

Steps to reproduce:
1. run sample in attachement
2. long tap on list item
3. click any of context actions
Comment 1 adrianknight89 2016-10-22 01:19:52 UTC
I don't see this issue in master as of commit 412, so I assume the next release will fix this. Note that I tested it in a PCL not Shared project.