Bug 13590 - Visual Studio 2010 crashes random with System.ArgumentNullException
Summary: Visual Studio 2010 crashes random with System.ArgumentNullException
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 4.8.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2013-07-30 04:15 UTC by Luzanne
Modified: 2013-10-25 05:30 UTC (History)
2 users (show)

Tags: smfix
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:
Status:
RESOLVED FIXED

Description Luzanne 2013-07-30 04:15:44 UTC
Visual Studio 2010 crashes random.

I can't reproduce this error, because it happens random. Sometimes while editing my code (just a .cs file) or sometimes while compiling/deploying my code. Also when i'm not 'using' my IDE, when i'm getting some coffee and away from my machine.

With the previous version of XA, 4.6.x I never saw a crash in Visual Studio.

Yesterday while I was working it happened 5 times, with 2 different errors, with a little difference in the stacktrace.

Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework Version 4.0.30319 SP1Rel
Windows 7 64b
Xamarin.Android 4.8.00013 (3f1c339b)



Error 1:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException
Stack:
   at System.String.Format(System.String, System.Object[])
   at Xamarin.AndroidDesigner.JavaProcessConnection.javaProcess_ErrorDataReceived(System.Object, System.Diagnostics.DataReceivedEventArgs)
   at System.Diagnostics.Process.ErrorReadNotifyUser(System.String)
   at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
   at System.Diagnostics.AsyncStreamReader.ReadBuffer(System.IAsyncResult)
   at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessageSink)
   at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.DoAsyncCall()
   at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(System.Object)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()



Error 2:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException
Stack:
   at System.String.Format(System.String, System.Object[])
   at Xamarin.AndroidDesigner.JavaProcessConnection.javaProcess_OutputDataReceived(System.Object, System.Diagnostics.DataReceivedEventArgs)
   at System.Diagnostics.Process.OutputReadNotifyUser(System.String)
   at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
   at System.Diagnostics.AsyncStreamReader.ReadBuffer(System.IAsyncResult)
   at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessageSink)
   at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.DoAsyncCall()
   at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(System.Object)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Comment 1 baramuse 2013-09-04 21:40:36 UTC
Happens to me too, with Visual studio 2012 and Windows 8.

   at System.String.Format(String format, Object[] args)
   at Xamarin.AndroidDesigner.JavaProcessConnection.javaProcess_OutputDataReceived(Object sender, DataReceivedEventArgs e)
   at System.Diagnostics.Process.OutputReadNotifyUser(String data)
   at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
   at System.Diagnostics.AsyncStreamReader.ReadBuffer(IAsyncResult ar)
   at System.IO.Stream.ReadWriteTask.InvokeAsyncCallback(Object completedTask)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.IO.Stream.ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(Task completingTask)
   at System.Threading.Tasks.Task.FinishContinuations()
   at System.Threading.Tasks.Task.FinishStageThree()
   at System.Threading.Tasks.Task.FinishStageTwo()
   at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
   at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Comment 2 Luzanne 2013-09-18 05:54:02 UTC
Version info:
Microsoft Visual Studio Professional 2012
Version 11.0.60610.01 Update 3
Microsoft .NET Framework Version 4.5.50709

Xamarin.Android   4.8.02054 (dac24182)



I've upgraded to Visual Studio 2012 and the problem is also in this version.

At the moment the Android Designer can't be used on my machine. I'm editing my resources files in another IDE, because VS2012 is crashing in 2 minutes after opening a .axml file in the designer.
Comment 3 Lluis Sanchez 2013-10-25 05:30:16 UTC
Fixed. The fix will be included in Xamarin Studio 4.1.13 and Xamarin.Android 4.10.1.