Bug 40373 - Null reference exception in ScrollView
Summary: Null reference exception in ScrollView
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: (C8)
Assignee: Marius Ungureanu
Depends on:
Reported: 2016-04-14 02:00 UTC by Alan McGovern
Modified: 2016-07-07 17:59 UTC (History)
4 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 Alan McGovern 2016-04-14 02:00:57 UTC
I get this error:
System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.Ide.Gui.Components.LogView.ShouldAutoScroll () [0x00000] in /Users/alan/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs:576 
  at MonoDevelop.Ide.Gui.Components.LogView.UnsafeAddText (System.String text, Gtk.TextTag extraTag) [0x00048] in /Users/alan/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs:590 
  at MonoDevelop.Ide.Gui.Components.LogView+QueuedTextWrite.Execute (MonoDevelop.Ide.Gui.Components.LogView pad) [0x00000] in /Users/alan/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs:650 
  at MonoDevelop.Ide.Gui.Components.LogView.outputDispatchHandler () [0x00064] in /Users/alan/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs:481 

in this code:

because 'VAdjustment' is null. It happens nearly every time on project load for me. A simple trigger seems to be to open a project which references nugets but they have not been restored.

The error message being logged when it null references is:
"Updating Resources...\n\nThis project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ../packages/Xamarin.Forms.\n\n"
Comment 2 xamarin-release-manager 2016-04-19 10:37:37 UTC
Fixed in version (master)

Author: therzok
Commit: 1485ad45d544100c4be5d74bfc8ebb2bcb2bde61 (mono/monodevelop)
Comment 4 Alan McGovern 2016-06-29 08:08:07 UTC
It's a race condition - impossible to reliably reproduce
Comment 5 Shruti 2016-07-07 17:59:37 UTC
As per comment 4, this issue is hardly to reproduce. So closing it.

Please reopen If experience this issue again.