matthewhammer / MirrorGarden

Live programming engine built with Motoko for Internet Computer canisters.
Apache License 2.0
5 stars 0 forks source link

MirrorGarden output may include Adapton-produced graphics #9

Closed matthewhammer closed 3 years ago

matthewhammer commented 3 years ago

bug report

Note: now found and fixed.

This new demo crashes my use of candid with an error about an infinite value.

Candid decoding error: Deserialize("There is an infinite loop in the record definition, the type is isomorphic to an empty type", "Trailing type: [I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10), I(4), U(1136381571), I(7), U(1269255460), I(10)]\nTrailing value: [19, 01, 03, 03, 00, 00, 00, 00, 00, 00, 01, 03, 03, 00, 03, 00, 00, 00, 00, 01, 03, 03, 00, 06, 00, 00, 00, 00, 01, 03, 03, 00, 09, 00, 78, 78, 00, 01, 03, 03, 00, 0c, 00, 00, 00, 00, 01, 03, 03, 03, 00, 00, 00, 00, 00, 01, 03, 03, 03, 03, 00, 00, 00, 00, 01, 03, 03, 03, 06, 00

The offending line in ic-mt uses a candid macro to decode the graphics, which seems to fail here.

Notably, ic-mt worked fine for other demos (e.g., the one modified here in this PR) and used the same type and similar-looking values (trees of rectangles).

It's not clear yet what is novel about this program, but the issue seems like it's within the Rust-based Candid deserializer logic, not these tools. Still not sure though.