Bug 22293 - NSWindow warning: adding an unknown subview [OS X 10.10 Yosemite]
Summary: NSWindow warning: adding an unknown subview [OS X 10.10 Yosemite]
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 1.10.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Chris Hamons
Depends on:
Reported: 2014-08-22 11:03 UTC by Allie Miller
Modified: 2014-11-24 10:39 UTC (History)
3 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 Allie Miller 2014-08-22 11:03:04 UTC
After updating to OS X 10.10 Yosemite, the attached test project crashes with the message: "TestSuperview NSWindow warning: adding an unknown subview: NSView: 0x73b0b80" only when the Linker is enabled.

*Steps to reproduce*
1) Deploy attached project on a Mac running OS X Yosemite, Xcode 6.0. Configure the Linker setting to be "Don't Link"
2) Observe that the project deploys without the crash.
3) Stop the previous deployment and change the linker setting to anything other than "Don't Link"
4) Deploy the application again.

*Expected Results*
The application deploys successfully without a crash as observed in step 2.

*Actual Results*
The application crashes with the message in the Overview section.

*Additional Information*
This behavior does not occur for users running OS X Mavericks and the current stable Xcode version (5.1.1).  Logs from Xamarin Studio will be included at a later time.

*Versioning Information*
=== Xamarin Studio ===

Version 5.3 (build 427)
Installation UUID: 1f83fb51-2207-4884-aef7-c978185b7482
 Mono 3.8.0 ((no/62a857e)
 GTK+ 2.24.23 (Raleigh theme)

 Package version: 308000007

=== Apple Developer Tools ===

Xcode 6.0 (6194.24)
Build 6A216f

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 63b403b
Build date: 2014-08-19 16:20:25-0400

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: /Users/anhkhoanguyen/Library/Developer/Xamarin/android-sdk-mac_x86
 Supported Android versions:
  2.1   (API level 7)
  2.2   (API level 8)
  2.3   (API level 10)
  3.1   (API level 12)
  4.0   (API level 14)
  4.0.3 (API level 15)
  4.4   (API level 19)
Java SDK: /usr
No Java runtime present, requesting install.

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 503000427
Git revision: b731d769195292820b25b6f9621a7a9decb3fff6
Build date: 2014-08-14 03:26:41-04
Xamarin addins: aaf33dfafebf0d688f6e1a1eb58bced21de89a1d

=== Operating System ===

Mac OS X 10.10.0
Darwin XXX-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Sat Aug  9 00:14:02 PDT 2014
    root:xnu-2782.1.80~2/RELEASE_X86_64 x86_64
Comment 2 Allie Miller 2014-08-22 11:26:10 UTC
Amendment to the report: the application *does not crash*. Instead, the error appears in the console output in red. 

Apologies for any confusion!
Comment 3 Mohit Kheterpal 2014-08-26 12:20:50 UTC
I have try to reproduce this issue on Yosomite machine 10.10 and I am getting error as shown in screencast : http://www.screencast.com/t/DNIx3qdzaXD

Application output : https://gist.github.com/saurabh360/eb14d9274a3b17108239
Comment 4 Philippe Creytens 2014-11-24 10:12:19 UTC
Is there more information available about an eventual fix regarding this issue?

Kind regards,
Comment 5 Chris Hamons 2014-11-24 10:17:22 UTC
@Philippe - Is there a reason you are doing:

			ContentView.Superview.AddSubview (view);

instead of the standard:

			ContentView.AddSubview (view);

The later makes the sample work for me.
Comment 6 Philippe Creytens 2014-11-24 10:35:46 UTC
Oh yes! This was apparently the issue, we used Superview for the contenview instead of ContentView. Thanks for the quick reply
Comment 7 Chris Hamons 2014-11-24 10:39:38 UTC
Awesome. Sorry for the delay in response.

By the way, you appear to have have a business license for Xamarin.Mac. In the future, feel free to file support tickets at http://support.xamarin.com if you run into problems. We often have much fast turn around time there.