GC affects Proxied Shared Object?
Hi, all
I found sth strange with the Proxied Shared Object when Garbage Collection in FMS 4.0. I have a FMS application 'ProxiedSOApp', in the Application start, it tries to get proxied SO from another FMS application 'MasterSOApp' every 5 seconds, and GC runs every 20 seconds.
application/MasterSOApp/main.asc
application.allowDebug=true;
var so;application.onAppStart = function( ){
so=SharedObject.get('MasterSO',false);
so.setProperty('Cabinet','Cabinet');
};application.onAppStop = function(){
trace('Application', 'Stopped.');
};
application/ProxiedSOApp/main.asc
application.allowDebug=true;
var nc;
var soRef;application.onAppStart = function( ){
trace('Application', 'Started.');
nc = new NetConnection();
nc.connect('rtmp://localhost/MasterSOApp', "console" );
nc.onStatus = function(info) {
trace(info.code);
};
nc.isAlive = function()
{
return true;
};
setInterval( updateSORef , 5000 );
setInterval( doGC , 20000 );
};function doGC(){
trace('GC working');
application.gc();
}function updateSORef(){
trace('updateSORef');
soRef=SharedObject.get('MasterSO',false,nc);
soRef.onSync=function(list) {
trace('sync begin');
for (var i = 0; i < list.length; i++)
{
trace('SO status: '+list.code+': '+list.name);
}
trace('sync end');
};
}application.onAppStop = function(){
trace('Application', 'Stopped.');
};
And I found the logs of ProxiedSOApp below
#Fields: date time x-pid x-status x-ctx x-comment
2012-11-13 14:48:26 13316 (s)2641173 ApplicationStarted. -
2012-11-13 14:48:26 13316 (s)2641173 NetConnection.Connect.Success -
2012-11-13 14:48:31 13316 (s)2641173 updateSORef -
2012-11-13 14:48:31 13316 (s)2641173 sync begin -
2012-11-13 14:48:31 13316 (s)2641173 SO status: clear: undefined -
2012-11-13 14:48:31 13316 (s)2641173 SO status: change: Cabinet -
2012-11-13 14:48:31 13316 (s)2641173 SO status: change: DataRetrieve -
2012-11-13 14:48:31 13316 (s)2641173 SO status: change: User -
2012-11-13 14:48:31 13316 (s)2641173 SO status: change: UserSession -
2012-11-13 14:48:31 13316 (s)2641173 sync end -
2012-11-13 14:48:36 13316 (s)2641173 updateSORef -
2012-11-13 14:48:41 13316 (s)2641173 updateSORef -
2012-11-13 14:48:46 13316 (s)2641173 GC working -
2012-11-13 14:48:46 13316 (s)2641173 sync begin -
2012-11-13 14:48:46 13316 (s)2641173 SO status: clear: undefined -
2012-11-13 14:48:46 13316 (s)2641173 sync end
...
Although the proxied SO is updated during the 1st get, when GC works, the proxied SO is cleared.(the Master SO is unchanged)
So I want to know, when GC, is there sth happened with the unreachable proxied SO reference which will clear the SO?
Thanks!
