Fwd: unanswered :Crashes applying ClipTex. to gsets or GFO bug?

New Message Reply Date view Thread view Subject view Author view

Joaquim Muchaxo (joaquim++at++rocketmail.com)
Tue, 12 May 1998 09:38:51 -0700 (PDT)


No one answered my previous question.
So I am sending you more information about
the problem and the source code in attachment.

 I have installed patch 2922 and the aplication
crashes less times and without halt the machine

However, I am still confused, am I doing something wrong
or does the Onyx2 need aditional patches ?

I am sure this section of the code I am sending
as attachment is related to the problem since without
performing that code it never crashed.

_________________________________________________________
DO YOU YAHOO!?
Get your free ++at++yahoo.com address at http://mail.yahoo.com

attached mail follows:


Date: Thu, 7 May 1998 02:13:09 -0700 (PDT)
From: Joaquim Muchaxo
Subject: X Crashes applying ClipTex. to gsets in Scene-G.
To: info-performer++at++sgi.com
I apply a cliptexture to all gsets in the scene-graph
successfully. However sometimes the aplication crashes
the X window manager.

I have removed the traversal that aplies the gstate
to every gset and it does not crash.
I have attached the source code. Would you help
me to debug it ?

Note: Neither of the versions in geoset_apply_geostate
(commented and uncommented) are crash free.

Best Regards,
Joaquim

---------------------------------------
void geoset_apply_geostate( pfGeoSet *GeoSet, pfGeoState *
gstate) {
/*
  pfGeoState *gs = pfGetGSetGState(GeoSet);
   
  if( !gs)
    printf("no gstate");
     
  if( pfGetGStateAttr(gs, PFSTATE_TEXTURE) == ct ) {
    printf("gstate already has a cliptexture");
    return;
  }
       
  pfGStateMode(gs, PFSTATE_ENTEXTURE, PF_ON);
  pfGStateAttr(gs, PFSTATE_TEXTURE, ct);
  pfGStateMode(gs, PFSTATE_ENLIGHTING, PF_ON);
*/

  pfGSetGState( GeoSet, NULL); /* to remove current
gstate*/
  pfGSetGState( GeoSet, (pfGeoState *)gstate );
}

void traverse_nodes( pfNode *node, process_node_fn todo,
      void *data) {
  int i, n;

  if (node == NULL || todo==NULL) {
    printf("traverse_nodes: node or 'to do' function is
NULL");
    return;
  }
  
  if( !todo( node, data) )
    return; /* prune traversal */

  if (pfIsOfType(node, pfGetGroupClassType())) {
   
    n = pfGetNumChildren((pfGroup *)node);
    for (i = 0; i < n; i++)
      traverse_nodes( pfGetChild( (pfGroup *)node, i),
todo, data );
  }
    /* other type, such as light, prune traversal */
}

main () {

    ct = pfdLoadClipTexture(ClipTexFileName);
    Shared->mpcliptex = pfNewMPClipTexture();

    pfMPClipTextureClipTexture(Shared->mpcliptex, ct);
    (void)pfuAddMPClipTextureToPipes(Shared->mpcliptex,
pfGetPipe(0), NULL);

......
/* set up geo state */
    GeoState = pfNewGState(arena);
    pfGStateMode(GeoState, PFSTATE_ENTEXTURE, PF_ON);
    pfGStateAttr(GeoState, PFSTATE_TEXTURE, ct);
    pfGStateMode(GeoState, PFSTATE_ENLIGHTING, PF_ON);

.......

if( TerrainFileName)
      Shared->terrain= pfdLoadFile( TerrainFileName );
       
  if( Shared->terrain) {
    pfAddChild(root, Shared->terrain);
    traverse_nodes( Shared->terrain, geode_apply_geostate,
        GeoState);
  }
......
}

===
Joaquim Muchaxo
ph:+(351-1)8318237
mobile:+(351+1)/(0)931-272387
-------------------------------------------------------------
IMERSIVA - Multimedia, Virtual Reality & Geograph. Info.
Sys.
http://www.imersiva.ch
mailto:info++at++imersiva.ch

_________________________________________________________
DO YOU YAHOO!?
Get your free ++at++yahoo.com address at http://mail.yahoo.com

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:23 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.