PCD loader does not work in Microsoft Edge.
Works in Chrome.
Can you please check if this version is working on your system:
https://raw.githack.com/Mugen87/three.js/dev29/examples/webgl_loader_pcd.html
Checked.
SCRIPT5025: The URI to be decoded is not a valid encoding
Um, it seems the following line in LoaderUtils.decodeText()
produces the runtime error:
Just returning the variable s
seems to solve the issue.
@donmccurdy #12934 introduced the usage of decodeURIComponent()
and escape()
. However, when I remove the usage of TextDecoder
from LoaderUtils.decodeText()
so the alternative code path is always used, I see the same error with other loaders. In Chrome, webgl_loader_ply
reports an Uncaught URIError: URI malformed
which is essentially the same error reported in Edge. It seems the current fallback does not properly handle all use cases.
@k0rzun1n Can you please verify if https://threejs.org/examples/webgl_loader_ply.html throws the same error on your machine?
@Mugen87 It does.
12934 introduced the usage of decodeURIComponent() and escape() ...
Hm. That patch avoids failures when the string contains multi-byte characters, but introduces failures here. It was never a great fix for the former, but I don't know of another... should we just surround this in a try/catch?
try {
return decodeURIComponent( escape( s ) );
} catch ( e ) {
console.warn( 'THREE.LoaderUtils: Lorem ipsum...', e );
return s;
}
Alternative solutions for multi-byte characters would be welcome, but be aware that character-by-character iteration may have performance implications.
This could also be solved by waiting for the Chromium-based Edge...?
Can we still get some crutch for all the cave people that won't update?
This could also be solved by waiting for the Chromium-based Edge...?
I think so. But adding a simple try/catch seems appropriate to me in order to make the current method more robust.
Ups, we totally missed #13764 馃槄
However, I think I vote for the try/catch solution since other loaders like PLYLoader
will just work and do not need an enhancement.
I prefer the try/catch over using an isASCII
flag suggested in #13764. 馃憤
It still doesn't work though.
The fix is not in production yet. Can you please try it with the dev
version?
https://raw.githack.com/mrdoob/three.js/dev/examples/webgl_loader_pcd.html
@Mugen87 SCRIPT5025: The URI to be decoded is not a valid encoding
The build files in dev
were not updated yet, 81e184c73b29c1b07c8e9fc3904c5855a65d44ee
Please try it again.
Yeah, it works now.
Most helpful comment
Yeah, it works now.
