Voltage graph crashes after a while in 1.16.0.0

Feature requests / 3rd party software development
Post Reply
stephan
Posts: 10
Joined: Sun Feb 28, 2021 12:39 pm

Voltage graph crashes after a while in 1.16.0.0

Post by stephan »

Hi,

First a big thanks for your great products! I just received a PPB Advanced and already enjoyed it a lot :)
However, I found a minor software issue that I wanted to report.

I'm running the latest Software Version 1.16.0.0 with it and noticed the following behavior:

When the power tab with the voltage and current graphs stay open for a longer period of time (maybe 15-20min) an exception occurs and the voltage graph stops rendering. Instead a red cross is displayed. The exception can be ignored and the app continues to work, but the display of the graph never gets restored. I even saw the current graph disabled once as well, but the voltage graph always disappears for me after a while. Please find screenshots and the exception log below.
Would be great if could have a look at it!

Best regards,
Stephan
curves.png
curves.png (20.04 KiB) Viewed 4865 times
exception.png
exception.png (23.98 KiB) Viewed 4865 times

This is the crash log:

Code: Select all

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Windows.Forms.DataVisualization.Charting.ChartTypes.FastLineChart.Paint(ChartGraphics graph, CommonElements common, ChartArea area, Series seriesToDraw)
   at System.Windows.Forms.DataVisualization.Charting.ChartArea.Paint(ChartGraphics graph)
   at System.Windows.Forms.DataVisualization.Charting.ChartPicture.Paint(Graphics graph, Boolean paintTopLevelElementOnly)
   at System.Windows.Forms.DataVisualization.Charting.Chart.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
PPB
    Assembly Version: 1.16.0.0
    Win32 Version: 1.16.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Pegasus%20Astro/Pocket%20Powerbox/PPB.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 14.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4320.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Windows.Forms.DataVisualization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4200.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll
----------------------------------------
System.Management
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
User avatar
Evans
Site Admin
Posts: 325
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: Voltage graph crashes after a while in 1.16.0.0

Post by Evans »

Seems that the graph fails because it receives a malformed answer from the PPBADV controller
Are there any USB cable extensions between PPBADV and PC?
stephan
Posts: 10
Joined: Sun Feb 28, 2021 12:39 pm

Re: Voltage graph crashes after a while in 1.16.0.0

Post by stephan »

No, the Box is connected directly to the PC.
stephan
Posts: 10
Joined: Sun Feb 28, 2021 12:39 pm

Re: Voltage graph crashes after a while in 1.16.0.0

Post by stephan »

May be you can check your code if this could be the issue:

https://stackoverflow.com/questions/617 ... ot-execute
User avatar
Evans
Site Admin
Posts: 325
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: Voltage graph crashes after a while in 1.16.0.0

Post by Evans »

Please monitor info tab for exchanged commands.
Let me know if you can see any failed commands by the time you get this failure on these graphs.

I'll try to reproduce this issue tonight but to be honest we have zero reports (excluding this one) about this failure in the current release.
stephan
Posts: 10
Joined: Sun Feb 28, 2021 12:39 pm

Re: Voltage graph crashes after a while in 1.16.0.0

Post by stephan »

It just happened again, after about 20min since startup. I have 2 failed commands, but those were already displayed after about 5-10min. The exception however, occured about another 10min later, so I doubt it has to do with it.

Again, may be you should check your code to make sure the collection can never be modfied while iterating it?
stephan
Posts: 10
Joined: Sun Feb 28, 2021 12:39 pm

Re: Voltage graph crashes after a while in 1.16.0.0

Post by stephan »

It crashed again, this time with 0 failed commands. I also ran the diagnostics in between, with all devices connected. All green.
stephan
Posts: 10
Joined: Sun Feb 28, 2021 12:39 pm

Re: Voltage graph crashes after a while in 1.16.0.0

Post by stephan »

Sorry for bothering you again, but last night it was the temperature/dewpoint curve that crashed - after I had that tab open for a while... So the code that is rendering the curves definitely has an issue.

May be it is timing related and occurs more likely on slower machines. I'm using a rather low end laptop for image acquisition (Celeron N2830, 2.16GHz).

env-curves.png
env-curves.png (17.56 KiB) Viewed 4762 times
User avatar
Evans
Site Admin
Posts: 325
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: Voltage graph crashes after a while in 1.16.0.0

Post by Evans »

Unfortunatelly I cannot replicate your issue and we do not have similar reports for failures in graphs for the latest software.
What is the Windows OS version you have? Can you check if you have all Windows updates. Maybe it is related with the framework version you have
stephan
Posts: 10
Joined: Sun Feb 28, 2021 12:39 pm

Re: Voltage graph crashes after a while in 1.16.0.0

Post by stephan »

I'm running the latest Windows 10 Home version (20H2), build 19042.844
The versions of the .NET DLLs can best be seen in the stack trace I sent you above.

All I could offer is that you send me a debug version and I'll try to attach a debugger to it (if I get one installed on that weak machine...) to get more insight.

Looking at this type of exception, my assumption is, that your code that renders the graph and the code that adds new data points runs concurrently. So it may happen occasionally that the collection is updated while it is iterated for the purpose of displaying it. May be it's worth to have a look at that? I know it is difficult if you cannot reproduce it, but investigating the code just to see if there is the slightest chance that this actually could happen might be the only approach then.
stephan
Posts: 10
Joined: Sun Feb 28, 2021 12:39 pm

Re: Voltage graph crashes after a while in 1.16.0.0

Post by stephan »

Hi,

Meanwhile I switched to a different laptop. With the same result. During the first nightly session I kept the environment graph display open - with the result that it crashed with the same error again I reported above. This happened may be after one hour or so.

Is there any update on that issue from your side?

Regards,
Stephan
User avatar
Evans
Site Admin
Posts: 325
Joined: Wed Dec 02, 2020 3:06 pm
Contact:

Re: Voltage graph crashes after a while in 1.16.0.0

Post by Evans »

Unfortunatelly we cannot replicate it and we do not have other reports about this issue.
We'll check again why this might happen (how it is triggered)
stephan
Posts: 10
Joined: Sun Feb 28, 2021 12:39 pm

Re: Voltage graph crashes after a while in 1.16.0.0

Post by stephan »

Seems I'm not the only one seeing that issue:
viewtopic.php?f=8&t=179
Post Reply