Page 1 of 1

Data stopping on a Win 10 and Cumulus MX system

Posted: Sun 07 Aug 2016 8:53 am
by NeilThomas
Hi all

I'm running MX 3038 on a Windows 10 system with an Oregon WMR200 weather station and I keep getting situations where the program stops recording the correct data - i.e. it seems to use the last reading as the current reading. I have attached two screenshots from the graphs page for the last 24 hours showing that at about 19:00 the readings didn't change until I restarted Cumulus MX.

This has happened a number of times over the past few weeks without any indication on the console that there is an issue. At first it seemed to coincide with the dreaded automatic Windows 10 Updates but the last two times, as soon as i notice it there had not been any update / upgrade activity with any other app on the system.

As I want to be able to rely on the system working while I am away and not able to remotely restart MX are their any suggestions?

Image
Image

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Sun 07 Aug 2016 10:34 am
by steve
If you zip up the MX diags folder and attach it I'll take a look. I may need you to turn on data logging - hopefully you already have debug logging turned on.

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Sun 07 Aug 2016 12:34 pm
by Mapantz
This could be the same as what has happened to me, twice in the past week. I thought I may have accidentally disconnected the USB cable, as it gets caught on my TV when I swivel it around to either use as the PC screen or watching TV.

Code: Select all

2016-08-05 11:56:05.333 System.InvalidOperationException: The port is closed.
   at System.IO.Ports.SerialPort.get_BytesToRead()
   at .(Int32 ) in C:\Users\steve\Documents\Visual Studio 2015\Projects\CumulusMX\CumulusMX\DavisStation.cs:line 728
2016-08-05 11:58:00.935 *** Data input appears to have stopped
I've since turned on debugging, but it has been ok.

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Sun 07 Aug 2016 1:00 pm
by ConligWX
Mapantz wrote:This could be the same as what has happened to me, twice in the past week. I thought I may have accidentally disconnected the USB cable, as it gets caught on my TV when I swivel it around to either use as the PC screen or watching TV.

Code: Select all

2016-08-05 11:56:05.333 System.InvalidOperationException: The port is closed.
   at System.IO.Ports.SerialPort.get_BytesToRead()
   at .(Int32 ) in C:\Users\steve\Documents\Visual Studio 2015\Projects\CumulusMX\CumulusMX\DavisStation.cs:line 728
2016-08-05 11:58:00.935 *** Data input appears to have stopped
I've since turned on debugging, but it has been ok.
I take it you have power saving turned off? just wondering if Power saving is being applied to the USB port.

from the command prompt window please type in the following and paste the responses.

C:\powercfg /LIST

and

C:\powercfg /DEVICEQUERY wake_armed

if anyone else needs to disable Power setting use the following guide.

http://support.wdc.com/KnowledgeBase/an ... px?ID=3875

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Sun 07 Aug 2016 1:14 pm
by Mapantz
Toxic17 wrote:
Mapantz wrote:This could be the same as what has happened to me, twice in the past week. I thought I may have accidentally disconnected the USB cable, as it gets caught on my TV when I swivel it around to either use as the PC screen or watching TV.

Code: Select all

2016-08-05 11:56:05.333 System.InvalidOperationException: The port is closed.
   at System.IO.Ports.SerialPort.get_BytesToRead()
   at .(Int32 ) in C:\Users\steve\Documents\Visual Studio 2015\Projects\CumulusMX\CumulusMX\DavisStation.cs:line 728
2016-08-05 11:58:00.935 *** Data input appears to have stopped
I've since turned on debugging, but it has been ok.
I take it you have power saving turned off? just wondering if Power saving is being applied to the USB port.

from the command prompt window please type in the following and paste the responses.

C:\powercfg /LIST

and

C:\powercfg /DEVICEQUERY wake_armed

if anyone else needs to disable Power setting use the following guide.

http://support.wdc.com/KnowledgeBase/an ... px?ID=3875
All turned off. I never have it on anyway.. It has been working flawlessly until about a week ago, that's why I wondered if I knocked my cable out?! But after seeing this post, i'm questioning it.

PS: Those commands don't work. It needs to be: powercfg -l and powercfg -devicequery wake_armed

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Sun 07 Aug 2016 10:26 pm
by ConligWX
Mapantz wrote:PS: Those commands don't work. It needs to be: powercfg -l and powercfg -devicequery wake_armed
strange, they work on my Windows 10 platform ;)
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>powercfg /DEVICEQUERY wake_armed
HID-compliant mouse
Intel(R) Ethernet Connection I217-V
HID Keyboard Device


