Bug 59623 - Can not open Storyboard
Summary: Can not open Storyboard
Status: NEEDINFO
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS Designer (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-20 18:57 UTC by andre.karner
Modified: 2017-10-10 06:44 UTC (History)
10 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
VS2017 Log File (2.97 MB, text/plain)
2017-09-25 14:13 UTC, Maxi Medero
Details
Logfile (1.52 MB, application/octet-stream)
2017-10-03 17:54 UTC, andre.karner
Details

Description andre.karner 2017-09-20 18:57:30 UTC
Error occurs on Visual Studio for Mac and Xamarin Studio as well!

When opening Storyboard following error message appears:

System.NullReferenceException: Object reference not set to an instance of an object
  at MonoTouch.Design.Client.IPhoneDesignerSession+<MaybeConvertToLatestXcode>c__async5.MoveNext () [0x0004c] in /Users/builder/data/lanes/4470/6c2f6737/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:774 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
  at MonoTouch.Design.Client.IPhoneDesignerSession+<ReloadItemsAsync>c__async2.MoveNext () [0x00134] in /Users/builder/data/lanes/4470/6c2f6737/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:514 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at MonoTouch.Design.Tasks+<Cancellable>c__async1.MoveNext () [0x00032] in /Users/builder/data/lanes/4470/6c2f6737/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/TaskExtensions.cs:28 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at MonoTouch.Design.Client.IPhoneDesignerSession+<ReloadItems>c__async1.MoveNext () [0x00074] in /Users/builder/data/lanes/4470/6c2f6737/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:484 

Contents of /Users/Andre/Library/Logs/XamarinStudio-6.0/iOSDesigner.2017-09-20__20-44-50.log:
MDAddinsHash: d8d46e577d8507c35260ce9d73df3c33415bb214

[2017-09-20 20:45:04.0] INFO: Starting full reload...
[2017-09-20 20:45:05.4] INFO: Starting full reload...



My Xamarin Studio Details:

Xamarin Studio Community
Version 6.3 (build 864)
Installation UUID: cb7435c6-f261-4eac-b337-8532d9addba0
Runtime:
	Mono 5.2.0.224 (d15-3/14f2c81) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000224

NuGet
Version: 3.5.0.0

Xamarin.Profiler
Version: 1.5.5
Speicherort: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 9.0 (13247)
Build 9A235

Xamarin.iOS
Version: 11.0.0.0 (Xamarin Studio Community)
Hash: 152b654a
Branch: xcode9
Build date: 2017-09-15 02:25:56-0400

Xamarin.Android
Version: 7.4.5.1 (Xamarin Studio Community)
Android SDK: Nicht gefunden

Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

Xamarin Inspector
Version: 1.3.0
Hash: 8c298a5
Branch: 1.3-release
Build date: Thu, 14 Sep 2017 21:21:26 GMT
Client compatibility: 1

Build Information
Release ID: 603000864
Git revision: 6c2f6737278ccc3e81e12276d49c0d92f975f189
Build date: 2017-04-24 11:26:01-04
Xamarin addins: d8d46e577d8507c35260ce9d73df3c33415bb214
Build lane: monodevelop-lion-d15-1

Operating System
Mac OS X 10.12.6
Darwin Macbooks-MacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 1 John Miller [MSFT] 2017-09-20 19:33:05 UTC
Hi Andre,

This is most likely because you are using Xamarin Studio 6.3. For compatibility with Xcode 9 and Xamarin.iOS you will have to migrate to Visual Studio for Mac 7.1.5.2. Please let me know if that resolves the issue!
Comment 2 andre.karner 2017-09-20 20:27:05 UTC
Hi John! 

Actually this error occured first on Visual for Studio Mac. Xamarin Studio was the second option which I have tried ...
Comment 3 John Miller [MSFT] 2017-09-21 15:31:58 UTC
Hi Andre,

Interesting! Please switch back to VS for Mac and make sure it's the latest Stable version (not a beta or alpha) by using the Stable Channel in the updater. Then, when you get the same error, please upload and attach the full zip of the logs from Help > Open Logs. Thanks!
Comment 4 Sid Dubey 2017-09-25 13:19:43 UTC
Same issue reported by another customer. Here is the version info for IDE 
==========================================================================

=== Visual Studio Community 2017 for Mac ===

Version 7.1.5 (build 2)
Installation UUID: 4d54e0c8-92f8-4d51-8502-443a648ad91e
Runtime:
                Mono 5.2.0.224 (d15-3/14f2c81) (64-bit)
                GTK+ 2.24.23 (Raleigh theme)

                Package version: 502000224

=== NuGet ===

Version: 4.3.0.2418

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
                1.1.1
                1.0.4
SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks
SDK Version: 1.0.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.iOS ===

Version: 11.0.0.0 (Visual Studio Community)
Hash: 152b654a
Branch: xcode9
Build date: 2017-09-15 02:25:56-0400

=== Xamarin.Android ===

Version: 7.4.5.1 (Visual Studio Community)
Android SDK: /Users/mmedero/Library/Developer/Xamarin/android-sdk-macosx
                Supported Android versions:
                               6.0 (API level 23)
                               7.0 (API level 24)
                               7.1 (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 25.0.1

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 3.6.3.3 (Visual Studio Community)

=== Xamarin Inspector ===

Version: 1.3.1
Hash: cbc48dd
Branch: 1.3-release
Build date: Thu, 21 Sep 2017 19:52:53 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 701050002
Git revision: 7afedcaef8e7542e70e3cf8f9bdb26938b8c0876
Build date: 2017-09-15 08:39:58-04
Xamarin addins: 3262aadf811a18c12eac6742532d052b0139a808
Build lane: monodevelop-lion-d15-3-xcode9

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 5 Maxi Medero 2017-09-25 14:13:30 UTC
Created attachment 24916 [details]
VS2017 Log File

I`m attaching file log generated when open Xamarin.iOS solution on latest build of VS2017 for Mac.
Comment 6 andre.karner 2017-09-27 14:56:43 UTC
Somehow it is working now .. but now I am getting an another error in the Storyboard Designer: https://imgur.com/T274bvT

The main-view of the view-controller just disappears and the red exclamation icon in the right bottom corner appears. 

What I am doing wrong? It is really annoying ..

Kind regards,

Andre
Comment 7 John Miller [MSFT] 2017-09-28 17:57:32 UTC
Hi Andre,

I am not sure what is happening there. Can you attach the logs after this happens and if you can share the storyboard that causes this, that might help to. 

Note* You can mark attachments as private for Xamarin team members only.
Comment 8 Vahid Kowsari 2017-10-02 06:30:29 UTC
I have the same problem with almost every XIB file. Just using XIB files and not storyboards. I am using Xamarin Studio and XCode 9 on High Sierra. I tried stable, beta and alpha channels with the same result.

Can you tell me what log files I can upload? 

I need to get my system to be able to open files and continue working on my project.

Thanks
Comment 9 Vahid Kowsari 2017-10-02 06:41:18 UTC
What is interesting is that it work with Visual Studio on the Mac for me.
Comment 10 Alan McGovern 2017-10-02 08:40:38 UTC
Sid, If someone is reporting the same issue as comment 1 then they need to update their Visual Studio/Visual Studio Mac. If they are actually on the latest then they should file another bug with the logs as they cannot be experiencing the exact same issue! It will let us appropriately deal with the issue.


Maxi, your issue is different. It's caused by your code throwing exceptions when `ViewDidLoad` is asynchronously invoked by iOS:

> System.NullReferenceException: Object reference not set to an instance of an object
>   at PampaEnergia.Copo.PartesDiarios.iOS.ViewControllers.WorkoverViewController.ViewDidAppear (System.Boolean animated) [0x0000d] in <709b1fa2e55a4445b77b139f7ca33e0b>:0 
> --- End of stack trace from previous location where exception was thrown ---

The fix here is to adjust the code to not crash inside ViewDidAppear when rendering in a design time context. We're actively looking into ways of making this experience better. If you have further issues please file a new bug so we can deal with the problem appropriately.


Andre, if you are still experiencing issues can you attach logs from the new build?

Vahid, can you file a new issue and include the logs from your system? There are too many unrelated issues being referenced on this bug report so it will fast become confusing if we attempt to deal with them all here.

Thanks!
Comment 11 Maxi Medero 2017-10-03 14:02:23 UTC
Thanks Alan, we'll work on this solution and try to work with Xcode 9 again. If it crashes again I'll open a new bug as you suggest.
Kinds regards
Comment 12 andre.karner 2017-10-03 17:54:42 UTC
Created attachment 25081 [details]
Logfile

Log files and image of error included in archive!
Comment 13 andre.karner 2017-10-10 06:44:12 UTC
I think I know where the problem is located ..

Somehow, if I comment the code in "ViewDidLoad" method out, clean the solution and rebuild it - the designer shows now errors?

How to fix this? The code in "ViewDidLoad" method works fine at runtime?

 /*this.NavigationController.NavigationBar.Translucent = false;

            this.InitTray();
            this.InitMainView();*/

InitTray() is adding some views as InitMainView does.

Regards,

Note You need to log in before you can comment on or make changes to this bug.