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.
Created attachment 751 [details]
Class marked serializable that causes serializer to fail
Description of Problem:
Attempt to xml serialize class (ExpenseData class code attached) in MonoTouch on device fails. Works fine in simulator and when LLVM compile option used on device.
Set build to Link SDK assemblies only.
Steps to reproduce the problem:
1. attempt to create xmlserializer for ExpenseData class, e.g. XmlSerializer xs = new XmlSerializer(typeof(ExpenseData))
Get *System.NullReference* exception in
No exception, instance of XmlSerializer should be created for the type with no error.
How often does this happen?
Always (certainly since iOS 5 / MT 5.0)
> Works fine in simulator and when LLVM compile option used on device.
from your original mail I understand it **fails** when used on device with LLVM, right ?
I cannot duplicate the issue. It's either because:
a) I had to remove a lot of code from your attachment to make it compile locally; or
b) the (not-yet-released) changes I made to the linker to better support xml serialization.
Now I hope this is 'b' ;-) and I'll test the same test case I've made (from your code) in an earlier version of MonoTouch (to see if it works or if I can duplicate your issue).
However that won't tell me if we're hitting case 'a'. To be 100% sure could you:
a) set your simulator build to use "Link SDK assemblies only", rebuild and test
b) set your device build to "Don't link", rebuild and test
and report your results here. Thanks!
Was trying to reproduce myself on 2011-10-22, but unable to. Might be worth putting this issue on HOLD for a while to see if reproduceable. Had the issue for a whole development session (maybe 4-6 hours) whereby serialization failed with exception quoted in the bug. After shutting down and trying to reproduce the following day (without any code changes in between) - unable to produce.
np, I'll leave this bug as NEEDINFO until you can reproduce the issue or close it
Hello Steve, have you been able to reproduce this in the last month ? or should we close the bug (it can be re-opened later if you ever hit the issue again). Thanks.
Closing. Please re-open if you can duplicate this again.