C:\WINDOWS\system32>powercfg /LIST

Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)
Power Scheme GUID: 71f28494-bae8-465d-9302-09b5e5992c57 (Samsung High Performance) *
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)
Power Scheme GUID: a8eabe8c-f6e2-4006-a8b9-930ad3e97b75 (Fujitsu Computers EcoSettings)

C:\WINDOWS\system32>

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Mon 08 Aug 2016 8:14 am
by NeilThomas
steve wrote:If you zip up the MX diags folder and attach it I'll take a look. I may need you to turn on data logging - hopefully you already have debug logging turned on.
Hi Steve
Thanks for this, I have attached the MXDiags zip to this. I have also made sure that I have turned on all debugging options to get as much info as possible should it happen again. However, while doing this the PC seemed to be having problems - not responding as quickly as it should - its SSD based so should work very quickly and it wasn't so I have also rebooted it.

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Mon 08 Aug 2016 8:31 am
by steve
All I can say is that Cumulus stopped receiving any data from the console, there are no other indications of any errors. Now that you have data logging turned on, it may be possible to say more the next time it happens. As suggested above, you should check that you don't have any USB power saving turned on.

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Thu 11 Aug 2016 8:41 am
by NeilThomas
steve wrote:If you zip up the MX diags folder and attach it I'll take a look. I may need you to turn on data logging - hopefully you already have debug logging turned on.
Hi Steve

It's happened again but this time, I can confirm that it happens when an automatic update download took place - in this case iTunes.

I did turn on logging but when I checked this morning it was off again so there is no point sending the MXdiags folder zip as there will not be any useful data. I have again confirmed that I have turned on logging but I have also now disabled iTunes auto update so the only thing that might now trigger it is if I haven't managed to stop Windows Auto updates. In theory, I should only be notified if there is an update from Windows but who knows if Windows will do that or something else.

I don't see that there is any point in trying to investigate this further until or unless I can get some log files that show what i happening.

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Thu 11 Aug 2016 3:13 pm
by NeilThomas
Toxic17 wrote:
Mapantz wrote:PS: Those commands don't work. It needs to be: powercfg -l and powercfg -devicequery wake_armed
strange, they work on my Windows 10 platform ;)
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>powercfg /DEVICEQUERY wake_armed
HID-compliant mouse
Intel(R) Ethernet Connection I217-V
HID Keyboard Device


C:\WINDOWS\system32>powercfg /LIST

Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)
Power Scheme GUID: 71f28494-bae8-465d-9302-09b5e5992c57 (Samsung High Performance) *
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)
Power Scheme GUID: a8eabe8c-f6e2-4006-a8b9-930ad3e97b75 (Fujitsu Computers EcoSettings)

C:\WINDOWS\system32>
Hi all.
Yes I have power saving turned off, the machine has been running Cumulus 1 for years and is till doing so for a second wired station on its serial port. No issues with power. The machine is a headless system just used to run my weather stations and only accessed via Remote Desktop from my Mac Mini.

When I upgraded the PCs to Win10 all power saving settings were checked and the machine stays on 24/7.

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Mon 15 Aug 2016 12:12 pm
by NeilThomas
NeilThomas wrote:
steve wrote:If you zip up the MX diags folder and attach it I'll take a look. I may need you to turn on data logging - hopefully you already have debug logging turned on.
Hi Steve

It's happened again but this time, I can confirm that it happens when an automatic update download took place - in this case iTunes.

I did turn on logging but when I checked this morning it was off again so there is no point sending the MXdiags folder zip as there will not be any useful data. I have again confirmed that I have turned on logging but I have also now disabled iTunes auto update so the only thing that might now trigger it is if I haven't managed to stop Windows Auto updates. In theory, I should only be notified if there is an update from Windows but who knows if Windows will do that or something else.

I don't see that there is any point in trying to investigate this further until or unless I can get some log files that show what i happening.
Steve.

It has happened again and, yes, it coincided with a Windows 10 Upgrade notification. I have done as much as I can to disable Win 10 Upgrades - they don't happen automatically, but they do download and then notify me that they are available. The problem started around 7:25 am on Sunday 14th and I have tried to include a zip file of the MXdiags folder. However, it is too big. I am cutting down the relevant log file, hopefully to provide you with Saturdays and Sundays reading. In th meantime, I have copied and pasted a section of the log file below:

Code: Select all

