Can't use Color Datatype in Dataset tag anymore, error: 'Invalid DataType for Dataset.'

Hi, i hope you guys are having a good day!
TL;DR: Can’t use color datatype in a dataset Tag, is this a bug? Should i just use a workaround?

I was storing the vision’s easy chart configuration datasets into a dataset memory tag, it worked fine for arround a year, but during the New Year’s recess my client updated their gateway to version 8.1.13 and now i’m unable to use those tags, the problem seems to be on the “COLOR” column where if i remove it or change it to a string, i don’t get the error anymore, which is:

Error_TypeConversion("class java.awt.Color: Invalid DataType for Dataset.")

If i just copy the dataset from a new easy chart’s configuration into a new dataset tag, it also gives me the same error, i’ve also tried to restore an old backup, but it didn’t help either.

I was using this for a screen where the user can customize the chart and then all the configurations can be saved, so if it’s a bug, or it’s working as intended, is there another better method to do the same thing?
Here’s the full message when i try to run the save script or copy the dataset:


And here’s the screen, with my folder containing some of the mentioned tags:

Thank you for your time!

Hmm. I would think it’s related to the change discussed here java.sql.Timestamp value can't be added to dataset - #6 by Kevin.Herron

But java.awt.Color is explicitly allowed…

1 Like

Ah, java.awt.Color was missed in the original change, caught as a bug, then added back recently.

Sorry about the inconvenience. It should work in the 8.1.15 nightly or you can rollback and wait for 8.1.15 or work around this somehow.

2 Likes

Thank you for the quick reply, Kevin, i’m short on time but the workaround should’t take long since it seems that i just have to replace the column before writing and when reading the tag.

@leonardo.godoi @Kevin.Herron

We are also recently doing upgrades to 8.1.13 and we have this same issue.

Can you please show the work around?

There is no workaround. You’ll have to wait for a version with the fix to be out.

Did this end change not make it to released version 8.1.15 for java.awt.Color? I seem to still get this error.

Hmm… looking into this…

It does look like it should be in 8.1.15.

What are you trying to do and how is it failing?

On several templates I was using a memory tag of type dataset to store the style of fill paint for consistency across templates. This works on the gateway running version 8.1.3 of Ignition, but has not worked on the last few versions. It appears I can convert the column in the dataset from “java.awt.Paint” to “clr” and it resolves properly.

I get the error:
[null, Error_TypeConversion(“interface java.awt.Paint: Invalid DataType for Dataset.”), Tue Mar 08 16:30:03 EST 2022 (1646775003962)]

The dataset I’m trying to store is.
#NAMES
“State”,“animationIndex”,“animationDuration”,“fillPaint”
#TYPES
“I”,“I”,“I”,“java.awt.Paint”
#ROWS”,“12”
“0”,“0”,“1000”,“color(217,0,0,255)”
“1”,“0”,“1000”,“color(0,0,172,255)”
“2”,“0”,“1000”,“color(255,255,0,255)”
“3”,“0”,“1000”,“color(255,140,0,255)”
“4”,“0”,“1000”,“color(255,255,0,255)”
“5”,“0”,“1000”,“color(217,119,0,255)”
“6”,“0”,“1000”,“color(128,0,128,255)”
“7”,“0”,“1000”,“color(128,0,128,255)”
“8”,“0”,“1000”,“color(0,172,0,255)”
“9”,“0”,“1000”,“color(0,172,0,255)”
“10”,“0”,“1000”,“color(0,217,217,255)”
“11”,“0”,“1000”,“color(0,128,0,255)”

Change java.awt.Paint to java.awt.Color.

2 Likes

@matthew.byars
pturmel has the fix covered, but I am curious how java.awt.Paint came to be used in the first place. Do you know how the dataset was originally created? I want to get an idea of how prevalent this issue might be going forward.

Thanks,
Garth

1 Like

java.awt.Paint is the default data type created when using the style customizer for the fill paint for shapes, I then just copied the dataset generated by the style customizer into the tag.

I found after a version upgrade from 8.1.2 to 8.1.17 that this same behavior occurs with a dataset that includes a column of the ‘Locale’ datatype. This was a dataset copied from the .columnAttributesData property of a power table.