Can someone explain me why this project is having TypeErrors when there are no scripts etc in it?
All it has is one polygon and an ellipse…
This is what console gives upon run:
Project: hypeIssue.hypetemplate.zip (9.0 KB)
Weirdly, if you duplicate the ellipse, errors double. But if you delete either the polygon or the ellipse, errors disappear…
The runtime is a great hunk of code so… maybe you didn’t add code but there is clearly some bug. Interesting find. If I create an ellipse and a polygon in a fresh document I can’t reproduce. But running from your template… I can.
Seams like the runtime can’t resolve the svgPathElement (svgPathElementForElement in updateVectorShapePathProperties) it wants to apply initial values to… @jonathan.
Thanks for this report.
This is a bug, though aside from the erroneous logging is essentially harmless. It arrises when a non-vector shape tries to assign vector shape properties. The most likely cause of this that I found is if you did a ‘Convert to Vector Shape’ and then performed an undo. There’s probably a few other causes I can theoretically think of that will need to be protected against.
(The reason it does not show up if you only have the ellipse is that it will not use the full runtime version which contains the vector shape code, where the error occurs)
It has been filed to be addressed in a future version. Sorry and thanks again!
Yep, this is exactly what I did. I just did a test with a fresh document and managed to reproduce it:
- Create a vector shape (i.e. Polygon)
- Create a non-vector shape (i.e. Ellipse)
- Right-click the non-vector shape and select ‘Convert to Vector Shape’
- Preview project -> Console displays errors
No worries and thanks!
P.s. interestingly, when you try to convert the undoed/‘infected’ previously-vector-shape to vector again via ‘Convert to Vector Shape’, a dialog asking for confirmation to remove Inner HTML content pops up:
I can see in the data.plist that the ellipse now contains InnerHTML without anything inside:
p.p.s. because I like digging and because of … reasons: removing these items from data.plist got rid of the TypeErrors (removing any bezier items from the shape):
Yes, those are the exact repro steps I found!
Perhaps a bit of “inside baseball”… how properties get cleared out when not used is an area that isn’t super clean within the codebase and leads to situations like this. The assumption starting out was that all elements would just have all properties, but as various element types were added (including items like groups), this became very untrue.
Nice hack to resolve it!
Of course I should mention hand-editing the data.plist is unsupported and could lead to problems , though in this case should be okay.