LOGIN  |  REGISTER
Smart Living Made Brilliant!
CASTLEOS FORUM
the topic is closed | show rated messages only

HomeBug Reports

A forum topic for reporting bugs and other issues with CastleOS

CPU pegged at 100%? Messages in this topic - RSS

Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
You sir are a bug busting machine! Looks like an issue where we assumed there would be a list item but there isn't. Please try the attached fix, unzip and place the file in: C:\Program Files (x86)\CastleOS\CastleOS Core Service\WebApp\bin

If you can confirm it fixes the issue, I'll post the updated installers immediately. Thanks once again!
edited by ccicchitelli on 1/6/2013


Attachments:
CastleOSWebApp.zip
0 link
Nick Bento
Nick Bento
Posts: 221


1/6/2013
Nick Bento
Nick Bento
Posts: 221
Putting that in place now, will test in a moment smile

also came across this one randomly while browsing around:

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
CastleOSWebApp.Configuration.GetCastleOSClient() +134
CastleOSWebApp.Configuration.GetZipCode() +34
CastleOSWebApp.m_Portal.GetWeather() +57
CastleOSWebApp.m_Portal.Page_Load(Object sender, EventArgs e) +151
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
System.Web.UI.Control.LoadRecursive() +94
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2759

--
-Nick B.
0 link
Nick Bento
Nick Bento
Posts: 221


1/6/2013
Nick Bento
Nick Bento
Posts: 221
After putting he fix in, I got the following upon reboot:

Server Error in '/' Application.

Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:


[FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]

[FileLoadException: Could not load file or assembly 'AjaxControlToolkit, Version=4.1.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +147

[ConfigurationErrorsException: Could not load file or assembly 'AjaxControlToolkit, Version=4.1.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +1298
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +391
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +104
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +293
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +240
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +961

[HttpException (0x80004005): Could not load file or assembly 'AjaxControlToolkit, Version=4.1.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +614
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +896

--
-Nick B.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Hmm, that's weird. That DLL hasn't changed. Here it is in a zip just in case, try replacing the existing one with this...


0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
As far as the other random error you saw, that's what the old global.asax file normally handles. Sometimes the request from the web app to the core service is interrupted, and it catches that and reloads (which is what caused the redirect loop).
0 link
Nick Bento
Nick Bento
Posts: 221


1/6/2013
Nick Bento
Nick Bento
Posts: 221
Now I'm getting this:

Server Error in '/' Application.

Could not load file or assembly 'CastleOSWebApp' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'CastleOSWebApp' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'CastleOSWebApp' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:


[FileLoadException: Could not load file or assembly 'CastleOSWebApp' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]

[FileLoadException: Could not load file or assembly 'CastleOSWebApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +147

[ConfigurationErrorsException: Could not load file or assembly 'CastleOSWebApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +1298
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +391
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +104
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +293
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +240
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +961

[HttpException (0x80004005): Could not load file or assembly 'CastleOSWebApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +614
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +896

--
-Nick B.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Try replacing that DLL with the attached again. Perhaps when I compile these DLLs link together, and you need to update both at the same time? Sorry, never had this happen before!


0 link
Nick Bento
Nick Bento
Posts: 221


1/6/2013
Nick Bento
Nick Bento
Posts: 221
same error :/

--
-Nick B.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
OK, try these. These should get you back to where you were before my failed bug fix attempt...
0 link
Nick Bento
Nick Bento
Posts: 221


1/6/2013
Nick Bento
Nick Bento
Posts: 221
think it hid the attachment

--
-Nick B.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
sorry...


Attachments:
bin.zip
0 link
Nick Bento
Nick Bento
Posts: 221


1/6/2013
Nick Bento
Nick Bento
Posts: 221
No Problem.

Getting this same error again:

Server Error in '/' Application.

Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:


[FileLoadException: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]

[FileLoadException: Could not load file or assembly 'AjaxControlToolkit, Version=4.1.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +147

[ConfigurationErrorsException: Could not load file or assembly 'AjaxControlToolkit, Version=4.1.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +1298
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +391
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +104
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +293
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +240
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +961

[HttpException (0x80004005): Could not load file or assembly 'AjaxControlToolkit, Version=4.1.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +614
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +896

Would it be better for me to try and reinstall?

--
-Nick B.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Try a reboot first. Something must be corrupted, and it may be in the webserver cache. If you do decide to do a reboot, be sure to download the updated installer (from yesterday) and to manually make a backup copy of your configuration.xml file, as those settings will be lost. Then do an uninstall and reinstall - but you shouldn't have to, give the reboot a try...
0 link
Nick Bento
Nick Bento
Posts: 221


1/6/2013
Nick Bento
Nick Bento
Posts: 221
Cleared the temp asp.net files, fixed the issue.
edited by nikku on 1/6/2013

Should I try your fixes again and see if clearing the asp.net temporary files allows it to work?
edited by nikku on 1/6/2013

--
-Nick B.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Please do. That original bug fix, as a standalone DLL, should be okay...it's working here...
0 link
Nick Bento
Nick Bento
Posts: 221


1/6/2013
Nick Bento
Nick Bento
Posts: 221
Fix is in place and working great!

--
-Nick B.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Excellent, I'll post the updated installer now. Thank you!
0 link
Nick Bento
Nick Bento
Posts: 221


1/6/2013
Nick Bento
Nick Bento
Posts: 221
No Problem, thank you!

I may have ran into another bug, going to test it a little more and make sure I haven't made an error on my part. Seems that the events I set up to control one of my lights has caused castleOS to hang. I have one event that says when my motion sensor is on, to turn on the lights. The other event says when the motion sensor goes off, to turn off the lights. It seems one of these two has hung castleos, as when I walked by the lights didn't come back on, and castleOS isn't responding again.

--
-Nick B.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
OK, please post your log again...is the config file the same as I downloaded earlier?
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/6/2013
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
The events on the config file look good, and I have the same event structure set up here to test, but with TriggerLinc's instead of motion sensors, and they don't cause a problem. So either this is motion sensor specific, or something else...
0 link