Page 1 of 1

CumulusMX 3041 crash on startup

Posted: Tue 23 Aug 2016 11:37 pm
by Werk_AG
Hi Steve

I installed today build 3041 of the CumulusMX, but I get a crash everytime I try to start it. It happens in Windows, on Linux (PI) it seems to start but don't communicate with the station.
I'm using an emulated David Vantage, build 3038 is working fine. Unfortunately I haven't tested build 3039 and 3040, so I don't know if the problem was started with the build 3041.

Here is a picture of what happens:

Image

Looking at the change log from 3038 to 3041 I don't see anything that could affect the serial connection. Any idea?

Re: CumulusMX 3041 crash on startup

Posted: Wed 24 Aug 2016 10:00 am
by steve
Ah, oops. I added a timeout of one second reading the data from Davis stations, to make sure that reads don't hang. Is it possible with your emulation that a read could take more than one second?

Re: CumulusMX 3041 crash on startup

Posted: Thu 25 Aug 2016 9:23 pm
by hornychz
Hi,

I have maybe the same problem too (maybe because I have the same weather station ? ;) Now I better get back to 3040 ...

Kind Regards
Zdenek

Re: CumulusMX 3041 crash on startup

Posted: Mon 29 Aug 2016 11:46 pm
by Werk_AG
hornychz wrote:Hi,

I have maybe the same problem too (maybe because I have the same weather station ? ;) Now I better get back to 3040 ...

Kind Regards
Zdenek
Hi Zdenek,

So, now we know that the problem was started with build 3040.
Thanks.

Re: CumulusMX 3041 crash on startup

Posted: Mon 29 Aug 2016 11:57 pm
by Werk_AG
steve wrote:Ah, oops. I added a timeout of one second reading the data from Davis stations, to make sure that reads don't hang. Is it possible with your emulation that a read could take more than one second?
Hi Steve,

It's possible that some readings can take more than one second, at least when Cumulus is starting.

Here is an extract of the log in the MXdiags folder. It always crash at that point, which seems to be just before it attempts to read the console time

2016-08-23 23:54:26.437 Station type = Davis
2016-08-23 23:54:26.437 LOOP2 disabled
2016-08-23 23:54:26.437 Serial device = COM12
2016-08-23 23:54:26.599 Connected OK
2016-08-23 23:54:26.619 Reading firmware version
2016-08-23 23:54:26.926 FW version = 1.90
2016-08-23 23:54:26.926 Last update time = 23/08/2016 23:54:26
2016-08-23 23:54:26.932 Setting console time
2016-08-23 23:54:27.034 Wait for ACK...
2016-08-23 23:54:27.042 ACK received
2016-08-23 23:54:27.043 Wait for ACK...

Here is an extract of the log, with CumulusMX build 3028

2016-08-24 00:16:10.839 Station type = Davis
2016-08-24 00:16:10.839 LOOP2 disabled
2016-08-24 00:16:10.839 Serial device = COM12
2016-08-24 00:16:10.915 Connected OK
2016-08-24 00:16:10.918 Reading firmware version
2016-08-24 00:16:11.224 FW version = 1.90
2016-08-24 00:16:11.224 Last update time = 24/08/2016 00:16:10
2016-08-24 00:16:11.230 Setting console time
2016-08-24 00:16:11.332 Wait for ACK...
2016-08-24 00:16:11.338 ACK received
2016-08-24 00:16:11.340 Wait for ACK...
2016-08-24 00:16:14.937 ACK received
2016-08-24 00:16:14.942 Reading console time
2016-08-24 00:16:16.042 0B-10-00-18-08-74-3F-3F
2016-08-24 00:16:16.043 Console clock: 24/08/2016 00:16:11

Re: CumulusMX 3041 crash on startup

Posted: Tue 30 Aug 2016 8:51 am
by steve
It looks like it takes over the three seconds to receive the ACK in response to sending the new time setting. I'll look at increasing the default timeout and making it configurable in Cumulus.ini in the next build. I'd assumed that one second would be long enough.

