On Thu, Jan 28, 2010 at 3:49 PM, Stephen Furlani <[email protected]> wrote: > I'm sure this is a case of 'wrong thinking' on my part, and a general > lack of understanding of C++ STL: > > bool getContext(eq::Config* eqConfig, AGLContext eqAGL_CTX, int node, > int pipe, int window) > { > //return specified > const eq::NodeVector& nv = eqConfig->getNodes(); > const eq::PipeVector& pv = nv[node]->getPipes(); > const eq::WindowVector& wv = pv[pipe]->getWindows(); [...] > and gives me a EXC_BAD_ACCESS which I think is an incorrect pointer to > memory...
It looks to me that node is out-of-bounds, and you dereference a 0 pointer. Check that node is not bigger or equal to nv.size(). > Is there a better way of getting the AGLContext object out of > Equalizer? I'm working with how eqHello creates things, and I noticed > that configVisitor goes about it a bit differently. Where are you doing this? Why do you need the AGLContext there? In general, it is quite dangerous to play around with GL context's in places and threads, unless you're sure of what you are doing. Normally it's less painful to move this stuff, e.g., to Window::configInitGL. The ConfigVisitor/accept follows the Visitor pattern. Google can explain it better then me. HTH, Stefan. _______________________________________________ eq-dev mailing list [email protected] http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev http://www.equalizergraphics.com

