Hello Micheal,

On 03/07/2012 01:33 PM, Michael Raab wrote:
sorry I did not reproduce the message word by word.
The correct message was: "Can't find container id: 180"
I guess it was called here:

UInt32  <group__GrpBaseBaseBaseTypes.html#ga734724a6621a24ef28df7a3c27fa8b27>  
RemoteAspectFieldContainerMapper::map  
<structosg_1_1RemoteAspectFieldContainerMapper.html#ad378a07f089478df5079085414a7535e>(UInt32
  <group__GrpBaseBaseBaseTypes.html#ga734724a6621a24ef28df7a3c27fa8b27>  uiId)

ah, of course, no idea why I did not think of looking into the mapper...
Unfortunately that does not really give a hint what is going wrong, so attached is a patch that logs what the RemoteAspect receives/sends, maybe that gives better insight.

        Cheers,
                Carsten
diff --git a/Source/System/Cluster/Base/OSGRemoteAspect.cpp b/Source/System/Cluster/Base/OSGRemoteAspect.cpp
index 8902ced..013a3cf 100644
--- a/Source/System/Cluster/Base/OSGRemoteAspect.cpp
+++ b/Source/System/Cluster/Base/OSGRemoteAspect.cpp
@@ -58,6 +58,9 @@
 
 OSG_USING_NAMESPACE
 
