Dieser Error kommt manchmal wenn ich im Vector Art etwas bearbeite, ich habe leider nicht rausgefunden wann es tatsächlich passiert.
Sobald diese Meldungen kommen, dann kommen sie auf jeden Fall die ganze Zeit (wenn ich etwas ändere, egal was).
Kleiner Bonus was nichts damit zu tun hat, aber gleich mitgenommen werden kann: Der "Add shape" Button im Insepctor ist sinnlos, diesen bitte entfernen, weil mit dem Pen Tool wird sowieso ein neues Shape erstellt (und bei einem leeren Shape habe ich sowieso keine Möglichkeit Punkte zu erstellen bzw. hinzuzufügen).
Dieser Error kommt manchmal wenn ich im Vector Art etwas bearbeite, ich habe leider nicht rausgefunden wann es tatsächlich passiert.
<img width="1324" alt="image.png" src="attachments/090b7b83-7970-4b91-a0e6-2dc1b1af2662">
Sobald diese Meldungen kommen, dann kommen sie auf jeden Fall die ganze Zeit (wenn ich etwas ändere, egal was).
Kleiner Bonus was nichts damit zu tun hat, aber gleich mitgenommen werden kann: Der "Add shape" Button im Insepctor ist sinnlos, diesen bitte entfernen, weil mit dem Pen Tool wird sowieso ein neues Shape erstellt (und bei einem leeren Shape habe ich sowieso keine Möglichkeit Punkte zu erstellen bzw. hinzuzufügen).
Done in 9e869df, wiki 09d1f97 (Vector Art, Architecture, Development).
The cause
The warning comes only where an object wears the drawing through a shader. In "Garden of Sacrifices" the object with "Vector art 2" in the demo scene has a shader as an override.
Every change draws the drawing anew as a picture and destroyed the picture before it.
The shader of that object keeps the old picture bound until the object itself is drawn again. Pixi then warns twice with every change.
Reproduced on a throwaway copy of that project: 6 warnings for 3 changes with the override, none without it. The copy is deleted again, the project itself was only read.
What changes
The warning. A replaced picture is freed only once no shader names it any more. That is right after the redraw as a rule, otherwise on the next ask. On the copy of the project no warning comes after the change, and no replaced picture is left waiting.
"Add shape" is gone, in both views of the inspector (the drawing and a shape). Delete shapes for several selected shapes stays.
Decided here
Under the list of shapes a second note says "The Pen draws a new shape." while only the asset is selected.
Under the hood
GeneratedPictures (src/viewport/generatedPictures.ts) takes two more callbacks. inUse says that a picture cannot be freed yet, soon runs a retry once whoever asked is done.
A replaced picture that is still in use waits in a list of its own.
TextureLibrary tells a bound picture by the listeners for change on its source. Under WebGL the bind groups are the only ones that listen there. The retry is a microtask.
The rule is asked for every drawn picture alike, whoever wears it.
Tests
gate (melektaus-atx) 211 files, 3219 tests, CHECK EXIT 0 (3209 + 10)
e2e 47,48 ALL PASSED - 113 checks
e2e 28,30,31,39,40,47,48 ALL PASSED - 350 checks (before the wording of the new note changed)
The first gate was red: an existing test read the wording of the note that had changed. Only three test files had been run after the change.
No full run and no smokes. The sum of 1668 (1667 + 1) in README and wiki is reckoned. 1667 is what CI counted for ec2fd90 (read in the log).
Ten unit tests, five of them against the real bind group of Pixi in tests/viewport/bound-pictures.test.ts.
One e2e check in block 47b-ii of module 47: a drawing worn through a shader, three changes, no warning. The check on "Add shape" now reads that there is no such button.
Not checked: a tilemap or a particle emitter holding a picture bound the same way. The rule asks for all alike, only the shader on an object was reproduced. Nothing was looked at after the build, the new note included.
Counter-check
Result
9 in the unit tests
all work
2 in the browser
all work. Without the change the new check counts 6 warnings
Done in `9e869df`, wiki `09d1f97` (*Vector Art*, *Architecture*, *Development*).
**The cause**
The warning comes only where an object wears the drawing **through a shader**. In "Garden of Sacrifices" the object with "Vector art 2" in the demo scene has a shader as an override.
- Every change draws the drawing anew as a picture and destroyed the picture before it.
- The shader of that object keeps the old picture bound until the object itself is drawn again. Pixi then warns twice with every change.
- Reproduced on a throwaway copy of that project: 6 warnings for 3 changes with the override, none without it. The copy is deleted again, the project itself was only read.
**What changes**
- **The warning.** A replaced picture is freed only once no shader names it any more. That is right after the redraw as a rule, otherwise on the next ask. On the copy of the project no warning comes after the change, and no replaced picture is left waiting.
- **"Add shape" is gone**, in both views of the inspector (the drawing and a shape). *Delete shapes* for several selected shapes stays.
**Decided here**
- Under the list of shapes a second note says "The Pen draws a new shape." while only the asset is selected.
**Under the hood**
- `GeneratedPictures` (`src/viewport/generatedPictures.ts`) takes two more callbacks. `inUse` says that a picture cannot be freed yet, `soon` runs a retry once whoever asked is done.
- A replaced picture that is still in use waits in a list of its own.
- `TextureLibrary` tells a bound picture by the listeners for `change` on its source. Under WebGL the bind groups are the only ones that listen there. The retry is a microtask.
- The rule is asked for every drawn picture alike, whoever wears it.
**Tests**
```
gate (melektaus-atx) 211 files, 3219 tests, CHECK EXIT 0 (3209 + 10)
e2e 47,48 ALL PASSED - 113 checks
e2e 28,30,31,39,40,47,48 ALL PASSED - 350 checks (before the wording of the new note changed)
```
- **The first gate was red:** an existing test read the wording of the note that had changed. Only three test files had been run after the change.
- No full run and no smokes. The sum of 1668 (1667 + 1) in README and wiki is reckoned. 1667 is what CI counted for `ec2fd90` (read in the log).
- Ten unit tests, five of them against the real bind group of Pixi in `tests/viewport/bound-pictures.test.ts`.
- One e2e check in block 47b-ii of module 47: a drawing worn through a shader, three changes, no warning. The check on "Add shape" now reads that there is no such button.
- **Not checked:** a tilemap or a particle emitter holding a picture bound the same way. The rule asks for all alike, only the shader on an object was reproduced. Nothing was looked at after the build, the new note included.
| Counter-check | Result |
|---|---|
| 9 in the unit tests | all work |
| 2 in the browser | all work. Without the change the new check counts 6 warnings |
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Dieser Error kommt manchmal wenn ich im Vector Art etwas bearbeite, ich habe leider nicht rausgefunden wann es tatsächlich passiert.
Sobald diese Meldungen kommen, dann kommen sie auf jeden Fall die ganze Zeit (wenn ich etwas ändere, egal was).
Kleiner Bonus was nichts damit zu tun hat, aber gleich mitgenommen werden kann: Der "Add shape" Button im Insepctor ist sinnlos, diesen bitte entfernen, weil mit dem Pen Tool wird sowieso ein neues Shape erstellt (und bei einem leeren Shape habe ich sowieso keine Möglichkeit Punkte zu erstellen bzw. hinzuzufügen).
Done in
9e869df, wiki09d1f97(Vector Art, Architecture, Development).The cause
The warning comes only where an object wears the drawing through a shader. In "Garden of Sacrifices" the object with "Vector art 2" in the demo scene has a shader as an override.
What changes
Decided here
Under the hood
GeneratedPictures(src/viewport/generatedPictures.ts) takes two more callbacks.inUsesays that a picture cannot be freed yet,soonruns a retry once whoever asked is done.TextureLibrarytells a bound picture by the listeners forchangeon its source. Under WebGL the bind groups are the only ones that listen there. The retry is a microtask.Tests
ec2fd90(read in the log).tests/viewport/bound-pictures.test.ts.