Skip to content

WebGL: INVALID_OPERATION on entity despawn on wasm targetΒ #210

Closed
@Dimchikkk

Description

Not sure if this is the issue of this repo or other underlying libs.

Basically, the entity was created like so:

            let main = shapes::Line(start, end);
            commands.spawn((
                ShapeBundle {
                    path: GeometryBuilder::build_as(&main),
                    ..default()
                },
                arrow_meta,
                Stroke::new(Color::BLACK, 2.0),
            ));

Then, it was removed like so: commands.entity(entity).despawn();

Then, I'm getting:

WebGL: INVALID_OPERATION: drawArrays: no buffer is bound to enabled attribute

and

WebGL: INVALID_OPERATION: drawArraysInstanced: no buffer is bound to enabled attribute

in Chrome browser console.

Creation/removal entities using ShapeBundle works perfectly on desktop target.

The issue can be reproduced by creating two rectangles, connecting them by arrow and then removing one rectangle: https://staffengineer.github.io/rusticify/ (after WebGL error UI stops responding as expected).

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions