mail-archives/monodroid/2012-November/012800.html

96 строки
4.1 KiB
HTML
Исходник Постоянная ссылка Обычный вид История

2019-06-06 22:06:39 +03:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE> [mono-android] InvalidCastException in release mode
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=Re%3A%20%5Bmono-android%5D%20InvalidCastException%20in%20release%20mode&In-Reply-To=%3CE3C3E5C1DB20E040A23772BAB822E3646CDA995C%40mail-west-2.exchange2.ara.wan%3E">
<META NAME="robots" CONTENT="index,nofollow">
<style type="text/css">
pre {
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
}
</style>
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="012799.html">
<LINK REL="Next" HREF="012798.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[mono-android] InvalidCastException in release mode</H1>
<B>Jeremy A. Kolb - ARA/NED</B>
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=Re%3A%20%5Bmono-android%5D%20InvalidCastException%20in%20release%20mode&In-Reply-To=%3CE3C3E5C1DB20E040A23772BAB822E3646CDA995C%40mail-west-2.exchange2.ara.wan%3E"
TITLE="[mono-android] InvalidCastException in release mode">jkolb at ara.com
</A><BR>
<I>Fri Nov 9 16:41:01 UTC 2012</I>
<P><UL>
<LI>Previous message: <A HREF="012799.html">[mono-android] InvalidCastException in release mode
</A></li>
<LI>Next message: <A HREF="012798.html">[mono-android] ListView Item click color
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#12800">[ date ]</a>
<a href="thread.html#12800">[ thread ]</a>
<a href="subject.html#12800">[ subject ]</a>
<a href="author.html#12800">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Yep: <A HREF="https://bugzilla.xamarin.com/show_bug.cgi?id=8313">https://bugzilla.xamarin.com/show_bug.cgi?id=8313</A>
If I remove linking then it works. JavaCast seems to get around it but there are a lot of places I need to put that.
-----Original Message-----
From: <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">monodroid-bounces at lists.ximian.com</A> [mailto:<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">monodroid-bounces at lists.ximian.com</A>] On Behalf Of Jonathan Pryor
Sent: Friday, November 09, 2012 10:45 AM
To: Discussions related to Mono for Android
Subject: Re: [mono-android] InvalidCastException in release mode
On Nov 8, 2012, at 3:48 PM, Jeremy A. Kolb - ARA/NED &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">jkolb at ara.com</A>&gt; wrote:
&gt;<i> I'm seeing this exception in release mode only. I have a fragment that implements LoaderManager.ILoaderCallbacks:
</I>...
&gt;<i> In release mode the cast to ICursor fails even though it is a CursorWrapper. I'm not sure why it happens in release but not debug.
</I>
That is very odd; sounds like it could be a linker bug. Would it be possible for you to file a bug about this?
As a workaround, does `data.JavaCast&lt;ICursor&gt;()` work instead of `(ICursor)data`?
Thanks,
- Jon
_______________________________________________
Monodroid mailing list
<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">Monodroid at lists.ximian.com</A>
UNSUBSCRIBE INFORMATION:
<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">http://lists.ximian.com/mailman/listinfo/monodroid</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="012799.html">[mono-android] InvalidCastException in release mode
</A></li>
<LI>Next message: <A HREF="012798.html">[mono-android] ListView Item click color
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#12800">[ date ]</a>
<a href="thread.html#12800">[ thread ]</a>
<a href="subject.html#12800">[ subject ]</a>
<a href="author.html#12800">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
mailing list</a><br>
</body></html>