Bug 47210 - CouldNotInitializeRendererException when opening a storyboard
Summary: CouldNotInitializeRendererException when opening a storyboard
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: XMA ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-11-17 17:52 UTC by Judy McNeil
Modified: 2016-12-27 21:35 UTC (History)
6 users (show)

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


Attachments
Log from iOS designer on Mac side (19.79 KB, text/plain)
2016-11-17 18:10 UTC, Judy McNeil
Details
MonoTouchDesign Crash (124.57 KB, text/plain)
2016-11-18 13:53 UTC, Judy McNeil
Details


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 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:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Judy McNeil 2016-11-17 17:52:09 UTC
Steps to reproduce: Update to the latest Stable
1. Open a new iOS Single View App in Visual Studio 2015
2. Open the Main Storyboard.

Mac side Designer Logs attached.

This is the error in the designer in VS:
MonoTouch.Design.Client.CouldNotInitializeRendererException: Could not initialize renderer
   at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(Action`1 send, Action`1 recv, Boolean throwIfNotRunning)
   at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning)
   at MonoTouch.Design.Client.ServerProcessConnection.CreateSession()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Contents of C:\Users\jumcn\AppData\Local\Xamarin\Logs\14.0\iOSDesigner-7080.2016-11-17__08-00-20.log:
MDAddinsHash: a39a869d8a78d87bdc6775f696c13a4cc9024501

[2016-11-17 08:04:15.0] INFO: Starting full reload...
[2016-11-17 08:04:15.0] INFO: Reloading: Serialization took 0ms
[2016-11-17 08:04:37.3] WARN: Failure #1 (IOException) while sending web request. Retrying..
[2016-11-17 08:04:37.3] INFO: Reloading: Serialization took 0ms
[2016-11-17 08:04:54.4] WARN: Failure #2 (IOException) while sending web request. Retrying..
[2016-11-17 08:04:54.4] INFO: Reloading: Serialization took 0ms
[2016-11-17 08:05:11.9] ERROR: Unrecoverable IOException.. Spin up attempts: 0, failure retries: 3
System.IO.EndOfStreamException: Could not deserialize the response ---> System.Runtime.Serialization.SerializationException: Attempting to deserialize an empty stream.
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
   at MonoTouch.Design.Client.ServerProcessConnection.<>c__DisplayClass33_0.<SendRequest>b__1(Stream s)
   --- End of inner exception stack trace ---
   at MonoTouch.Design.Client.ServerProcessConnection.<>c__DisplayClass33_0.<SendRequest>b__1(Stream s)
   at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(Action`1 send, Action`1 recv, Boolean throwIfNotRunning)
[2016-11-17 08:05:11.9] ERROR: EnsureSession (counter 1): System.AggregateException: One or more errors occurred. ---> MonoTouch.Design.Client.CouldNotInitializeRendererException: Could not initialize renderer
   at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(Action`1 send, Action`1 recv, Boolean throwIfNotRunning)
   at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning)
   at MonoTouch.Design.Client.ServerProcessConnection.CreateSession()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) MonoTouch.Design.Client.CouldNotInitializeRendererException: Could not initialize renderer
   at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(Action`1 send, Action`1 recv, Boolean throwIfNotRunning)
   at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning)
   at MonoTouch.Design.Client.ServerProcessConnection.CreateSession()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---
Comment 1 Judy McNeil 2016-11-17 17:57:08 UTC
Did not attach Log from the Mac since it was very old data.  If you need it, let me know where to find the most recent log files.
Comment 2 Judy McNeil 2016-11-17 18:10:16 UTC
Created attachment 18513 [details]
Log from iOS designer on Mac side

Found the correct log file
Comment 3 Alan McGovern 2016-11-18 00:53:41 UTC
When the designer is trying to start up, are there any extra crash logs being written in the 'User Reports' section in Console.app? http://screencast.com/t/Ut6xLaFUiB  If there are can you attach them to the bug report too? So far there's no clear indication what's going wrong.
Comment 4 Judy McNeil 2016-11-18 13:53:26 UTC
Created attachment 18534 [details]
MonoTouchDesign Crash

Several of these were in the User Reports.
Comment 5 Alan McGovern 2016-11-23 10:35:01 UTC
Just to update this bug:

Judy made a copy of the cache in ~/Library/Caches/XMA, then deleted everything there, then it magically started working once VS re-deployed the agents.

I suspected the issue was a corrupt set of files, but after grabbing a copy of the old files and freshly deployed files I found the MD5s were identical for every file.

As such there's not much I can do with this bug except mark it as an 'XMA' issue. It went from 100% happening to 100% not-happening just by deleting/recreating files, even though those files are seemingly bit-identical to the original ones.

Has this kind of issue shown up before? If so, would it make sense to add a little tool/option which would allow people to clean up the entire XMA cache directory from within VS?

If there's nothing actionable from the XVS side then we should just close this as 'could not reproduce' as there is nothing further I can do from my side now.
Comment 6 Jose Gallardo 2016-12-27 21:35:54 UTC
Hi Judy, Alan,

We couldn't reproduce this issue. However, there were some improvements on the MD5 checks mechanism that might be related to the issue you were facing.

If you hit the issue again, please feel free to reopen this bug and we'll investigate it further.

Thanks!