Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

Commented Unassigned: c:\Users\Rob\ path in stack trace. [330]

$
0
0
Started using Caliburn.Micro v 1.5.2. During development faced once error. The exception stack trace contained very strange line:
essage: Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.

Exception details:
Exception Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace:
at Caliburn.Micro.BootstrapperBase.PrepareApplication() in c:\Users\Rob\Documents\CodePlex\caliburnmicro\src\Caliburn.Micro.Silverlight\Bootstrapper.cs:line 108
at Caliburn.Micro.BootstrapperBase.StartRuntime() in c:\Users\Rob\Documents\CodePlex\caliburnmicro\src\Caliburn.Micro.Silverlight\Bootstrapper.cs:line 95
at Caliburn.Micro.BootstrapperBase.Start() in c:\Users\Rob\Documents\CodePlex\caliburnmicro\src\Caliburn.Micro.Silverlight\Bootstrapper.cs:line 49
at Caliburn.Micro.Bootstrapper`1..ctor() in c:\Users\Rob\Documents\CodePlex\caliburnmicro\src\Caliburn.Micro.Silverlight\Bootstrapper.cs:line 279
Comments: Oh, I thought Application was referring to the static class... my bad for not double checking. Now, as far as I know, the Application.Current can be null just in cases where no application is available (unit tests and console application could be possible cases). Moreover, as long as the bootstrapper is declared inside the application resources, it cannot retrieve a null reference from Application.Current: the bootstrapper is instantiated after the Application is created, and Application.Current is assigned in the Application class constructor. ``` [SecurityCritical] public Application() { EventTrace.EasyTraceEvent(EventTrace.Keyword.KeywordGeneral | EventTrace.Keyword.KeywordPerf, EventTrace.Event.WClientAppCtor); lock (Application._globalLock) { if (Application._appCreatedInThisAppDomain) throw new InvalidOperationException(System.Windows.SR.Get("MultiSingleton")); Application._appInstance = this; Application.IsShuttingDown = false; Application._appCreatedInThisAppDomain = true; } ... } ``` As I was saying before, the stack trace seems too short to me, since there is no reference to the code that instantiated the bootstrapper itself... without a bit more information, I dubt we can guess what's happening... but I feel there is something fishy going on...

Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>