[eq-dev] Server::useConfig segmentation fault in 0.6 RC1

Juan Hernando jhernando at fi.upm.es
Thu Dec 4 16:40:43 CET 2008


Dear Equalizer developers,

Recently I've started porting and MPK based application to Equalizer. In 
order to initialize the configuration, the old application enabled the 
user to provide a configuration at runtime. In Equalizer that's trickier 
to do because I need to start the eqServer from my application.
So instead of doing that I'd like to use a local server inside the 
application node process and use Server::useConfig to give the 
configuration as a string. I know the function is undocumented and may 
disappear but in my case, it's useful, unless there is an easier way of 
starting the server with a user given configuration.
I've written a small test, which now is working. However it was crashing 
in the beginning and after some debugging I've come across something 
that, to me, seems to be a bug in Server::useConfig. Analyzing the code 
I've found that there is a difference between chooseConfig and useConfig 
in the sequence of operations performed in the server, while the first 
one calls Server::addConfig for the default config at some moment, the 
latter doesn't.
After the following change in Server::_cmdUseConfig:
     EQINFO << "Using config: " << endl << Global::instance() << config 
<< endl;
     config->setApplicationNetNode( node );
     +addConfig( config );
     mapConfig( config );
the test application works.

Is that a bug or am I doing something wrong in my test program (find the 
source attached)?

Thanks and best regards,
Juan Hernando
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.cfg
Url: http://www.equalizergraphics.com/pipermail/eq-dev/attachments/20081204/c92a7816/attachment.txt 


More information about the eq-dev mailing list