plugdata icon indicating copy to clipboard operation
plugdata copied to clipboard

Bug: Compiled Mode: abstractions with GoP are marked as incompatible

Open dromer opened this issue 2 months ago • 6 comments

But these should work just fine.

See these patches:

main.pd

#N canvas 827 239 734 565 12;
#X obj 125 219 abstraction1;
#X obj 128 69 vsl 17 128 0 127 0 0 empty empty empty 0 -9 0 10 #191919 #ffffff #ffffff 0 1;
#X floatatom 125 386 5 0 0 0 - - - 12;
#X obj 252 219 abstraction2;
#X floatatom 252 386 5 0 0 0 - - - 12;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 1 0 3 0;
#X connect 3 0 4 0;

abstraction1.pd

#N canvas 827 239 734 565 12;
#X obj 64 23 inlet;
#X obj 64 84 + 3;
#X obj 64 110 outlet;
#X obj 64 54 int;
#X connect 0 0 3 0;
#X connect 1 0 2 0;
#X connect 3 0 1 0;
#X coords 0 0 1 1 200 140 0;

abstraction2.pd

#N canvas 827 239 734 565 12;
#X obj 64 23 inlet;
#X obj 64 84 + 3;
#X obj 64 110 outlet;
#X obj 64 54 int;
#X connect 0 0 3 0;
#X connect 1 0 2 0;
#X connect 3 0 1 0;
#X coords 0 0 1 1 200 140 1 0 0;
Image

And in the console: Warning: object "abstraction2" is not supported in Compiled Mode

dromer avatar Oct 27 '25 18:10 dromer

I think the issue stems from here: https://github.com/plugdata-team/plugdata/blob/develop/Source/Objects/SubpatchObject.h#L95

When the object is marked as being a graph its type changes to the abstraction name, which is then not found in the compatible objects.

dromer avatar Oct 27 '25 19:10 dromer

Ok I think that's indeed the one. After closing and reopening the main patch the warning is gone. So it only seems to happen on propertyChanged().

dromer avatar Oct 27 '25 19:10 dromer

Here is the behavior I'm getting: It gives warning on opening the patch. Switching off compile mode updates it to remove the orange border. Switching on compile mode does not re-trigger the warning, but copy pasting the abstraction does, but only for the pasted abstraction. (code compiles and runs fine)

#N canvas 827 239 734 565 12;
#X obj 0 0 cnv 15 100 60 empty empty Audio\ IN\ L 20 12 0 14 #995d5b #e1e1e1 0;
#X obj 141 41 adc~ 1;
#X obj 141 77 *~ -1.2;
#X obj 141 111 outlet~ Audio signal from Left input;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X coords 0 0 1 1 100 60 2 0 0;

https://github.com/user-attachments/assets/9b90aaeb-0bb1-4bcd-9cf9-925d1cd1cb51

kisyaki avatar Oct 28 '25 12:10 kisyaki

I found a slightly different way in which it brakes. It does not flag objects that should be flagged when you switch to Compile mode. Only flags them when created, then don't un-flag them when switching out of Compiled mode but then and un-flags them when switching back to Compiled mode in which they should be flagged. (see screen cap where I'm using the hvcc incompatible [sigmund~]

I think this might be a separate issue, but possibly in the same chunk of code.

https://github.com/user-attachments/assets/506f3aef-6705-471f-afb5-babaec6f6fb1

kisyaki avatar Oct 28 '25 17:10 kisyaki

I think this might be a separate issue

I think I already told you on Discord that this is indeed completely different issue.

dromer avatar Oct 28 '25 18:10 dromer

I think this might be a separate issue

I think I already told you on Discord that this is indeed completely different issue.

oki! I created a new issue for this: https://github.com/plugdata-team/plugdata/issues/2207

kisyaki avatar Oct 28 '25 18:10 kisyaki