Bug 58265 - [Smoke] [Workbook & Inspector] [VSFM] Inspector client crashes when clicking on View Inspector
Summary: [Smoke] [Workbook & Inspector] [VSFM] Inspector client crashes when clicking ...
Status: VERIFIED FIXED
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Client: Visual Inspector ()
Version: 1.2.2
Hardware: PC Windows
: High major
Target Milestone: 15.4
Assignee: Larry Ewing [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-07-20 07:45 UTC by Swati Gangrade
Modified: 2017-09-07 08:12 UTC (History)
3 users (show)

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


Attachments
InspectorCrashing Logs (2.67 KB, application/x-zip-compressed)
2017-07-20 07:45 UTC, Swati Gangrade
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:
VERIFIED FIXED

Description Swati Gangrade 2017-07-20 07:45:12 UTC
Created attachment 23677 [details]
InspectorCrashing Logs

Test Environment - https://gist.github.com/gangrade-swati/422c65a62c7702e25e907aa66e4436f8

Build Config- 
1. Visual Studio Enterprise 2017 for Mac (Preview) Version 7.2 Preview (7.2 build 415)
2. Mono 5.4.0.119 (2017-06/fd85ac4) (64-bit)
3. Xamarin.Android Version: 7.5.0.0 (Visual Studio Enterprise)
4. Xamarin.iOS Version: 10.14.0.0 (Visual Studio Enterprise)
5. Xamarin Inspector Version: 1.2.2
6. Xamarin.Mac Version: 3.8.0.0 (Visual Studio Enterprise)
7. Operating System  Mac OS X 10.12.1

Steps to reproduce:- 
1. Launch VSFM
2. Create an Android Single View App
3. Deploy application to simulator
4. Click on Inspect the running application in Xamarin Inspector icon
5. Wait till the Xamarin Inspector view is launched and application session is loaded 
6. Click Show the view inspector icon present on top right corner

Actual Result- Workbook get Crashed 

Xamarin Inspector View Crash Exception in Logs-
AndroidApp2 (:57639) => [Error][00:11:34.3980390] XipServer<Agent> (HandleClientConnectionAsync): exception: System.IO.IOException: Unable to write data to the transport connection: The socket has been shut down. ---> System.Net.Sockets.SocketException: The socket has been shut down
  at System.Net.Sockets.Socket.Send (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags) [0x00016] in <bbedcfffd63643078cf3c9273730c28b>:0 
  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x0009b] in <bbedcfffd63643078cf3c9273730c28b>:0 
   --- End of inner exception stack trace ---
  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x000e2] in <bbedcfffd63643078cf3c9273730c28b>:0 
  at System.IO.BinaryWriter.Write (System.Int32 value) [0x00030] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.__BinaryWriter.WriteInt32 (System.Int32 value) [0x00000] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Write (System.Runtime.Serialization.Formatters.Binary.__BinaryWriter sout) [0x00025] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.__BinaryWriter.WriteSerializationHeader (System.Int32 topId, System.Int32 headerId, System.Int32 minorVersion, System.Int32 majorVersion) [0x00011] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteSerializedStreamHeader (System.Int64 topId, System.Int64 headerId) [0x00000] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize (System.Object graph, System.Runtime.Remoting.Messaging.Header[] inHeaders, System.Runtime.Serialization.Formatters.Binary.__BinaryWriter serWriter, System.Boolean fCheck) [0x0011d] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph, System.Runtime.Remoting.Messaging.Header[] headers, System.Boolean fCheck) [0x0006e] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph, System.Runtime.Remoting.Messaging.Header[] headers) [0x00000] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph) [0x00000] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at Xamarin.Interactive.Serialization.XipSerializer.Serialize (System.Object value) [0x00034] in /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Serialization/XipSerializer.cs:62 
  at Xamarin.Interactive.Protocol.XipServer`1+<HandleClientConnectionAsync>c__AnonStorey1[TBackend].<>m__0 (System.Object response) [0x00018] in /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Protocol/XipServer.cs:78 
  at Xamarin.Interactive.Core.MainThreadRequest`1[TResponseMessage].Handle (Xamarin.Interactive.Protocol.XipConnection`1[TBackend] connection, System.Action`1[T] responseWriter) [0x00058] in /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Core/MainThreadRequest.cs:53 
  at Xamarin.Interactive.Protocol.XipServer`1[TBackend].HandleClientConnectionAsync (Xamarin.Interactive.Protocol.XipConnection`1[TBackend] connection, System.Threading.CancellationToken cancellationToken) [0x000ce] in /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Protocol/XipServer.cs:76  @ /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Protocol/XipServer.cs:84