2016-08-14 07:25:08.508 7:25:08 AM numBytes = 9
2016-08-14 07:25:08.508 7:25:08 AM 01 D7 00 20 68 01 00 00
2016-08-14 07:25:08.508 7:25:08 AM Calling Read
2016-08-14 07:25:08.516 7:25:08 AM numBytes = 9
2016-08-14 07:25:08.516 7:25:08 AM 05 10 0B 17 1B 08 00 00
2016-08-14 07:25:08.516 7:25:08 AM Calling Read
2016-08-14 07:25:08.523 7:25:08 AM numBytes = 9
2016-08-14 07:25:08.524 7:25:08 AM 07 09 00 EC 00 2A 64 00
2016-08-14 07:25:08.524 7:25:08 AM Calling Read
2016-08-14 07:25:08.531 7:25:08 AM numBytes = 9
2016-08-14 07:25:08.532 7:25:08 AM 03 00 AF 02 00 2A 64 00
2016-08-14 07:25:08.532 7:25:08 AM Calling Read
2016-08-14 07:25:10.252 7:25:10 AM numBytes = 9
2016-08-14 07:25:10.252 7:25:10 AM 01 D3 AF 02 00 2A 64 00
2016-08-14 07:25:10.252 7:25:10 AM Calling Read
2016-08-14 07:25:10.260 7:25:10 AM numBytes = 9
2016-08-14 07:25:10.260 7:25:10 AM 01 10 AF 02 00 2A 64 00
2016-08-14 07:25:10.260 7:25:10 AM Calling Read
2016-08-14 07:25:10.268 7:25:10 AM numBytes = 9
2016-08-14 07:25:10.268 7:25:10 AM 07 0B 17 1B 08 09 0B 0C
2016-08-14 07:25:10.268 7:25:10 AM Calling Read
2016-08-14 07:25:10.276 7:25:10 AM numBytes = 9
2016-08-14 07:25:10.276 7:25:10 AM 07 00 00 00 00 20 68 01
2016-08-14 07:25:10.276 7:25:10 AM Calling Read
2016-08-14 07:25:10.316 7:25:10 AM numBytes = 9
2016-08-14 07:25:10.316 7:25:10 AM 01 D7 00 00 00 20 68 01
2016-08-14 07:25:10.316 7:25:10 AM Calling Read
2016-08-14 07:25:10.324 7:25:10 AM numBytes = 9
2016-08-14 07:25:10.324 7:25:10 AM 01 10 00 00 00 20 68 01
2016-08-14 07:25:10.324 7:25:10 AM Calling Read
2016-08-14 07:25:10.332 7:25:10 AM numBytes = 9
2016-08-14 07:25:10.332 7:25:10 AM 07 0B 17 1B 08 09 01 92
2016-08-14 07:25:10.332 7:25:10 AM Calling Read
2016-08-14 07:25:10.340 7:25:10 AM numBytes = 9
2016-08-14 07:25:10.340 7:25:10 AM 07 00 59 82 00 00 A3 02
2016-08-14 07:25:10.340 7:25:10 AM Calling Read
2016-08-14 07:25:11.652 7:25:11 AM numBytes = 9
2016-08-14 07:25:11.652 7:25:11 AM 01 D4 59 82 00 00 A3 02
2016-08-14 07:25:11.652 7:25:11 AM Calling Read
2016-08-14 07:25:11.660 7:25:11 AM numBytes = 9
2016-08-14 07:25:11.660 7:25:11 AM 03 16 0B 17 00 00 A3 02
2016-08-14 07:25:11.663 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:11.663 7:25:11 AM Calling Read
2016-08-14 07:25:11.668 7:25:11 AM numBytes = 9
2016-08-14 07:25:11.668 7:25:11 AM 07 1B 08 09 00 00 00 00
2016-08-14 07:25:11.668 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:11.668 7:25:11 AM Calling Read
2016-08-14 07:25:11.676 7:25:11 AM numBytes = 9
2016-08-14 07:25:11.676 7:25:11 AM 07 00 00 14 22 00 0C 01
2016-08-14 07:25:11.676 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:11.676 7:25:11 AM Calling Read
2016-08-14 07:25:11.684 7:25:11 AM numBytes = 9
2016-08-14 07:25:11.684 7:25:11 AM 04 01 07 83 01 00 0C 01
2016-08-14 07:25:11.684 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:11.684 7:25:11 AM Calling Read
2016-08-14 07:25:14.684 Data read loop: Operation timed out.
2016-08-14 07:25:14.684 7:25:14 AM Calling Read
2016-08-14 07:25:17.284 Sending heartbeat
2016-08-14 07:25:17.292 7:25:17 AM numBytes = 9
2016-08-14 07:25:17.292 7:25:17 AM 01 D1 07 83 01 00 0C 01
2016-08-14 07:25:17.292 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:17.292 7:25:17 AM Calling Read
2016-08-14 07:25:17.508 7:25:17 AM numBytes = 9
2016-08-14 07:25:17.508 7:25:17 AM 01 D7 07 83 01 00 0C 01
2016-08-14 07:25:17.508 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:17.508 7:25:17 AM Calling Read
2016-08-14 07:25:17.516 7:25:17 AM numBytes = 9
2016-08-14 07:25:17.516 7:25:17 AM 05 10 0B 17 1B 08 0C 01
2016-08-14 07:25:17.516 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:17.517 7:25:17 AM Calling Read
2016-08-14 07:25:17.524 7:25:17 AM numBytes = 9
2016-08-14 07:25:17.524 7:25:17 AM 07 09 02 94 00 55 82 00
2016-08-14 07:25:17.524 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:17.524 7:25:17 AM Calling Read
2016-08-14 07:25:17.532 7:25:17 AM numBytes = 9
2016-08-14 07:25:17.532 7:25:17 AM 03 00 A2 02 00 55 82 00
2016-08-14 07:25:17.532 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:17.532 7:25:17 AM Calling Read
2016-08-14 07:25:18.508 7:25:18 AM numBytes = 9
2016-08-14 07:25:18.508 7:25:18 AM 01 D7 A2 02 00 55 82 00
2016-08-14 07:25:18.508 Data read loop: Index was outside the bounds of the array.
2016-08-14 07:25:18.508 7:25:18 AM Calling Read
2016-08-14 07:25:18.516 7:25:18 AM numBytes = 9
2016-08-14 07:25:18.516 7:25:18 AM 05 10 0B 17 1B 08 82 00
It appears from the log that an 'Index outside the bounds of the array' error starts appearing at 2016-08-14 07:25:11.663. Although there are a number of 'Operation Timed out' errors at various points but these seem to happen throughout the log. I will get the zip of the full folder to you as soon as possible.

