gpu.js icon indicating copy to clipboard operation
gpu.js copied to clipboard

code suddently broke

Open florentmaye opened this issue 2 years ago • 3 comments

What is wrong?

I have created a CAD software based on gpu.js. It was working fine last few weeks. But suddently I'm getting errors like:

Uncaught Error: Error compiling fragment shader: ERROR: 0:584: 'normalize' : Name of a built-in function cannot be redeclared as function ERROR: 0:597: 'dot' : Name of a built-in function cannot be redeclared as function

What bother me is that I made no change to my code,. I'm using:

<script src="https://cdn.jsdelivr.net/npm/gpu.js@latest/dist/gpu-browser.min.js"></script>

So I was suspecting a new version broke it, but that doesn't seem to be the case (no new version) and forcing an older one doesn't change anything.

Of course I tried renaming the function causing this issue, but it creates other errors. At this state I'm not able to correct them as GPU.js error are opaque (CPU mode doesn't work anymore in my case), and I already have thousand lines of working code that make hard to investigate them.

How do we replicate the issue?

maybe try to create a function named 'dot', previously it wasn't creating an issue, but now it does

How important is this (1-5)?

5: my CAD software I spent a lot of time developping and I'm using for my business doesn't work anymore :'(

Expected behavior (i.e. solution)

If not coming directly from GPU.js (what I suspect), maybe a webgl API update broke everything? I try to force webgl1 context, but unsuccessfully. Any clue on how I could patch this?

Other Comments

Thank you for this great tool

florentmaye avatar Nov 02 '22 23:11 florentmaye

Weirdly, on other computers (with same browser up to date), this issue has not appeared.... I'm having a hard time identifying its cause

florentmaye avatar Nov 03 '22 09:11 florentmaye

I just started seeing this also. There's not much out there on Google about this error.

pmartin-cogility avatar Nov 03 '22 22:11 pmartin-cogility

Seems something between Google Chrome version 106.0.5249.119 -> 107.0.5304.87 current. Cause this issue to start popping up

amacciola avatar Nov 03 '22 22:11 amacciola