Announcement

Collapse
No announcement yet.

Plugin Crashes At Start - MSCORLIB.NI.DLL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Plugin Crashes At Start - MSCORLIB.NI.DLL

    I have issues...and I need some help with the plugin also

    Whenever I try to enable the plugin after installation it fails to start and gives "Critical. Plugin has disconnected." message. This is on a clean install Windows 10 machine version 1809 build 17763.194, fully updated with bare minimum applications installed (dedicated machine). The thermostat is a 7 Day Programmable RTH6580WF.

    HS Setup:
    Code:
    Current Date/Time: 12/19/2018 2:06:24 PM
    HomeSeer Version: HS3 Standard Edition 3.0.0.435
    Operating System: Microsoft Windows 10 Pro - Work Station
    System Uptime: 0 Days 0 Hours 24 Minutes 51 Seconds
    IP Address: 192.168.1.123
    Number of Devices: 97
    Number of Events: 12
    Available Threads: 200
    HSTouch Enabled: True
    Event Threads: 0
    Event Trigger Eval Queue: 0
    Event Trigger Priority Eval Queue: 0
    Device Exec Queue: 0
    HSTouch Event Queue: 0
    Email Send Queue: 0
    Anti Virus Installed: Windows Defender 
    
    Enabled Plug-Ins
    3.0.0.54: EasyTrigger
    2.0.2.8: JowiHue
    3.0.1.252: Z-Wave
    Since I can't get it to start I don't have any thermostat log info, but the exception is being logged in Windows event application log. It's griping about mscorlib.ni.dll:
    Code:
    Faulting application name: HSPI_SKWARE_HW_WIFI_TSTAT.exe, version: 1.4.0.0, time stamp: 0x5c0d6860
    Faulting module name: mscorlib.ni.dll, version: 4.7.3260.0, time stamp: 0x5bb7bb40
    Exception code: 0xc0000005
    Fault offset: 0x004349b2
    Faulting process id: 0x7a8
    Faulting application start time: 0x01d497d29e887966
    Faulting application path: C:\HS3\HSPI_SKWARE_HW_WIFI_TSTAT.exe
    Faulting module path: C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\6715dc4d04e35f16d482900c355325e9\mscorlib.ni.dll
    Report Id: f7ec1a8b-5639-48c8-91bf-64a3472df6ce
    Faulting package full name: 
    Faulting package-relative application ID:
    I also attached a report generated by this event:
    Code:
    Fault bucket 1585454100594355593, type 5
    Event Name: CLR20r3
    Response: Not available
    Cab Id: 0
    
    Problem signature:
    P1: HSPI_SKWARE_HW_WIFI_TSTAT.exe
    P2: 1.4.0.0
    P3: 5c0d6860
    P4: mscorlib
    P5: 4.7.3260.0
    P6: 5bb7bb40
    P7: 5b7f
    P8: 13
    P9: System.NullReferenceException
    P10: 
    
    Attached files:
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6C00.tmp.dmp
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6DC6.tmp.WERInternalMetadata.xml
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6DF6.tmp.xml
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6E23.tmp.csv
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6E81.tmp.txt
    
    These files may be available here:
    \\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_HSPI_SKWARE_HW_W_c53635dcf48deab8bc781846d68305ede9498ef_0eaea1c9_193172c6
    
    Analysis symbol: 
    Rechecking for solution: 0
    Report Id: 0d2fa5c3-a201-446f-9ee5-b46c1defd052
    Report Status: 268435456
    Hashed bucket: b988bb77aac0bf449600aa1ab99ced89
    Cab Guid: 0
    I'm not sure what mscorlib.ni.dll's problem is. Ideas?

    Thanks!
    Attached Files

    #2
    Is there an HSPI_SKWARE_HW_WIFIT_TSTAT.ini file in your HS3\Config directory? If so, you could update the log level to 6 to get the trace log to write so I can maybe figure out where it's freaking out...

    Comment


      #3
      Hello shill, and thanks for your reply. I have since stepped away, but I will certainly will as soon as I get back home in front of it. Sorry, I meant to do exactly that and forgot.

      Comment


        #4
        Hey, no ini file created in Config or the root directory. I've tried uninstalling/reinstalling, deleting residual files, renaming/replacing the problem dll. I'm going to disable the other plugins and see if I have any conflicting applications installed. If all else fails, I've got a Win 10 VM stored on one of my drives here somewhere. I'll yank it out later on and see if I can reproduce the problem.

        Comment


          #5
          Ok, I'm checking out on this one for now. I finally gave up troubleshooting Windows and went back to Linux. Formatted, clean install Ubuntu Server 18.04, installed latest Mono and depends, installed HS3 and configured, installed Z-Wave plugin and added controller, added a couple of devices, added Hue plugin and brought all devices up and working. It's a no frills setup, the server is all CLI. I installed HW WIFI, absolutely confident that it's all good and...boom! Same critical error and did not create a config file.

          Was a disappointed? Yep, I cried a little, but I'm not easily defeated. I removed all devices, plugins, wiped controller, reformatted that machine and did it again. At that point, all I could think is a problem with the latest version of Mono? So this time I pinned a snapshot of 5.12.0.226 in the source file and installed everything again. Why that particular version of Mono? I don't know. I just liked the looks of it. This time, forget that Hue plugin and those devices, HW WIFI is going to be installed first. No, same thing! I've even swapped controllers. I honestly don't know WTF is going on. I know it works. I've installed and ran it with no problems already! I've had zero problems with any other plugin I've bought or tried, so ideas are getting hard to come by.

          I don't have any debugging output to offer. It seems to be upset about some null references or the like, but I can't run it down without the logs either. If anyone has an inkling of an idea I'd love to hear it. I'm through putting HS3 through the paces now and decided it's going to live on Ubuntu Server. It's been the most reliable and responsive in all my testing. So, if any of you would like to have me try something keep in mind that it is running lean in a command line environment with a couple of plugins and around a 100 or so nodes. Thanks!

          Comment


            #6
            Dang... Sorry to hear that! All I can think at this point is to get you a build with Trace logging in by default in the Homeseer log so we can try to figure out where it's blowing up.​

            Comment


              #7
              Is it crashing before it creates the config file, or crashing because it can't create the config file?

              Could you put in a config file first and see if it gets further along? Because if it works with a pre-existing config that would indicate an issue with the the software finding the right path and being able to create the file. But if it still fails with a config already present then it'd likely be something else.

              Do you have an old config or starting from scratch?

              Comment


                #8
                The config stuff is built in to Homeseer, so if other stuff is working it's not likely the creation that's the problem, but if it did work with a known good config file it would indicate a big in the plugin and how it handles the config options before they're all fully setup.

                Comment


                  #9
                  Originally posted by wkearney99 View Post
                  Is it crashing before it creates the config file, or crashing because it can't create the config file?

                  Could you put in a config file first and see if it gets further along? Because if it works with a pre-existing config that would indicate an issue with the the software finding the right path and being able to create the file. But if it still fails with a config already present then it'd likely be something else.

                  Do you have an old config or starting from scratch?
                  No sir, I do not have a good config file. I'm starting from scratch right now. You can bet your shorts I will have one as soon as this thing is running though

                  Have a little trace output here that may indicate upon creation?
                  Code:
                  Unhandled Exception:
                  System.NullReferenceException: Object reference not set to an instance of an object
                    at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_remoting_wrapper(intptr,intptr)
                    at (wrapper remoting-invoke) HomeSeerAPI.IHSApplication.SaveINISetting(string,string,string,string)
                    at HSPI_SKWARE_HW_WIFI_TSTAT.PluginSettings.Save () [0x0008e] in <991759fbb0ee4108932c3174f92f1b57>:0 
                    at HSPI_SKWARE_HW_WIFI_TSTAT.PluginSettings.Finalize () [0x00006] in <991759fbb0ee4108932c3174f92f1b57>:0 
                  [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
                    at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_remoting_wrapper(intptr,intptr)
                    at (wrapper remoting-invoke) HomeSeerAPI.IHSApplication.SaveINISetting(string,string,string,string)
                    at HSPI_SKWARE_HW_WIFI_TSTAT.PluginSettings.Save () [0x0008e] in <991759fbb0ee4108932c3174f92f1b57>:0 
                    at HSPI_SKWARE_HW_WIFI_TSTAT.PluginSettings.Finalize () [0x00006] in <991759fbb0ee4108932c3174f92f1b57>:0 
                  11:49:10:9208:[Z-Wave]->Starting Z-Wave Polling for Network DA91EB0D...
                  11:49:18:3676:[Plug-In]->Interface Honeywell WiFi Thermostat is running as a trial, 30 days remaining.
                  Queuing plugin Honeywell WiFi Thermostat to load...
                  11:49:18:3757:[Plug-In]->Finished initializing plug-in Honeywell WiFi Thermostat
                  11:49:19:3423:[Info]->Plugin Honeywell WiFi Thermostat has connected. IP:127.0.0.1:47838
                  11:49:19:4698:[Starting Plug-In]->Initializing plugin Honeywell WiFi Thermostat ...
                  12/20/2018 23:49:19.608    Trace    [------]    PluginSettings.Load    >>>> PluginSettings.Load()
                  12/20/2018 23:49:19.600    Trace    [------]    HSPI.InitIO    >>>> HSPI.InitIO(COM1)
                  12/20/2018 23:49:19.762    Trace    [------]    Main.Decrypt    >>>> main.Decrypt(<encrypted text>)
                  12/20/2018 23:49:19.765    Trace    [------]    Main.Decrypt    <<<< main.Decrypt=<plain text>
                  12/20/2018 23:49:19.782    Trace    [------]    Main.GetVersion    >>>> Main.GetVersion()
                  12/20/2018 23:49:19.785    Trace    [------]    Main.GetVersion    >>>> Main.GetVersion=1.4.0
                  12/20/2018 23:49:19.795    Trace    [------]    HSPI.InitIO    <<<< HSPI.InitIO()
                  12/20/2018 23:49:19.812    Trace    [------]    HSPI.DoWork    >>>> HSPI.DoWork()
                  11:49:19:8188:[Starting Plug-In]->Plugin Honeywell WiFi Thermostat started successfully in 348 milliseconds
                  12/20/2018 23:49:19.824    Trace    [------]    PluginSettings.Load    >>>> PluginSettings.Load()
                  12/20/2018 23:49:19.835    Trace    [------]    Main.Decrypt    >>>> main.Decrypt(<encrypted text>)
                  12/20/2018 23:49:19.836    Trace    [------]    Main.Decrypt    <<<< main.Decrypt=<plain text>
                  12/20/2018 23:49:19.846    Trace    [------]    PluginSettings.Load    <<<< PluginSettings.Load
                  12/20/2018 23:49:19.849    Trace    [------]    Main.GetVersion    >>>> Main.GetVersion()
                  12/20/2018 23:49:19.849    Trace    [------]    Main.GetVersion    >>>> Main.GetVersion=1.4.0
                  12/20/2018 23:49:19.863    Trace    [------]    PluginSettings.Load    <<<< PluginSettings.Load
                  11:49:19:9011:[Honeywell WiFi Thermostat]->[------]Log file location: /HomeSeer/Logs/HSPI_SKWARE_HW_WIFI_TSTAT.log
                  11:49:19:9144:[Honeywell WiFi Thermostat]->[------]Running on Linux Version 4.15.0.20 using Mono version 5.16.0
                  12/20/2018 23:49:19.898    Info    [------]    Main.Main    Log file location: /HomeSeer/Logs/HSPI_SKWARE_HW_WIFI_TSTAT.log
                  12/20/2018 23:49:19.988    Info    [------]    Main.Main    Shutting down plugin
                  11:49:19:9893:[Honeywell WiFi Thermostat]->[------]Shutting down plugin
                  11:49:19:9948:[Info]->Plugin Honeywell WiFi Thermostat with instance:  has disconnected
                  12/20/2018 23:49:20.002    Info    [------]    Main.client_Disconnected    Lost connection to server
                  12/20/2018 23:49:21.005    Trace    [------]    PluginSettings.Save    >>>> PluginSettings.Save()

                  Comment


                    #10
                    Ok, that's something I can work with, and it just so happens I've found the same problem in a test I was just doing, though I wasnwa sure if it was a development environment problem or not. This more or less confirms the problem is somewhere in my code...

                    Comment


                      #11
                      Here's what's in my config, with the account data changed. The password appears to be salted/encrypted, not just plain text.

                      c:\Program Files (x86)\HomeSeer HS3\Config\HSPI_SKWARE_HW_WIFI_TSTAT.ini

                      Code:
                      [Options]
                      TermsAccepted=True
                      UserName=nobody@example.com
                      Password=xxxxxx
                      PollInterval=300
                      CommandFrequency=5
                      UpdateFrequency=30
                      MaxQueueSize=10
                      LogLevelHS=4
                      LogLevelFile=4
                      Version=1.3.2
                      SimulateAuto=False
                      SimulateCirculate=False
                      CirculateWait=20
                      CirculateRun=10
                      [Internal]
                      URL=https://mytotalconnectcomfort.com/
                      MaxWebClientWait=1000
                      LoginTimeoutMinutes=15
                      [Debug]
                      SimulateData=False
                      DataFile=HoneywellJSON.txt

                      Comment


                        #12
                        Here's what i have put together for 1.4.0.1 to address this issue. Before I push it to the updater, mind giving it a try?
                        Attached Files

                        Comment


                          #13
                          Originally posted by shill View Post
                          Ok, that's something I can work with, and it just so happens I've found the same problem in a test I was just doing, though I wasnwa sure if it was a development environment problem or not. This more or less confirms the problem is somewhere in my code...
                          In the words of David Wooderson, "All right, all right, all right."

                          I'm really messed up by the fact that I have installed it successfully multiple times previous though, all on various flavors of Linux. I just got into HomeSeer. I trialed it for a day and bought it the next. I knew right away I was going to run it for HA, I just didn't know how at the time. I've installed it on a dozen Linux distros, bought your plugin early on and ran it right along with them without any problems whatsoever. I think initially I learned that the version of Mono I was running was incompatible, but I just updated it and kept right on going. Before settling on Ubuntu Server, I thought I'd give Windows a go. That was the first time I saw this. I started digging, but stopped and went straight back to Linux instead. I was taken back when it failed with the same error. Since then, I bet I've reinstalled it a dozen more times on different versions of different distros, running different snapshots of Mono and it failed each and every time. I was beginning to think I was being punished for the whole "trying it on Windows" thing. And maybe I am, because I still don't get it?

                          Anywho, thank you gentlemen for your help!

                          Comment


                            #14
                            Originally posted by shill View Post
                            Here's what i have put together for 1.4.0.1 to address this issue. Before I push it to the updater, mind giving it a try?
                            Will do! Thanks

                            Comment


                              #15
                              No, this was just a case of bad timing on your part and bad testing on mine. I just released version 1.4.0 and the problem was caused by a change I made (that version had a lot of refactored code to bring it up to par with my internal best practices that I've been applying to all my plugins) that affected brand new users but not existing setups. Sorry for the problems you experienced as a result.

                              Comment

                              Working...
                              X