#228 initialize ():FreeWRL got a SIGSEGV

closed-fixed
nobody
None
5
2012-08-04
2012-08-01
No

$ freewrl http://www.web3d.org/x3d/content/examples/Basic/ScriptConformance/ScriptNodeFieldControl-EcmaScript.x3d
fwl_startFreeWRL called
opengl version=2.1 Mesa 8.0.4
font directory=/usr/share/fonts/TTF
X3DParser: warning, line 999: trouble linking to containerField :geometry: of parent node type :Group: (specified in a :Text: node)X3DParser: warning, line 999: trouble linking to containerField :material: of parent node type :Group: (specified in a :Material: node)initialize ():
initialize ():FreeWRL got a SIGSEGV - can you please mail the file(s) to
freewrl-09@rogers.com with a valid subject line. Thanks.

Discussion

  • Simpler file with the same problem:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd">
    <X3D profile="Immersive" version="3.2"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"
    xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.2.xsd">
    <Scene>
    <Group>
    <Shape>
    <Appearance>
    <Material DEF="MAT" diffuseColor="0 0 1" />
    </Appearance>
    <Box />
    </Shape>
    <TouchSensor DEF="TS" />
    </Group>
    <Script DEF="SC" directOutput="true">
    <field accessType="inputOnly" name="isOver" type="SFBool" />
    <field accessType="initializeOnly" name="m" type="SFNode">
    <Material USE="MAT" />
    </field>
    <![CDATA[
    ecmascript:

    function isOver(val)
    {
    if (val)
    {
    m.diffuseColor = new SFColor(1,0,0);
    }
    else
    {
    m.diffuseColor = new SFColor(0,0,1);
    }
    }
    ]]>
    </Script>
    <ROUTE fromField="isOver" fromNode="TS" toField="isOver" toNode="SC" />
    </Scene>
    </X3D>

     
  • The simplified file only fails after moving the mouse cursor onto the box.
    More information with -DJAVASCRIPTVERBOSE (the point where the mouse is moved to the box is marked with ==========):

    opengl version=2.1 Mesa 8.0.4
    JSinit: script 0
    JSinit: script 0
    X3DParser: warning, line 999: trouble linking to containerField :material: of parent node type :Group: (specified in a :Material: node) JS runtime created,
    JS context created,
    JS global object created,
    JS standard classes initialized,
    JS error reporter set,
    VRML classes loaded,
    VRML Browser interface loaded,
    ActualrunScript script called at world_script/JScript.c:500 num: 0 cx 0x7f35842bd5f0 "function initialize() {}; function shutdown() {}; function eventsProcessed() {}; TRUE=true; FALSE=false; function print(x) {Browser.print(x)}; function println(x) {Browser.println(x)}; function getName() {return Browser.getName()}; function getVersion() {return Browser.getVersion()}; function getCurrentSpeed() {return Browser.getCurrentSpeed()}; function getCurrentFrameRate() {return Browser.getCurrentFrameRate()}; function getWorldURL() {return Browser.getWorldURL()}; function replaceWorld(x) {Browser.replaceWorld(x)}; function loadURL(x,y) {Browser.loadURL(x,y)}; function setDescription(x) {Browser.setDescription(x)}; function createVrmlFromString(x) {Browser.createVrmlFromString(x)}; function createVrmlFromURL(x,y,z) {Browser.createVrmlFromURL(x,y,z)}; function createX3DFromString(x) {Browser.createX3DFromString(x)}; function createX3DFromURL(x,y,z) {Browser.createX3DFromURL(x,y,z)}; function addRoute(a,b,c,d) {Browser.addRoute(a,b,c,d)}; function deleteRoute(a,b,c,d) {Browser.deleteRoute(a,b,c,d)}; ",
    runscript passed
    VRML browser initialized, thread 2355205888
    calling InitScriptField from thread 2355205888

    InitScriptField, num 0, kind inputOnly type SFBool field isOver value 1766225008
    finished InitScriptField
    calling InitScriptField from thread 2355205888

    InitScriptField, num 0, kind initializeOnly type SFNode field m value 1766225008
    in fieldSet, we have ElementRowSize 1 and individual elements 1
    JScript, for non-ECMA newname m, sending :new SFNode("(nil)"):
    addGlobalAssignProperty: cx: 0x7f35842bd5f0 obj 0x7f3588c03048 name "m", evaluate script "new SFNode("(nil)")"
    finished InitScriptField
    ActualrunScript script called at world_script/JScript.c:363 num: 0 cx 0x7f35842bd5f0 "

    function isOver(val)
    {
    if (val)
    {
    m.diffuseColor = new SFColor(1,0,0);
    }
    else
    {
    m.diffuseColor = new SFColor(0,0,1);
    }
    }
    ",
    runscript passed
    ActualrunScript script called at main/MainLoop.c:512 num: 0 cx 0x7f35842bd5f0 "initialize()",
    runscript passed
    ============================================================================
    FreeWRL got a SIGSEGV - please feel free to report this - http://freewrl.sf.net.

     
  • dug9
    dug9
    2012-08-04

    Fixed in CVS code, the test file now works with a small modification to the javascript to put 2 global variables:

    var DEBUG;
    var mode;
    function initialize ()
    ...

     
  • dug9
    dug9
    2012-08-04

    • status: open --> closed-fixed