Skip to content

[p5.js 2.0+ Bug Report]: Benchmark cleanup passes p5.model to freeGeometry #9041

Description

@Danyccsf

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • WebGPU
  • p5.strands
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

main branch (commit 92763e5)

Web browser and version

Google Chrome 150.0.7871.187 (Official Build, arm64)

Operating system

macOS 15.7.3 (Build 24G419)

Steps to reproduce this

Steps:

  1. Clone the p5.js repository and check out main at commit 92763e5bf.
  2. Install dependencies with npm install.
  3. Run: npx vitest bench test/bench/cpu_transforms.bench.js.
  4. Observe the FES validation message in the terminal output.

Snippet:

In test/bench/cpu_transforms.bench.js:

const shape = myp5.buildGeometry(drawCircles);
myp5.model(shape);
myp5.freeGeometry(myp5.model);

Observation:

The freeGeometry() function should receive the geometry instance created by buildGeometry(). Correcting the call to myp5.freeGeometry(shape) eliminates the validation messages and ensures a clean benchmark run.

Additional Context:

I discussed the finding with @davepagurek in the p5.js Discord. He confirmed that shape is the correct argument and asked that I create an issue before submitting a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions