Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Data read loop error

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Locked
jrhilton
Posts: 17
Joined: Thu 31 Jul 2014 4:25 pm
Weather Station: Custom build + old Oregon WMR88
Operating System: Windows 10 / Linux
Location: London

Data read loop error

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Data read loop error

Post 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?
Steve
jrhilton
Posts: 17
Joined: Thu 31 Jul 2014 4:25 pm
Weather Station: Custom build + old Oregon WMR88
Operating System: Windows 10 / Linux
Location: London

Re: Data read loop error

Post 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.
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Data read loop error

Post 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.
Steve
water01
Posts: 3254
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Data read loop error

Post 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.
David
Image
jrhilton
Posts: 17
Joined: Thu 31 Jul 2014 4:25 pm
Weather Station: Custom build + old Oregon WMR88
Operating System: Windows 10 / Linux
Location: London

Re: Data read loop error

Post 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?
You do not have the required permissions to view the files attached to this post.
jrhilton
Posts: 17
Joined: Thu 31 Jul 2014 4:25 pm
Weather Station: Custom build + old Oregon WMR88
Operating System: Windows 10 / Linux
Location: London

Re: Data read loop error

Post 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 :D ),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.
You do not have the required permissions to view the files attached to this post.
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Data read loop error

Post 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.
Steve
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Data read loop error

Post 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.
Steve
jrhilton
Posts: 17
Joined: Thu 31 Jul 2014 4:25 pm
Weather Station: Custom build + old Oregon WMR88
Operating System: Windows 10 / Linux
Location: London

Re: Data read loop error

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
rogerthn
Posts: 518
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

Re: Data read loop error

Post 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
Image
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Data read loop error

Post 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?
Steve
User avatar
rogerthn
Posts: 518
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

Re: Data read loop error

Post 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
You do not have the required permissions to view the files attached to this post.
Image
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Data read loop error

Post 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.
Steve
User avatar
rogerthn
Posts: 518
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

Re: Data read loop error

Post by rogerthn »

OK Steve, far from a Major issue!
Image
Locked