My application worked fine in MT 3.0. Now when I upgraded. I am seeing errors when a button is in a ContentView. Crashes happen when the button is clicked. Code:
<
Not sure if this is the problem, but when I upgraded to 4.0, I also got some random crashes. It turned out that the 4.0 GC is more aggressive, and that things I was previously getting away with were no longer kosher.
In particular, if I had a event handler assigned to a button, I needed to be sure the button was declared at the class level. If it was declared locally in the method, the GC would purge the reference when it went out of scope, and then later when the event handler tried to fire, it's reference was no longer there.
So try moving the declaration of your button outside of your method.