instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 22, 2018, 09:02:54 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: unallowed reference to namespace engine from within scene?  (Read 1574 times)
Peter_Pig
Newbie
*
Posts: 23


View Profile
« on: December 11, 2011, 09:31:22 am »

Hello dear all!

I'm not sure if I'm trying to do something unallowed or unexpected,  but it did work properly on the windows 32 bit plattform (with late 2.0 builds).

Since I had to migrate to Win 64, whenver I'm running this proto, I'm having trouble when shutting down Insant Player.

This is the problematic function initialize in the Proto's  Script :

Code:

function initialize(){

      var oVA=Browser.getView();
      var onVA=oVA.refNode;

       Browser.addRoute(onVA,'mousePress',this,'set_mousePress');
       Browser.addRoute(onVA,'mouseRelease',this,'set_mouseRelease');

       var opVA=onVA.getParents();

       for(var nc=0;nc<opVA.length;nc++){

             if(opVA[nc].toString().lastIndexOf('Window {}')!=-1){

                       Browser.addRoute(opVA[nc],'size',this,'set_screenSize');
                       break;
             }
        }
        opVA.length=0;
        onVA=null;
        oVA=null;
}

The function runs fine, and the desired routes are up and running, but when I try to close the Player, it won't shut down :

Quote from: console
LOG   Avalon    Dispatch Message: exit
LOG   Avalon    Subref context on Engine::doExit()
WARNING   Avalon    Run NodeNameSpace "engine" destructor and _nodeCount == 3
WARNING   Avalon    ~NodeNameSpace: Try to remove nodes from parents
FATAL   Avalon      engine/StandardViewarea/171250528: Cannot remove node: RC 2, PC 0


I have been trying to isolate the problem by commenting out parts of the code and found that the problem seems to be <var opVA=onVA.getParents();>

On the other hand, when I set ecmaGCPerFrame to "force" (in contextsetup), the problem seems to dissapear, but this is not a good solution for a PROTO intended to be re-used by other users.

Any good ideas?

So far, I wish you all a happy Christmas time.

Peter


p.s.: amazingly, function shutdown() is being called after "Avalon Run NodeNameSpace engine destructor" ... is that the way it should be?
« Last Edit: December 11, 2011, 09:38:20 am by Peter_Pig » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines