Skip to content

Editor crashes if there's a shader error #2298

Closed
@JasonGoemaat

Description

@JasonGoemaat

p5.js version

v1.7.0

What is your operating system?

Windows

Web browser and version

Chrome -114.0.5735.199

Actual Behavior

An error in javascript or a shader causes a crash to an empty white page with this in the console:

Uncaught TypeError: Failed to execute 'useProgram' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLProgram'

Expected Behavior

An error in the console which is visible on the page.

Steps to reproduce

Steps:

  1. Create new project
  2. Add this to draw() or anything that will cause an error like using an integer like 1 instead of 1.0 in a shader: throw new Error("Test");
  3. Hit the play button

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions