Page 1 of 1
Data read loop error
Posted: Tue 12 May 2015 9:50 pm
by jrhilton
Hi, is anyone seeing a "Data read loop: Object reference not set to an instance of an object" error in their diags file, then "Data read loop: The operation has timed-out." and no further station updates.
I have just put my Oregon Scientific WMR88 onto Cumulus MX 3.0.0 b3024 on my raspberry 2 pi. This is a brand new install.
diags file is attached.
Thanks,
James
Re: Data read loop error
Posted: Wed 13 May 2015 7:01 am
by steve
It looks like the USB connection is dropping out. Does this always happen the same way, about 60 seconds after MX starts? If you restart MX, does it read data again for a short time? Does 'lsusb' show the station connected when Cumulus is still running, after the 'object reference...' message occurs? Do you have the station connected directly to the Pi, or via a powered hub?
Re: Data read loop error
Posted: Wed 13 May 2015 7:47 pm
by jrhilton
steve wrote:It looks like the USB connection is dropping out. Does this always happen the same way, about 60 seconds after MX starts? If you restart MX, does it read data again for a short time? Does 'lsusb' show the station connected when Cumulus is still running, after the 'object reference...' message occurs? Do you have the station connected directly to the Pi, or via a powered hub?
Hi Steve, it seems to always happen the same way, about 60s after MX starts.
I never seems to read any data again.
lsusb shows the station ok, before and after the object reference.
It is directly connected to the PI2.
---
to follow up a full update to software and firmware on the pi doesn't fix the issue and I tested 3019 and the same thing happens.
Re: Data read loop error
Posted: Thu 14 May 2015 6:25 am
by steve
It may be that it needs a usb hub to operate correctly. If you turn on debug logging, that may show some more information in the diags files.
Re: Data read loop error
Posted: Thu 14 May 2015 8:16 am
by water01
It is directly connected to the PI2.
This is probably the reason why. Unless your power supply to RPi is a good 2amp supply the general advice is that you should attach power hungry devices via a powered USB hub as the RPi does not provide enough consistent power to it's USB ports. Had this problem on original RPi, RPi B+ and RPi 2 even though the latter 2 were supposed to have better output on the USB ports.
Re: Data read loop error
Posted: Thu 14 May 2015 9:05 pm
by jrhilton
I've tried with a powered hub and the results are still the same unfortunately.
How do I turn debug on, can I put debug=1 anywhere in the settings file?
---
ok i've worked out how to turn debug on. Log file with debug on is now attached. Am i correct in saying Cumulus is getting the packets as they change through the log, but just stops updating its self?
Re: Data read loop error
Posted: Thu 14 May 2015 9:37 pm
by jrhilton
Hi,a further update, the same thing happens on a windows 7 laptop (the same one that has been running v1 for more than a year without issue

),so it is not related to the PI hardware/software, but seems to be a cumulus 2 issue.
It does a few updates, then "Data read loop: Object reference not set to an instance of an object." error in the log file, then it never updates again. I am guessing the log just outputs the .net error so it is basically saying a System.NullReferenceException, so some nul references in there or something trying to access an object without instantiating it perhaps?
Did the code related to the WMR88 change between V1 and V2?
Log file attached.
Re: Data read loop error
Posted: Fri 15 May 2015 8:01 am
by steve
jrhilton wrote:Did the code related to the WMR88 change between V1 and V2?
All of the code changed in MX, it's a completely new program, written from scratch.
It does look like a bug in the MX WMR88 code. I don't have a WMR88 myself, so can't test the code, and inevitably there will be a few issues getting the code working. Presumably you are the first one to try it. I'll see if I can work out what the problem is from the debug logging and put a fix in the next build.
Re: Data read loop error
Posted: Fri 15 May 2015 8:03 am
by steve
Actually, I believe a WMR100 owner has tried it, and that's the same code as the WMR88 code. I think the problem is just in the UV code.
Re: Data read loop error
Posted: Tue 19 May 2015 8:27 pm
by jrhilton
steve wrote:Actually, I believe a WMR100 owner has tried it, and that's the same code as the WMR88 code. I think the problem is just in the UV code.
Hi Steve, I've finally had chance to do some more testing and it seems to work fine until a UV packet is received from the station as you note, and I do indeed have a UV sensor, which I suspect most people don't bother with.
Two more log files with debug on from Windows 7 attached.
Re: Data read loop error
Posted: Tue 26 Jan 2016 9:07 pm
by rogerthn
steve wrote:Actually, I believe a WMR100 owner has tried it, and that's the same code as the WMR88 code. I think the problem is just in the UV code.
I've WMR88 with timeouts as below and I do not have any UV, is it possible to configure to avoid the timeouts?
Code: Select all
2016-01-26 22:00:00.517 Hour changed:22
2016-01-26 22:00:00.517 Calculating sunrise and sunset times
2016-01-26 22:00:00.518 Sunrise: 08:28:53
2016-01-26 22:00:00.518 Sunset : 16:17:38
2016-01-26 22:00:00.519 Tomorrow sunrise: 08:26:59
2016-01-26 22:00:00.519 Tomorrow sunset : 16:19:58
2016-01-26 22:00:00.527 Writing log entry for 2016-01-26 22:00:00
2016-01-26 22:00:00.529 Written log entry for 2016-01-26 22:00:00
2016-01-26 22:00:00.533 Writing today.ini, LastUpdateTime = 2016-01-26 22:00:00 raindaystart = 11,684 rain counter = 17,018
2016-01-26 22:00:00.975 Packet: 10 60 00 00 00 16 1A 01 10 01 B2 00
2016-01-26 22:00:02.056 Packet: 00 46 E2 13 E2 23 40 02
2016-01-26 22:00:05.057 Data read loop: The operation has timed-out.
2016-01-26 22:00:08.057 Data read loop: The operation has timed-out.
2016-01-26 22:00:09.980 Packet: 00 48 09 0C 1B B0 01 01 00 2A 01
2016-01-26 22:00:12.982 Data read loop: The operation has timed-out.
2016-01-26 22:00:15.989 Packet: 40 41 03 00 00 00 15 00 43 00 01 0C 01 01 09 F4 00
2016-01-26 22:00:16.881 Packet: 10 42 80 CA 00 20 1E 00 00 20 FA 01
2016-01-26 22:00:19.882 Data read loop: The operation has timed-out.
2016-01-26 22:00:22.882 Data read loop: The operation has timed-out.
2016-01-26 22:00:25.882 Data read loop: The operation has timed-out.
2016-01-26 22:00:28.882 Data read loop: The operation has timed-out.
2016-01-26 22:00:31.882 Data read loop: The operation has timed-out.
2016-01-26 22:00:34.882 Data read loop: The operation has timed-out.
2016-01-26 22:00:37.882 Data read loop: The operation has timed-out.
2016-01-26 22:00:40.882 Data read loop: The operation has timed-out.
2016-01-26 22:00:43.881 Data read loop: The operation has timed-out.
2016-01-26 22:00:46.881 Data read loop: The operation has timed-out.
2016-01-26 22:00:49.881 Data read loop: The operation has timed-out.
2016-01-26 22:00:52.881 Data read loop: The operation has timed-out.
2016-01-26 22:00:55.882 Data read loop: The operation has timed-out.
2016-01-26 22:00:58.883 Data read loop: The operation has timed-out.
2016-01-26 22:01:01.048 Packet: 10 60 00 00 01 16 1A 01 10 01 B3 00
2016-01-26 22:01:02.034 Packet: 00 46 E2 13 E2 23 40 02
Re: Data read loop error
Posted: Wed 27 Jan 2016 8:01 am
by steve
Those messages do not indicate a problem, and are nothing to do with the problem reported in this thread (which was fixed some time ago). Only the "Object reference not set to an instance of an object" message was a symptom of the bug in MX. The bug caused MX to stop reading any data from the station.
Do you believe that you are actually having a problem? If so, can you describe it, please?
Re: Data read loop error
Posted: Wed 27 Jan 2016 4:49 pm
by rogerthn
steve wrote:Do you believe that you are actually having a problem? If so, can you describe it, please?
Besides almost 2MB, enclosed since last night I do not think that there are any "functional" problem.
20160126-225945.zip
Re: Data read loop error
Posted: Wed 27 Jan 2016 4:55 pm
by steve
I'll change it so that it doesn't log so much without the extra logging levels turned on. There is still a lot of code I put in initially which I haven't got around to looking at again.
Re: Data read loop error
Posted: Wed 27 Jan 2016 5:41 pm
by rogerthn
OK Steve, far from a Major issue!