+#define OSG_REMOTE_ASPECT_VERBOSE
+// #undef  OSG_REMOTE_ASPECT_VERBOSE
+
 /** \class osg::RemoteAspect
  *  \ingroup GrpSystemCluster
  *  \brief Remote aspect controll class
@@ -251,6 +254,13 @@ void RemoteAspect::receiveSync(Connection &connection, bool applyToChangelist)
                 {
                     localTypeId = FieldContainerFactory::the()->findType(name.c_str())->getId();
 
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+                    SLOG << "RA: NEWTYPE - type name '" << name
+                         << "' local type id [" << localTypeId
+                         << "] remote type id [" << remoteTypeId
+                         << "]" << std::endl;
+#endif
+
                     // insert remote type id into map
                     _localType[remoteTypeId] = localTypeId;
                 }
@@ -286,7 +296,14 @@ void RemoteAspect::receiveSync(Connection &connection, bool applyToChangelist)
                         // local <-> remote mapping
                         _localFC[fullRemoteId] = getContainerId(fcPtr);
                         _remoteFC[getContainerId(fcPtr)] = fullRemoteId;
-                        
+
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+                        SLOG << "RA: CREATED - type name '" << fcType->getName()
+                             << "' local id [" << getContainerId(fcPtr)
+                             << "] remote id [" << remoteId
+                             << "]" << std::endl;
+#endif
+
                         // make shure, client will not subref to zero
                         addRefCP(fcPtr);
                         addRefCP(fcPtr);
@@ -309,6 +326,13 @@ void RemoteAspect::receiveSync(Connection &connection, bool applyToChangelist)
                     fcPtr = factory->getContainer(localId);
                     if(fcPtr != NullFC)
                     {
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+                        SLOG << "RA: DESTROYED - type name '" << fcPtr->getType().getName()
+                             << "' local id [" << localId
+                             << "] remote id [" << remoteId
+                             << "]" << std::endl;
+#endif
+
                         callDestroyed(fcPtr);
 
                         // remove all references to avoid multiple
@@ -383,6 +407,14 @@ void RemoteAspect::receiveSync(Connection &connection, bool applyToChangelist)
                 {
                     fcPtr = factory->getContainer(localId);
 
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+                    SLOG << "RA: CHANGED - type name '" << fcPtr->getType().getName()
+                         << "' local id [" << localId
+                         << "] remote id [" << remoteId
+                         << "] mask 0x" << std::hex << mask << std::dec
+                         << std::endl;
+#endif
+
                     /*
                     for(int i=0;i<fcPtr->getType().getNumFieldDescs();i++)
                     {
@@ -425,6 +457,14 @@ void RemoteAspect::receiveSync(Connection &connection, bool applyToChangelist)
                             fcPtr->getType().getName().str(),
                             getContainerId(fcPtr))) 
                     addRefCP(fcPtr);
+
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+                    SLOG << "RA: ADDREFED - type name '" << fcPtr->getType().getName()
+                         << "' local id [" << localId
+                         << "] remote id [" << remoteId
+                         << "] post add ref count " << fcPtr.getRefCount()
+                         << std::endl;
+#endif
                 }
                 else
                 {
@@ -442,6 +482,15 @@ void RemoteAspect::receiveSync(Connection &connection, bool applyToChangelist)
                     FDEBUG(("SubRef: %s ID:%d\n", 
                             fcPtr->getType().getName().str(),
                             getContainerId(fcPtr)))
+
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+                    SLOG << "RA: SUBREFED - type name '" << fcPtr->getType().getName()
+                         << "' local id [" << localId
+                         << "] remote id [" << remoteId
+                         << "] pre sub ref count " << fcPtr.getRefCount()
+                         << std::endl;
+#endif
+
 #if 0
                     //ignore until solution is found for subrefs in destructors
                     subRefCP(fcPtr);
@@ -580,6 +629,12 @@ void RemoteAspect::sendSync(Connection &connection, ChangeList *changeList)
             connection.putValue(cmd);
             connection.putValue(typeId);
             connection.putValue(typeName);
+
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+            SLOG << "RA: NEWTYPE - type name '" << typeName
+                 << "' local type id [" << typeId
+                 << "]" << std::endl;
+#endif
         }
 
         cmd = CREATED;
@@ -587,6 +642,13 @@ void RemoteAspect::sendSync(Connection &connection, ChangeList *changeList)
         connection.putValue(typeId);
         connection.putValue(*createdI);
 
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+        SLOG << "RA: CREATED - type name '"
+             << fcFactory->findType(typeId)->getName()
+             << "' local type id [" << typeId
+             << "]" << std::endl;
+#endif
+
         // sent container to create
         _sentFC.insert(*createdI);
         // fc is known by remote
@@ -658,7 +720,15 @@ void RemoteAspect::sendSync(Connection &connection, ChangeList *changeList)
             FDEBUG(("Changed: %s ID:%d Mask:%lld\n", 
                     fcPtr->getType().getName().str(),
                     getContainerId(fcPtr), 
-                    mask))
+                    mask));
+
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+            SLOG << "RA: CHANGED - type name '"
+                 << fcPtr->getType().getName()
+                 << "' local id [" << getContainerId(fcPtr)
+                 << "] mask 0x" << std::hex << mask << std::dec
+                 << std::endl;
+#endif
         }
     }
 
@@ -683,6 +753,11 @@ void RemoteAspect::sendSync(Connection &connection, ChangeList *changeList)
             cmd = DESTROYED;
             connection.putValue(cmd);
             connection.putValue(id);
+
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+            SLOG << "RA: DESTROYED - local id [" << id
+                 << "]" << std::endl;
+#endif
         }
     }
 
@@ -705,6 +780,11 @@ void RemoteAspect::sendSync(Connection &connection, ChangeList *changeList)
         cmd = ADDREFED;
         connection.putValue(cmd);
         connection.putValue(id);
+
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+        SLOG << "RA: ADDREFED - local id [" << id
+             << "]" << std::endl;
+#endif
     }
 
     progress = 0;
@@ -727,6 +807,11 @@ void RemoteAspect::sendSync(Connection &connection, ChangeList *changeList)
         cmd = SUBREFED;
         connection.putValue(cmd);
         connection.putValue(id);
+
+#if defined(OSG_REMOTE_ASPECT_VERBOSE)
+        SLOG << "RA: SUBREFED - local id [" << id
+             << "]" << std::endl;
+#endif
     }
 
     cmd = SYNCENDED;
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to