I'm assuming that no-one with a Davis station has hit this - or perhaps no-one with a Davis is running the latest build yet. I wasn't easily able to test it myself as I have an IP logger plugged in. I'll try it with my USB logger later today.

Re: CumulusMX 3041 crash on startup

Posted: Tue 30 Aug 2016 11:25 am
by steve
I've tried the latest build with my VP2 and a USB logger, and the responses are very quick, much less than a second.

2016-08-30 12:22:36.263 Setting console time
2016-08-30 12:22:36.364 Wait for ACK...
2016-08-30 12:22:36.372 ACK received
2016-08-30 12:22:36.372 Wait for ACK...
2016-08-30 12:22:36.378 ACK received

So I'm going to leave the default timeout at 1 second, but add a Cumulus.ini setting to allow it to be set to a longer period where required.

Re: CumulusMX 3041 crash on startup

Posted: Wed 31 Aug 2016 4:09 am
by Werk_AG
Thank you Steve, that option in Cumulus.ini will be much appreciated by me and all that are using the WeatherDuino.
Anyway I'm gonna check my code and try to improve the response time to the Set Time and Get Time command.

Re: CumulusMX 3041 crash on startup

Posted: Thu 01 Sep 2016 3:03 pm
by hornychz
Hi Steve and Werk_AG,

if is it interesting for you, here is some parts from my logs (I recall that I also use weatherDuino).
Version 3040 is without this issue:

2016-08-23 05:00:15.352 Station type = Davis
2016-08-23 05:00:15.352 LOOP2 disabled
2016-08-23 05:00:15.353 Serial device = /dev/ttyUSB0
2016-08-23 05:00:15.370 Connected OK
2016-08-23 05:00:15.376 Reading firmware version
2016-08-23 05:00:15.691 FW version = 1.90
2016-08-23 05:00:15.696 Reading reception stats
2016-08-23 05:00:15.997 0 0 0 0 0
2016-08-23 05:00:15.999 Last update time = 23/08/2016 05:00:00
2016-08-23 05:00:16.008 Setting console time
2016-08-23 05:00:16.109 Wait for ACK...
2016-08-23 05:00:16.116 ACK received
2016-08-23 05:00:16.118 Wait for ACK...
2016-08-23 05:00:19.714 ACK received
2016-08-23 05:00:19.722 Reading console time
2016-08-23 05:00:20.023 14-00-05-17-08-74-3F-29
2016-08-23 05:00:20.024 Console clock: 23/08/2016 05:00:20
2016-08-23 05:00:20.025 Start reading archive data
2016-08-23 05:00:20.029 Reading archive data


But in version 3041 I have the same problem as Werk_AG has:

2016-08-19 14:10:55.567 Station type = Davis
2016-08-19 14:10:55.567 LOOP2 disabled
2016-08-19 14:10:55.567 Serial device = /dev/ttyUSB0
2016-08-19 14:10:55.585 Connected OK
2016-08-19 14:10:55.590 Reading firmware version
2016-08-19 14:10:56.811 FW version = 1.90
2016-08-19 14:10:56.815 Reading reception stats
2016-08-19 14:10:57.116 0 0 0 0 0
2016-08-19 14:10:57.118 Last update time = 19/08/2016 13:55:00
2016-08-19 14:10:57.127 Setting console time
2016-08-19 14:10:57.228 Wait for ACK...
2016-08-19 14:10:57.235 ACK received
2016-08-19 14:10:57.237 Wait for ACK...


Regards
Zdenek

Re: CumulusMX 3041 crash on startup

Posted: Fri 02 Sep 2016 6:09 am
by Werk_AG
Hi Zdenek

It will be great if Steve will make the default timeout configurable in Cumulus.ini, however I've been working in the WeatherDuino code and managed to speed up the routines which cause the timeout error.
In a few days I will publish an updated WeatherDuino Pro2 package which works with CumulusMX build 3041

Regards
Werk_AG

Re: CumulusMX 3041 crash on startup

Posted: Fri 02 Sep 2016 8:51 am
by hornychz
If this works, at least one of you, it'll be great. If both leads, it will be amazing! :idea:
:)

Good luck!

Zdenek