Hi Aron,

On Mon, 2005-06-20 at 14:39 -0500, Aron Bierbaum wrote:
> I am trying to use RemoteAspects to share information between two 
> machines but get the following when exiting the application on the 
> remote server side:
> 
> First-chance exception at 0x009d18c2 (OSGSystemD.dll) in 
> RemoteAspect.exe: 0xC0000005: Access violation reading location 0x38f63434.
> Unhandled exception at 0x009d18c2 (OSGSystemD.dll) in RemoteAspect.exe: 
> 0xC0000005: Access violation reading location 0x38f63434.
> 
> When looking at the stack trace it is obvious that the object id of 
> 3452816845 is incorrect. Does anyone have an a idea how I can track down 
> where this invalid id is coming from? I have tried not calling 
> osgExit(), but this does not seem to help the situation because Windows 
> still trys to clean up the data.

that's a pretty weird crash, as that is during cleanup of the
prototypes, which are never rendered and therefore should never get a
GLId. The GLIds are not explicitly initialized, but you can force it by
applying the patch below. I've also added a check to the Window to
handle this a little more gracefully, but in general this shouldn't
happen.

HIH

        Dirk

Here's the patch:

Index: State/OSGProgramChunkBase.cpp
===================================================================
RCS
file: /cvsroot/opensg/OpenSG/Source/System/State/OSGProgramChunkBase.cpp,v
retrieving revision 1.5
diff -u -3 -p -r1.5 OSGProgramChunkBase.cpp
--- State/OSGProgramChunkBase.cpp       26 May 2005 22:22:46 -0000
1.5
+++ State/OSGProgramChunkBase.cpp       20 Jun 2005 20:25:09 -0000
@@ -169,7 +169,7 @@ ProgramChunkBase::ProgramChunkBase(void)
     _sfProgram                (),
     _mfParamValues            (),
     _mfParamNames             (),
-    _sfGLId                   (),
+    _sfGLId                   (UInt32(0)),
     Inherited()
 {
 }
Index: State/OSGProgramChunk.fcd
===================================================================
RCS
file: /cvsroot/opensg/OpenSG/Source/System/State/OSGProgramChunk.fcd,v
retrieving revision 1.1
diff -u -3 -p -r1.1 OSGProgramChunk.fcd
--- State/OSGProgramChunk.fcd   2 Mar 2003 22:04:16 -0000       1.1
+++ State/OSGProgramChunk.fcd   20 Jun 2005 20:25:09 -0000
@@ -44,6 +44,7 @@ The ProgramChunk is the base class for g
                cardinality="single"
                visibility="internal"
                access="protected"
+               defaultValue="0"
        >
        The OpenGL ID of the program.
        </Field>
Index: Window/OSGWindow.cpp
===================================================================
RCS file: /cvsroot/opensg/OpenSG/Source/System/Window/OSGWindow.cpp,v
retrieving revision 1.43
diff -u -3 -p -r1.43 OSGWindow.cpp
--- Window/OSGWindow.cpp        31 May 2005 22:08:10 -0000      1.43
+++ Window/OSGWindow.cpp        20 Jun 2005 20:25:09 -0000
@@ -820,10 +820,20 @@ void OSG::Window::doInitRegisterGLObject
 */
 void OSG::Window::destroyGLObject(UInt32 id, UInt32 num)
 {
     std::vector<WindowPtr>::iterator it;

     for(it = _allWindows.begin(); it != _allWindows.end(); ++it)
     {
+#ifdef OSG_DEBUG
+        if(id + num > (*it)->_mfGlObjectLastReinitialize.size())
+        {
+            FWARNING(("Window::destroyGLObject:: id %d + num %d exceed"
+                "registered objects size %d!\n", id, num,
+                (*it)->_mfGlObjectLastReinitialize.size()));
+            return;
+        }
+#endif
         // has the object been used in this context at all?
         if((*it)->getGlObjectLastReinitialize()[id] != 0)
             (*it)->_glObjectDestroyList.push_back(DestroyEntry
(id,num));




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to