System.ArgumentException: 'Object must be of type UInt32' when resizing MicroChart to 0

Micro Charts for WPF Forum

Posted 5 years ago by Justin Klein
Version: 19.1.0681
Avatar

I have a simple MicroXYChart in my application:

<actichart:MicroXYChart><actichart:MicroLineSeries ItemsSource="{Binding AlgGain_ProfileForGraph}" MarkerVisibility="All" /></actichart:MicroXYChart>

It's in a ToolWindow of a Docking/MDI application.  When I resize my entire application down to "0" (i.e. grab the lower-right of the window and drag all the way to the top-left, making it as small as it can be), then slowly start expanding, I often get a System.ArgumentException: 'Object must be of type UInt32.'  The stack trace shows that it's coming from ActiproSoftware.MicroCharts.Wpf.dll!ActiproSoftware.Windows.Controls.MicroCharts.MicroXYDataPointCollectionView.Initialize().

Here's the bulk of the stacktrace: (link removed)

Here's a video showing how to cause it: (link removed)

Note: it doesn't happen every single time, sometimes you have to do the resizing several times before it does - but it doesn't take very many tries. It seems to happen more reliably when you expand the window slowly.

[Modified 2 years ago]

Comments (6)

Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Justin,

My guess is that it's happening in an internal DataTypeHelper.Compare method call.  That being said, we'd probably need a new simple sample project that shows it happening to debug the scenario and make a proper fix.

Please make a new simple sample project that shows the issue occurring along with reproduction steps, and send that over to our support address, mentioning this thread.  Be sure to exclude the bin/obj folders from the ZIP you send, and rename the .zip file extension so it doesn't get spam blocked.  Then we will debug with that and get back to you with any questions or results.


Actipro Software Support

Posted 5 years ago by Justin Klein
Avatar

Just to confirm: does this mean it's likely a bug that would need to be fixed in an updated library (rather than i.e. a flag or a setting I'd be able to change in my version)?

If so, if I have a license that's beyond its 1 year, does that mean getting the fix would require purchasing a brand new $649 license?

Before I invest too much time into building a sample app or whittling out the proprietary code from our main one, I'd like to find out how we may or may not actually benefit from the fix (as a full new license might be more than my employer is willing to cover for one corner-case issue :))

Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Justin,

The fix would be in the latest 2019.1 codebase.  That being said, if we had a simple repro that showed it and narrowed down the cause, we might also be able to tell you how you could work around it in your version if there is a possibility of such. 

You could also try our 2019.1 evaluation to see if it's already been fixed, but I don't believe we've altered that particular method in the past couple years.


Actipro Software Support

Posted 5 years ago by Justin Klein
Avatar

Sent.

Answer - Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Justin,

Thanks for the sample.  We were able to fix the bug for the next maintenance release.

The problem is caused by it trying to perform aggregation on the UInt32 type.  You could either turn off aggregation on those charts, or switch to using Int32 or Double-based data for the charts as a workaround in the older version.


Actipro Software Support

Posted 5 years ago by Justin Klein
Avatar

Perfect, turning off aggregation fixes it.  Thanks!

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.