Bug 23883 - Inheriting from UITextView crash at runtime on ios8
Summary: Inheriting from UITextView crash at runtime on ios8
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.2.0
Hardware: PC Windows
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-10-16 15:52 UTC by softlion
Modified: 2016-05-26 00:05 UTC (History)
4 users (show)

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:

Description softlion 2014-10-16 15:52:28 UTC
    public class UIPlaceholderTextView : UITextView
        public string Placeholder { get; set; }

        public UIPlaceholderTextView()

        public UIPlaceholderTextView(IntPtr handle) : base(handle)

Using this UIPlaceholderTextView will crash the app after typing the first character in it, on ios8 simulator (iphone 4s / iOS 88).
The same app/code using UITextView instead of UIPlaceholderTextView works fine on the same simulator.

This UIPlaceholderTextView seems to work fine on ios 7 except when implementing events, then it also crashes.

It used to work fine on ios 7/8 with previous versions of Xamarin.

xamarin VS: (latest in beta channel)
mac host: (latest in beta channel)
xcode: 6.0.1
Comment 1 softlion 2014-10-16 16:03:43 UTC
Disabling the "reference counting extension preview" fixed the problem.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-10-17 04:20:35 UTC
Could you attach your project where this happens and any crash reports/application output?
Comment 3 softlion 2014-10-17 04:28:15 UTC
crash report contains 2 lines 0xfff, not meaningful ...

The project is too big to be disclosed.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2014-10-20 05:24:10 UTC
I tried modifying our TextKitDemo [1] [2] sample to use a UITextView subclass, but it doesn't crash.

We'll need a way to reproduce this in order to track it down and fix it.

[1] https://github.com/xamarin/monotouch-samples/tree/master/TextKitDemo
[2] https://gist.github.com/rolfbjarne/d7c3f3eb88c016dbe21d
Comment 5 softlion 2014-10-20 06:16:27 UTC
I'll create a sample project.
Comment 6 Sebastien Pouliot 2016-05-26 00:05:48 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!