P.S. Like the new forum. Should I update to the latest MX now or wait for you to investigate the current issue?

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Mon 15 Aug 2016 4:22 pm
by NeilThomas
MXdiags ZIOP file attached.
I have deleted most entries before Saturday - error occurs @ 7:24 on on Sunday.

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Mon 15 Aug 2016 6:16 pm
by steve
At the time you've noticed that it starts going wrong, the data stream comes in a slightly different pattern. From what I remember of the protocol, it looks valid, it's just that MX isn't handling it. It's a 'history data available' packet, which shouldn't actually occur during 'live' running, but I know that the WMR200 does do this sometimes. Normally, MX copes with this, but the unusual situation is that the packet (actually just a single byte) is tacked on to the end of the previous packet. This is valid, but MX doesn't spot it and then gets out of sync and just keeps reading the data and stuffing it into a buffer - which eventually overflows, hence the 'outside the bounds of the array' error. It's presumably some kind of timing change which causes it to happen.

I'll have a look at the code with a view to fixing it, and possibly do a release with just this fix. I don't know when that will be, I'm a bit busy this week sorting out my retirement, and I'm in Manchester next week, actually retiring. But I'll see what I can do. It's actually good to have a real, definable bug to fix for a change.

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Tue 16 Aug 2016 7:38 am
by NeilThomas
steve wrote:At the time you've noticed that it starts going wrong, the data stream comes in a slightly different pattern. From what I remember of the protocol, it looks valid, it's just that MX isn't handling it. It's a 'history data available' packet, which shouldn't actually occur during 'live' running, but I know that the WMR200 does do this sometimes. Normally, MX copes with this, but the unusual situation is that the packet (actually just a single byte) is tacked on to the end of the previous packet. This is valid, but MX doesn't spot it and then gets out of sync and just keeps reading the data and stuffing it into a buffer - which eventually overflows, hence the 'outside the bounds of the array' error. It's presumably some kind of timing change which causes it to happen.

I'll have a look at the code with a view to fixing it, and possibly do a release with just this fix. I don't know when that will be, I'm a bit busy this week sorting out my retirement, and I'm in Manchester next week, actually retiring. But I'll see what I can do. It's actually good to have a real, definable bug to fix for a change.
Interestingly, I had an iTunes upgrade notification this morning (even though I had thought I'd turned off auto upgrades), and it hasn't thrown the system so, obviously not upgrades that cause the problem. Thanks for the work you are putting into this and from a fellow retiree, enjoy your retirement although I doubt you'll find you'll be less busy.

Also, while I remember, there is a small logic error in the charts.js file for temperature (same applies to the cumuluscharts.js file for the website). You have done the calculation for freezing but then when drawing the axis, use '0' to select blue or red for the labels rather than the variable 'freezing'.

Neil

Re: Data stopping on a Win 10 and Cumulus MX system

Posted: Wed 17 Aug 2016 7:36 pm
by steve
I've uploaded build 3041, which hopefully fixes the WMR200 problem, and also the label colouring problem(s).