sam210723 / goesrecv-monitor

Status monitor for goesrecv demodulator and decoder.
https://vksdr.com/goesrecv-monitor
MIT License
31 stars 8 forks source link

Monitor crashing after a few seconds #2

Closed threalboss closed 4 years ago

threalboss commented 5 years ago

HI, I just got this and whenever i connect to my pi the monitor will work for 1 second then crash. Any help?

robman501a commented 5 years ago

Hi, I have the same problem. I have Windows 10 x64 and .NET 4.6.1 is saying it's installed.

sam210723 commented 5 years ago

Reported via Twitter as well. Investigating...

Twitter Image 1

Twitter Image 2

Twitter Image 3

sam210723 commented 4 years ago

Verbose logging has been added in the v1.1 branch. It creates log.txt in the same directory as the executable.

I can send a compiled version to anyone experiencing this crash to try narrow down the cause.

sam210723 commented 4 years ago

Cleaned up JSON string processing in 2ca951be and fd6be9a. Seems to be more reliable based on log output. Waiting for user on Twitter to confirm the issue has been fixed.

threalboss commented 4 years ago

Should I re-download the 1.2 version and try and see if it is fixed?

sam210723 commented 4 years ago

That'd be great if you could. There's a pre-built debug version available at https://vksdr.com/downloads/goesrecv-monitor-debug.zip.

User on Twitter confirmed there is still an issue, however it's worth trying on another system. Log file can be sent to sam at vksdr dot com.

Are you also able to send me your goesrecv executable? I'd like to run it locally.

robman501a commented 4 years ago

Hi, I'm having the same issue and I am using v1.1. This was the only way that I could get it running for about 30 seconds. image

and when it crashed, I found this in the event logs. I'm running Windows 10 x64 and the latest version of .NET.

Application: goesrecv-monitor.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentOutOfRangeException
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument, System.ExceptionResource)
   at goesrecv_monitor.Stats.DecoderLoop()
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()
sam210723 commented 4 years ago

Hi, thanks for the event log info. Could you please follow the instructions here to enable logging, then try running the program again. It will create log.txt with extra info I can use for debugging.

Email this file to sam at vksdr dot com and I'll try find a fix for this crash!

robman501a commented 4 years ago

Okay, I sent you all the data I could find.

Adrinus commented 4 years ago

Same issue here: [07/05/2020 17:25:39.094] [DECODER] Error parsing JSON: Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter: ". Path 'viterbi_errors', line 1, position 96. at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote) at Newtonsoft.Json.JsonTextReader.ParseProperty() at Newtonsoft.Json.JsonTextReader.ParseObject() at Newtonsoft.Json.JsonTextReader.Read() at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options) at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings) at goesrecv_monitor.Stats.DecoderLoop() {"timestamp": "2020-05-07T21:25:38.162Z","skipped_symbols": 16417,"viterbi_errors": 2315,"reed_s

And

[07/05/2020 17:25:39.094] [DECODER] No JSON object found [07/05/2020 17:25:39.095] [DECODER] Error parsing JSON: Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter: ". Path 'skipped_symbols', line 1, position 72. at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote) at Newtonsoft.Json.JsonTextReader.ParseProperty() at Newtonsoft.Json.JsonTextReader.ParseObject() at Newtonsoft.Json.JsonTextReader.Read() at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options) at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings) at goesrecv_monitor.Stats.DecoderLoop() {"timestamp": "2020-05-07T21:25:38.358Z","skipped_symbols": 4143,"viterb

These are the only errors the log throws.

sam210723 commented 4 years ago

Ok interesting. Would you be able to send the full log to the email address a few comments back?

Adrinus commented 4 years ago

Sent. :)

sam210723 commented 4 years ago

Hi all,

I'll be releasing v1.2 tomorrow which receives data from goesrecv much more reliably. Each JSON string sent by goesrecv has an 8 byte header before it which indicates the length of the JSON string following the header. goesrecv-monitor will now read that length value first then receive the correct number of bytes for that JSON string. These bytes are then converted to ASCII and parsed like normal. Before, this header was being ignored then parsed as ASCII which is what created erroneous characters and null bytes in the JSON strings.

Socket bytes

This release also includes memory usage optimisations so the .NET garbage collector is called far less often.. In previous versions it was often called a few seconds after starting then multiple times per minute after that. Garbage collection only runs every few minutes now.

Memory usage snapshots Memory usage graph

It'd be great if someone can try this version out as I am still unable to recreate the fault here.

sam210723 commented 4 years ago

Released v1.2. Binary ZIP attached to release.