[Pkg-pascal-devel] Castle Game Engine 7.0-alpha.2, view3dscene 4.2.0 releases

Michalis Kamburelis michalis.kambi at gmail.com
Mon Oct 17 12:36:10 BST 2022


You added in Debian, as a build step, testing view3dscene/tovrmlx3d on
data of unrelated whitedune-docs package. The problematic file is
/usr/share/doc/whitedune-docs/docs/x3d/CADGeometryPROTO.wrl.gz , as I
see.

1. It contains a "EXTERNPROTO MetadataString" statement that refers to
"http://www.web3d.org/x3d/content/examples/Basic/development/MetadataPrototypes.wrl#MetadataString"
. To read it, X3D browser must make a http(s) request. It also
specifies as a 1st option to use local file "MetadataPrototypes.wrl",
but the file "MetadataPrototypes.wrl" is missing.

"""
EXTERNPROTO MetadataString [
  # [appinfo] MetadataString contains a set of strings in the value field.
  exposedField SFString name
  exposedField MFString value
  exposedField SFString reference
  exposedField SFNode metadata # [appinfo] Metadata node only
][
  "MetadataPrototypes.wrl#MetadataString"
  "http://www.web3d.org/x3d/content/examples/Basic/development/MetadataPrototypes.wrl#MetadataString"
  "MetadataPrototypes.x3d#MetadataString"
  "http://www.web3d.org/x3d/content/examples/Basic/development/MetadataPrototypes.x3d#MetadataString"
 ]
"""

Note: This just results in a warning. tovrmlx3d actually never does
http(s) requests, even regardless of Debian's reprodicible builds. I
have just added --enable-downloads command-line option just now (so
one can do "tovrmlx3d ./CADGeometryPROTO.wrl --enable-downloads"), but
that is a non-solution for this problem, since reprodicible builds
prohibit this for testing as you say.

Proposed solutions:
A. Do nothing. This just results in a few warnings.

B. Place MetadataPrototypes.wrl in the directory of the tests
(/usr/share/doc/whitedune-docs/docs/x3d/). Just get it from
http://www.web3d.org/x3d/content/examples/Basic/development/MetadataPrototypes.wrl
. This way tovrmlx3d (or any other VRML/X3D browser) will not have to
download it.

C. Remove the "EXTERNPROTO MetadataString" block. Castle Game
Engine/tovrmlx3d/view3dscene don't need it. MetadataString is an X3D
node, and we allow it in VRML 2 too automatically, no need for any
"EXTERNPROTO MetadataString". Note: This solution is good for Castle
Game Engine/tovrmlx3d/view3dscene, but other VRML/X3D browsers may not
tolerate it. I didn't check if whitedune would tolerate it.

2. The real error, that breaks reading, is:

tovrmlx3d: Warning: VRML/X3D: Error when reading, will skip the rest
of X3D file: Error at line 158 column 73: Expected string, got "true"

Reason: There's a string with missing quoting at that line in
CADGeometryPROTO.wrl .

"""
    url [ "javascript:
// ### X3D Browser.print() not supported by all VRML97 viewers,
instead simply use print()


function initialize()
{
    //colorPerVertex ignored in IndexedQuadSet, and always treated as "true"
    RenderedIQS.colorPerVertex = true;
....
"""

The "true" above should be \"true\" , i.e. you need to escape the
double quotes with backslashes. Otherwise this is not valid VRML file.

Once you do this, there's a similar case with "malloc" -> \"malloc\"
at line 201.

And again "true" -> \"true\" at line 335.

And again "malloc" -> \"malloc\" at line 382 (this look this block was
copy-pasted).

After fixing 1 and 2, the output of "tovrmlx3d
./CADGeometryPROTO.wrl..." is clean.

Regards,
Michalis

niedz., 16 paź 2022 o 14:21 Abou Al Montacir <abou.almontacir at sfr.fr>
napisał(a):
>
> Hi Michalis,
>
> There is still an issue with building view3dscene.
> tovrmlx3d: Warning: VRML/X3D: Cannot load external prototype from URL "http://www.web3d.org/x3d/content/examples/Basic/development/MetadataPrototypes.x3d": Downloading network resources (from "http" or "https" protocols) is not enabled
> tovrmlx3d: Warning: VRML/X3D: Error when reading, will skip the rest of X3D file: Error at line 158 column 73: Expected string, got "true"
> tovrmlx3d: Warning: VRML/X3D: Cannot load external prototype from URL "file:///build/view3dscene-4.2.0/debian/tmp/whitedune/whitedune-docs/docs/x3d/MetadataPrototypes.wrl": Error when downloading "file:///build/view3dscene-4.2.0/debian/tmp/whitedune/whitedune-docs/docs/x3d/MetadataPrototypes.wrl": Exception "EFOpenError":
> Unable to open file "/build/view3dscene-4.2.0/debian/tmp/whitedune/whitedune-docs/docs/x3d/MetadataPrototypes.wrl": No such file or directory
> tovrmlx3d: Warning: VRML/X3D: Cannot load external prototype from URL "http://www.web3d.org/x3d/content/examples/Basic/development/MetadataPrototypes.wrl": Downloading network resources (from "http" or "https" protocols) is not enabled
> tovrmlx3d: Warning: VRML/X3D: Cannot load external prototype from URL "file:///build/view3dscene-4.2.0/debian/tmp/whitedune/whitedune-docs/docs/x3d/MetadataPrototypes.x3d": Error when downloading "file:///build/view3dscene-4.2.0/debian/tmp/whitedune/whitedune-docs/docs/x3d/MetadataPrototypes.x3d": Exception "EFOpenError":
> Unable to open file "/build/view3dscene-4.2.0/debian/tmp/whitedune/whitedune-docs/docs/x3d/MetadataPrototypes.x3d": No such file or directory
> tovrmlx3d: Warning: VRML/X3D: Cannot load external prototype from URL "http://www.web3d.org/x3d/content/examples/Basic/development/MetadataPrototypes.x3d": Downloading network resources (from "http" or "https" protocols) is not enabled
>
> It looks like the test tries to download some data from intrnet, which is normally not allowed as it breaks the reproducible build process.
>
> Can you help to fix that please?
>
> --
>
> Cheers,
> Abou Al Montacir
>
> _______________________________________________
> Pkg-pascal-devel mailing list
> Pkg-pascal-devel at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-pascal-devel



More information about the Pkg-pascal-devel mailing list