Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I'm no expert on the architecture of Xamarin.ios or Xamarin studio so forgive me is this is explained in simplistic terms.
A more detailed description of the conditions of this bug can be found in the following forum post - the exception information is also there:
I tried implementing a UICollectionView (inside a NavigationController), but had a few issues, so I went back and tried the tutorial on the xamarin site. I ran a cut down version of the tutorial code a few times on the iOS simulator and it worked as expected, but when I came to run it on the iPhone 4S it repeatedly crashed with the following exception:
System.InvalidCastException: Cannot cast from source type to destination type.
On one occasion it even caused the phone to spontaneously reboot. I thought it must be my code, but when I ran it from Xamarin Studio with "Run > Start Without Debugging" it ran ok on the phone and didn't crash at all (tried launching it several times to make sure), which made me wonder if it's a problem with the debugger or something else.
I don't know which version number you want in the "version" box, so here is the full content of the About window:
=== Xamarin Studio ===
Version 4.0.10 (build 7)
Installation UUID: 886ad9db-dcd5-4d93-bb82-07c3ab70b3d3
Mono 3.2.0 ((no/7c7fcc7)
Package version: 302000000
=== Apple Developer Tools ===
Xcode 4.6.3 (2068)
=== Xamarin.Mac ===
Xamarin.Mac: Not Installed
=== Xamarin.Android ===
=== Xamarin.iOS ===
Version: 188.8.131.52 (Indie Edition)
Build date: 2013-18-07 21:36:03-0400
=== Build Information ===
Release ID: 400100007
Git revision: f324e2154ee86ae1b6b8483392eddbf418e6381b
Build date: 2013-07-20 06:23:58+0000
Xamarin addins: fe4f180e2386eafc00087ef68c3a580cff4a2592
=== Operating System ===
Mac OS X 10.7.5
Darwin MacPro.local 11.4.2 Darwin Kernel Version 11.4.2
Thu Aug 23 16:26:45 PDT 2012
Could you please attach your test project?
See bug with ID 14047 for attached sample.
Exact same problem. This is very frustrating since even the samples provided by Xamarin does not work on a physical device.
Rolf - sorry, seeing Morten's comment made me realize I'd forgotten to reply.
Unfortunately, the test project would be no use. By the time I saw your original response, I'd changed it completely. I didn't have it in a repository because it was just messing around with the example code from the xamarin website.
If it helps, after turning off the debugger, doing a couple of builds and then turning it on again, it seemed to fix the problem.
just tried with out debugging and it seems to work.
Here are the steps
1) Started with a "Clean solution"
2) Switched to Release Mode
3) Run --> Start without debugging
And it works....
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.
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.