AndroidApp2 (:57639) => [Error][00:11:34.4023530] XipServer<Agent> (HandleClientConnectionAsync): exception: System.IO.IOException: Unable to write data to the transport connection: The socket has been shut down. ---> System.Net.Sockets.SocketException: The socket has been shut down
  at System.Net.Sockets.Socket.Send (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags) [0x00016] in <bbedcfffd63643078cf3c9273730c28b>:0 
  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x0009b] in <bbedcfffd63643078cf3c9273730c28b>:0 
   --- End of inner exception stack trace ---
  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x000e2] in <bbedcfffd63643078cf3c9273730c28b>:0 
  at System.IO.BinaryWriter.Write (System.Int32 value) [0x00030] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.__BinaryWriter.WriteInt32 (System.Int32 value) [0x00000] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Write (System.Runtime.Serialization.Formatters.Binary.__BinaryWriter sout) [0x00025] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.__BinaryWriter.WriteSerializationHeader (System.Int32 topId, System.Int32 headerId, System.Int32 minorVersion, System.Int32 majorVersion) [0x00011] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteSerializedStreamHeader (System.Int64 topId, System.Int64 headerId) [0x00000] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize (System.Object graph, System.Runtime.Remoting.Messaging.Header[] inHeaders, System.Runtime.Serialization.Formatters.Binary.__BinaryWriter serWriter, System.Boolean fCheck) [0x0011d] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph, System.Runtime.Remoting.Messaging.Header[] headers, System.Boolean fCheck) [0x0006e] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph, System.Runtime.Remoting.Messaging.Header[] headers) [0x00000] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph) [0x00000] in <f5ab95c6aa8440b3bcec62dbb50f9ca0>:0 
  at Xamarin.Interactive.Serialization.XipSerializer.Serialize (System.Object value) [0x00034] in /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Serialization/XipSerializer.cs:62 
  at Xamarin.Interactive.Protocol.XipServer`1+<HandleClientConnectionAsync>c__AnonStorey1[TBackend].<>m__0 (System.Object response) [0x00018] in /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Protocol/XipServer.cs:78 
  at Xamarin.Interactive.Protocol.MessageChannel.Pump (Xamarin.Interactive.Protocol.XipConnection`1[TBackend] connection, System.Action`1[T] messageWriter) [0x000f3] in /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Protocol/MessageChannel.cs:60 
  at Xamarin.Interactive.Core.OpenMessageChannelRequest.Handle (Xamarin.Interactive.Protocol.XipConnection`1[TBackend] connection, System.Action`1[T] responseWriter) [0x000c4] in /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Core/OpenMessageChannelRequest.cs:52 
  at Xamarin.Interactive.Protocol.XipServer`1[TBackend].HandleClientConnectionAsync (Xamarin.Interactive.Protocol.XipConnection`1[TBackend] connection, System.Threading.CancellationToken cancellationToken) [0x000ce] in /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Protocol/XipServer.cs:76  @ /Users/builder/data/lanes/4493/b71b035f/source/inspector/Agents/Xamarin.Interactive/Protocol/XipServer.cs:84


Expected Result- Workbook should not get crashed

Reproduciblity-100%

Screencast-https://screencast.com/t/8uGEjGMeN1k
Comment 1 Swati Gangrade 2017-07-20 11:23:50 UTC
Screencast Link- https://www.screencast.com/t/598uTIFLLJn
Comment 2 Sandy Armstrong [MSFT] 2017-07-20 14:01:50 UTC
The actual crash trace from the log is:

[Critical][00:01:30.0008250] AppDomain (ConfigureLogging): exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Interactive.Client.Mac.VisualRepViewController.PointOfViewStartedMoving () [0x00017] in <5b39b7f2ad724fe5a011e18d3dff20c5>:0 
  at Xamarin.Interactive.Client.Mac.ViewInspector.InspectorSCNView.MouseDown (AppKit.NSEvent theEvent) [0x0001b] in <5b39b7f2ad724fe5a011e18d3dff20c5>:0 
  at (wrapper managed-to-native) AppKit.NSApplication:NSApplicationMain (int,string[])
  at AppKit.NSApplication.Main (System.String[] args) [0x0003d] in <96447271654b4e04bf897a402be2280e>:0 
  at Xamarin.Interactive.Client.Mac.Entry.Main (System.String[] args) [0x00060] in <5b39b7f2ad724fe5a011e18d3dff20c5>:0  @ /Users/builder/data/lanes/4493/b71b035f/source/inspector/Clients/Xamarin.Interactive.Client/AppSession.cs:109
Comment 3 Sandy Armstrong [MSFT] 2017-07-20 14:04:49 UTC
I have modified the title of this bug.

This bug has nothing to do with Workbooks. Although Workbooks and Inspector are installed together, they are separate clients.

When you click the "inspect" button in your IDE, and our app pops up, that is Inspector, not Workbooks.

When you launch "Xamarin Workbooks.app" and create a new workbook, or open a .workbook file, that is Workbooks, not Inspector.

The clients are based on the same code and are very similar, but you should think of them as separate products.
Comment 4 Larry Ewing [MSFT] 2017-07-20 15:54:38 UTC
I was able to reproduce this on master but it is fixed on the pr-lewing-spin branch
Comment 5 Larry Ewing [MSFT] 2017-09-01 19:27:10 UTC
pr-lewing-spin is in master now.