more G-Labs products

Author Topic: SmartControl - ArgumentNullException  (Read 1028 times)

September 10, 2015, 11:59:08 AM
Read 1028 times

sylwester_r

  • *
  • Information
  • Newbie
  • Posts: 4
Hi,

I just have downloaded the source and compiled it (on Windows). Naturally I have set the address of the HG in Program.cs (Gene - could you please correct the description on the web page? It is line 33 in Program.cs, not line 19 in SmartControl.cs). I have entered address as 127.0.0.1:81, as HG is listening on port 81 of my RPi B+.
Couple of seconds after starting the SC (the gui shows on the screen) I am getting the below errors and SC ends. Any advise/help? For compiling I am using Visual Studio Community Edition on Windows.


(mono:12345): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-can-change-accels after class was initialised

(mono:12345): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popup-delay after class was initialised

(mono:12345): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was initialised
slf4net: The factory resolver AppConfigFactoryResolver returned null from GetFactory().  The fallback no operation logger factory will be used instead.

Application information:
    Application domain: HgSmartControl.exe
    Application path: /home/pi/HomeGenie-SmartControl-master-2/HgSmartControl/bin/Debug/
    Machine name: viper-pi

Unhandled Exception:
System.ArgumentNullException: Argument cannot be null.
Parameter name: value
  at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <filename unknown>:0
  at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value) [0x00000] in <filename unknown>:0
  at HgSmartControl.Widgets.GraphPlotter.<UpdateStatistics>b__7_0 (System.String data) [0x00000] in <filename unknown>:0
  at HomeGenie.Client.ControlApi+<>c__DisplayClass17_0.<ServiceCall>b__0 (System.Object sender, System.Net.DownloadStringCompletedEventArgs e) [0x00000] in <filename unknown>:0
  at System.Net.WebClient.OnDownloadStringCompleted (System.Net.DownloadStringCompletedEventArgs e) [0x00000] in <filename unknown>:0
  at System.Net.WebClient.<DownloadStringAsync>m__2 (System.Object state) [0x00000] in <filename unknown>:0
  at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Argument cannot be null.
Parameter name: value
  at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <filename unknown>:0
  at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value) [0x00000] in <filename unknown>:0
  at HgSmartControl.Widgets.GraphPlotter.<UpdateStatistics>b__7_0 (System.String data) [0x00000] in <filename unknown>:0
  at HomeGenie.Client.ControlApi+<>c__DisplayClass17_0.<ServiceCall>b__0 (System.Object sender, System.Net.DownloadStringCompletedEventArgs e) [0x00000] in <filename unknown>:0
  at System.Net.WebClient.OnDownloadStringCompleted (System.Net.DownloadStringCompletedEventArgs e) [0x00000] in <filename unknown>:0
  at System.Net.WebClient.<DownloadStringAsync>m__2 (System.Object state) [0x00000] in <filename unknown>:0
  at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0

September 10, 2015, 12:28:21 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
try to run SC in debug mode in Windows Visual Studio, and make it point to you raspberry pi.
btw it seems to be a problem deserializing the modules list.
if so the output of http://(raspi_ip)/api/HomeAutomation.HomeGenie/Config/Modules.List could help finding the issue.

g.

September 10, 2015, 05:21:40 PM
Reply #2

sylwester_r

  • *
  • Information
  • Newbie
  • Posts: 4
It is difficult for the to debug the exceptions thrown in the debug, in Windows, since I am not C programmer, but there is no similar exception thrown like on RPi.
There are some font related issues - I have my light switch called Wejście and the unicode characters (here: "ś") are not displayed properly, but that is a minor issue for me...
Attached is the output of the http list query. I have noticed there some elements that have "Value" empty... first are around Weatherunderground module (btw. I cannot force it to download or upload the data from/to WU servers...).