GouraudDirectional weird bug?!

hi,
i have stumbled on a situation that has me stumped. here’s what i did:
made a patch (works fine, hooray)
saved it
closed vvvv
opened the same patch
now i get errors?! tty renderer gives
{CODE(ln=>1)}
00:00:07 ERR : error in layer :EFFECTS:\GouraudDirectional.fx^
every frame.

alright, so i try to replace GouraudDirectional with itself in the patch (double-click & write the name). now i get:
{CODE(ln=>1)}
00:00:06 * : [event.call: error occured in TMex9RendererNode](event.call: error occured in TMex9RendererNode): Zugriffsverletzung bei Adresse 006DA788 in Modul ‘vvvv.exe’. Lesen von Adresse 00000004
then errors for all the pins that were connected, and
00:00:12 * : didn’t create node; [C:\Program Files\vvvv\mystuff\feedbackdemo\torusfeedback.v4p, C:\Program Files\vvvv\vvvv_40beta22\effects\GouraudDirectional.fx (ID: 58)](C:\Program Files\vvvv\mystuff\feedbackdemo\torusfeedback.v4p, C:\Program Files\vvvv\vvvv_40beta22\effects\GouraudDirectional.fx (ID: 58)): Variante oder sicheres Array ist gesperrt

yes, this is my :EFFECTS: dir, and GouraudDirectional.fx is there, so i don’t know why it couldn’t load. just to make sure, i downloaded beta22 again, and overwrote the file, but i still get the same thing. then, when i close vvvv (without saving), i get
{CODE(ln=>1)}
Anwendungsfehler
Exception EInvalidPointer in Modul vvvv.exe bei 000047C9.

now, if i delete the node, save, close vvvv, re-open and insert GouraudDirectional where it used to be, it works again… but the same thing happens whenever i close!
it only does this with the patch i’m working on, so i’ve attached it, but i have other patches with similar structure and no problems.
some extra spice into this weird bug:

  • i can right-click the GouraudDirectional node and see the code;
  • if i load the patch and get the problem, it goes away by creating a PhongDirectional in the same patch (not connected to anything)! but with this method, i still get the exception when closing v4, and if i save and reload it does not work anymore. even deleting phongdirectional and putting it back does not help - the only way is to save without phongdirectional and put it there after loading.
  • if i save the patch without a link between GouraudDirectional and the renderer, then load and insert the link, it works. but if i save with the link there, it does not.
  • replacing the GouraudDirectional with any other shading does not help.

can someone verify that this problem is reproducible? of course, hints would be greatly appreciated!

problem.zip (7.8 kB)

helo dEp,

attached is a workaround that seems to do ok.

you’re facing a known problem that we couldn’t get rid of yet. it occurs with circular (feedback) graphs that propagate directx-devices. so the problem is not related to the GouraudDirectional.fx but is a more general (hard to explain) one. essentially what the workaround does is to make sure that there is no circular reference in the first frame. hope that works for you.

workaround.zip (7.9 kB)