Jishar13 / pvbeancounter

Automatically exported from code.google.com/p/pvbeancounter
1 stars 0 forks source link

Service does not start (nothing in pv log - stack trace in sys log) #95

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

Problem happened in 1.6.05   and   1.6.06
Problem does not exist in the 1.5.12 I that I am now using.

Win 7 x64 (in a VM on a mac)

I am a .net developer myself, so if you cant see what is going on, I could 
throw it into ilspy and see why it breaks in my system.

Here is the stack trace:

Application: PVService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.MissingMethodException
Stack:
   at PVInverterManagement.ExecutionStateManager.LoadLogSettings()
   at PVInverterManagement.ExecutionStateManager..ctor()
   at PVService.PVService..ctor()
   at PVService.Program.Main()

Original issue reported on code.google.com by Bret...@gmail.com on 21 Aug 2011 at 1:08

GoogleCodeExporter commented 8 years ago
Version 1.6 introduced Sunny WebBox support. This requires a zip library. I 
added "Iconic.Zip.dll" to PVBC (v1.9). This was obtained from:

http://dotnetzip.codeplex.com/

Perhaps you can investigate if this library is causing the issue. Other changes 
in PVBC for version 1.6 were minor in comparison and unlikely to be the cause 
of the trouble.

ExecutionStateManager is the first object instantiated from the 
PVInverterManagement.dll file. This is the dll that references the 
Iconic.Zip.dll.

However LoadLogSettings is a rather trivial routine that access the xml 
settings immediately after the setting object is instantiated. This routine is 
accessing an XmlDocument object that contains the PVBC settings.

        // The following loads SystemServices with appropriate parameter settings
        private void LoadLogSettings()
        {
            SystemServices.LogError = ApplicationSettings.LogError.HasValue ? ApplicationSettings.LogError.Value : true;
            SystemServices.LogFormat = ApplicationSettings.LogFormat.HasValue ? ApplicationSettings.LogFormat.Value : true;
            SystemServices.LogInformation = ApplicationSettings.LogInformation.HasValue ? ApplicationSettings.LogInformation.Value : true;
            SystemServices.LogStatus = ApplicationSettings.LogStatus.HasValue ? ApplicationSettings.LogStatus.Value : true;
            SystemServices.LogTrace = ApplicationSettings.LogTrace.HasValue ? ApplicationSettings.LogTrace.Value : false;
            SystemServices.LogMeterTrace = ApplicationSettings.LogMeterTrace.HasValue ? ApplicationSettings.LogMeterTrace.Value : false;
            SystemServices.LogMeterMessage = ApplicationSettings.LogMeterMessage.HasValue ? ApplicationSettings.LogMeterMessage.Value : false;
            SystemServices.LogDatabase = ApplicationSettings.LogDatabase.HasValue ? ApplicationSettings.LogDatabase.Value : false;
        }

        public ExecutionStateManager()
        {
            //ApplicationSettings = new ApplicationSettings(AppDomain.CurrentDomain.BaseDirectory + @"\settings.xml");
            ApplicationSettings = new ApplicationSettings("settings.xml");
            SystemServices = new MackayFisher.Utilities.SystemServices(ApplicationSettings.BuildFileName(ApplicationSettings.LogFile));

            LoadLogSettings();

            ExecutionState = ExecutionState.Startup;
            SuspendRequested = false;

            GenThreadManager = new GenThreadManagement.GenThreadManager(SystemServices);
            ExecutionTimeLine = new ExecutionTimeLine(SystemServices);

            InverterManagerManager = new PVInverterManagement.InverterManagerManager(ApplicationSettings, this, SystemServices); 
        }

This code has been unchanged for some time. 1.6 did introduce some settings 
file structure changes but it does not access any new components.

My development machine uses VS2010 10.0.40219.1 SP1Rel

The Framework is 4.0.30319 SP1Rel

Dennis M-F

Original comment by DennisMackayFisher on 4 Sep 2011 at 12:32

GoogleCodeExporter commented 8 years ago
I will close this now. I am happy to discuss if there is more I can do to help.

Dennis M-F

Original comment by DennisMackayFisher on 11 Sep 2011 at 2:46

GoogleCodeExporter commented 8 years ago

Original comment by DennisMackayFisher on 11 Sep 2011 at 2:47