Bug 5998 - VM crashes after setting ListAdapter
Summary: VM crashes after setting ListAdapter
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.2.x
Hardware: PC Windows
: Lowest normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-07-06 07:23 UTC by André Ingar Sørensen
Modified: 2013-12-05 18:34 UTC (History)
2 users (show)

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

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 André Ingar Sørensen 2012-07-06 07:23:11 UTC
Created a simple FileDialog activity, which extends the ListActivity. When I assign a SimpleAdapter to the ListAdapter property the VM crashes saying that it cannot cast a mono.android.runtime.JavaObject to java.util.Map.
It's thrown after OnCreate is done according to the log.

Log:

07-06 11:08:34.945 D/FileDialogActivity( 1484): Left OnCreate
07-06 11:08:34.955 D/AndroidRuntime( 1484): Shutting down VM
07-06 11:08:34.955 W/dalvikvm( 1484): threadid=1: thread exiting with uncaught exception (group=0xb41b7180)
07-06 11:08:34.985 D/dalvikvm( 1484): GC_CONCURRENT freed 118K, 3% free 9626K/9863K, paused 0ms+0ms
07-06 11:08:34.985 E/AndroidRuntime( 1484): FATAL EXCEPTION: main
07-06 11:08:34.985 E/AndroidRuntime( 1484): java.lang.ClassCastException: mono.android.runtime.JavaObject cannot be cast to java.util.Map
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.SimpleAdapter.bindView(SimpleAdapter.java:147)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.SimpleAdapter.createViewFromResource(SimpleAdapter.java:126)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.SimpleAdapter.getView(SimpleAdapter.java:114)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.AbsListView.obtainView(AbsListView.java:2033)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.ListView.makeAndAddView(ListView.java:1772)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.ListView.fillDown(ListView.java:672)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.ListView.fillFromTop(ListView.java:732)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.ListView.layoutChildren(ListView.java:1625)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.AbsListView.onLayout(AbsListView.java:1863)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:925)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.View.layout(View.java:11278)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewGroup.layout(ViewGroup.java:4224)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1489)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.os.Handler.dispatchMessage(Handler.java:99)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.os.Looper.loop(Looper.java:137)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at android.app.ActivityThread.main(ActivityThread.java:4424)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at java.lang.reflect.Method.invokeNative(Native Method)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at java.lang.reflect.Method.invoke(Method.java:511)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-06 11:08:34.985 E/AndroidRuntime( 1484): 	at dalvik.system.NativeStart.main(Native Method)
07-06 11:08:35.005 D/dalvikvm(  891): GC_CONCURRENT freed 459K, 12% free 11347K/12807K, paused 0ms+0ms
Comment 1 Jonathan Pryor 2013-05-22 14:39:56 UTC
More readable stack trace:

> 07-06 11:08:34.945 D/FileDialogActivity( 1484): Left OnCreate
> 07-06 11:08:34.955 D/AndroidRuntime( 1484): Shutting down VM
> 07-06 11:08:34.955 W/dalvikvm( 1484): threadid=1: thread exiting with uncaught
> exception (group=0xb41b7180)
> 07-06 11:08:34.985 D/dalvikvm( 1484): GC_CONCURRENT freed 118K, 3% free
> 9626K/9863K, paused 0ms+0ms
> 07-06 11:08:34.985 E/AndroidRuntime( 1484): FATAL EXCEPTION: main
> 07-06 11:08:34.985 E/AndroidRuntime( 1484): java.lang.ClassCastException:
> mono.android.runtime.JavaObject cannot be cast to java.util.Map
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.SimpleAdapter.bindView(SimpleAdapter.java:147)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.SimpleAdapter.createViewFromResource(SimpleAdapter.java:126)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.SimpleAdapter.getView(SimpleAdapter.java:114)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.AbsListView.obtainView(AbsListView.java:2033)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.ListView.makeAndAddView(ListView.java:1772)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.ListView.fillDown(ListView.java:672)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.ListView.fillFromTop(ListView.java:732)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.ListView.layoutChildren(ListView.java:1625)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.AbsListView.onLayout(AbsListView.java:1863)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.RelativeLayout.onLayout(RelativeLayout.java:925)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.View.layout(View.java:11278)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewGroup.layout(ViewGroup.java:4224)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1489)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.os.Handler.dispatchMessage(Handler.java:99)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.os.Looper.loop(Looper.java:137)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at android.app.ActivityThread.main(ActivityThread.java:4424)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at java.lang.reflect.Method.invokeNative(Native Method)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at java.lang.reflect.Method.invoke(Method.java:511)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
> 07-06 11:08:34.985 E/AndroidRuntime( 1484):     at dalvik.system.NativeStart.main(Native Method)
> 07-06 11:08:35.005 D/dalvikvm(  891): GC_CONCURRENT freed 459K, 12% free
> 11347K/12807K, paused 0ms+0ms
Comment 2 Jonathan Pryor 2013-05-22 14:40:56 UTC
Please provide a reproducible test case.
Comment 3 PJ 2013-11-19 17:04:29 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 4 PJ 2013-12-05 18:34:33 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.