Bug 61186 - Designer Fails to Load with "System.ArgumentNullException: Value cannot be null"
Summary: Designer Fails to Load with "System.ArgumentNullException: Value cannot be null"
Status: NEW
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android Designer ()
Version: 4.8.0 (15.5)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2018-01-26 23:22 UTC by Jimmy [MSFT]
Modified: 2018-04-27 16:47 UTC (History)
5 users (show)

Tags:
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 for Bug 61186 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
NEW

Description Jimmy [MSFT] 2018-01-26 23:22:29 UTC
### Overview
Several users are reporting that the Android designer is failing to load with the error below after updating to version 15.5. This is happening with existing projects and new ones as well.

> System.ArgumentNullException: Value cannot be null.
> Parameter name: o
> at System.Runtime.InteropServices.Marshal.GetIUnknownForObjectNative(Object o, Boolean onlyInContext)
> at Xamarin.AndroidDesigner.Windows.WindowsAndroidSurfaceRenderer.UpdateD3DImageFromSharedSurface() in E:\A\_work\12\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner.Windows\WindowsAndroidSurfaceRenderer.cs:line 140
> at Xamarin.AndroidDesigner.Windows.WindowsAndroidSurfaceRenderer.RenderDesignerItemVisual(DesignerItem item) in E:\A\_work\12\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner.Windows\WindowsAndroidSurfaceRenderer.cs:line 131
> at Xamarin.Designer.Windows.WpfSurfaceRenderer.QueueRender(DesignerItem item) in E:\A\_work\12\s\Xamarin.Designer\Xamarin.Designer.Windows\WpfSurfaceRenderer.cs:line 361
> at Xamarin.AndroidDesigner.AndroidDesignerSurface.HandleSessionImageChanged(Object sender, EventArgs e) in E:\A\_work\12\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidDesignerSurface.cs:line 229
> at Xamarin.AndroidDesigner.AndroidDesignerSession.OnImageChanged() in E:\A\_work\12\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidDesignerSession.cs:line 2321
> at Xamarin.AndroidDesigner.AndroidDesignerSession.HandleRendered(Object sender, EventArgs e) in E:\A\_work\12\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidDesignerSession.cs:line 1381


Reports from Developer Community: https://developercommunity.visualstudio.com/content/problem/162107/vs2017-155-android-axml-editor-not-loading-after-u.html


### Steps to Reproduce
1. Create a new Android single view project
2. Open the Main.xaml file
Comment 2 woodyj007 2018-04-27 16:33:25 UTC
I believe this is a multi-monitor issue.  It certainly is in my case.

I have a three-screen setup. If I create a blank single view android app and open the axml when visual studio is on my left most monitor (primary) it renders correctly. If I move VS to a different monitor middle or right I get this error.

For reference, I'm using Nvidia card and onboard.  Layout is 3 (primary), 1, 2

Monitor 3 works fine, 1 and 2 both fail with this error.
Comment 3 woodyj007 2018-04-27 16:47:25 UTC
A further update.  I've moved my 2nd screen to my Nvidia Geforce GT 710 card and only one screen is now using the onboard Intel HD Graphics 630

Layout it 3, 2, 1  (Nvidia, Nvidia, Intel).

Renders correctly on both Nvidia driven monitors.  The error happens on Intel screen only.  Latest driver installed via Windows update 23.20.16.4974 (28-02-2018)

Hope this helps.