Forum

Dynamic Enum bugs

devvvv
fixed-for-upcoming
vl

#1

Dynamic Enums have been a thing in VL for some time (albeit exotic), for example here.

For a current project, a similar mechanism was used to handle groupings of items: multiple Items can be grouped, this grouping is saved to disc, and from this listing, a number of enums is generated so all groups can easily be accessed while patching behaviours around them grouped items.

Now this all works swell, but on restart all nodes that contain an enum iobox of said Grouping Enum turn red, almost as if the enums have not been loaded yet, so the vl compiler does not know what to do with an actual mention of such an enum, and consequently colors the containing node red (and ofc all parent nodes, up to the vvvv plugin entry point).

As soon as you actually look at the bottommost nodes with the error, the enum will recover instantly: since the groups are loaded, it will now solidly compile, and the node turns grey.

I tried different things, such as moving the groupfile loading to Create, but nothing helped. So my guess is, that enum selection in vl, as soon as dynamic enums are involved, is a little broken.
Enums that have not yet a valid entry will never recover from fault (at least visually) until the containing patch is actually opened in the editor.

So please improve the auto-healing of faulty enum ioboxes.
In the meantime, is there a way to do a work around, like loading the enums somehow before anything else in the patch is executed?

enum.zip (2.3 MB)


#2

it sounds like a bug in our error reporting code… will make an issue.
do you have a little patch that can demonstrate this behavior? like loading a list of dynamic enum entries from a text file with a bit of delay and showing that the patches don’t recover from the initial error of unavailable enum entries.


#3

yes, it is called enum.zip and contains everything you need


#4

hah, too early for me :) thanks!


#5

one workaround i found that works well while developing is, right click in the topmost patch and select “Recompile” in the context menu. this will trigger the missing error reporting update until we fix that.


#6

yes, that works. thanks

edit: it turned out it didn’t help as much, because it recompiles other vl files as well. so all vl plugins in my project will need to reinitialize, but some can’t (because I tend to de-evaluate modules with vl plugins configuring the project except on OnOpen, because they can be quite costly in terms of performance).
so hitting Recompile during runtime will spawn a crazy amount of Nil in my case, which brings the project to a halt.

so still waiting for a fix


#7

new alpha has this fixed.