I think I found the root cause for the compiz-config-profile-setter segfault. The call "ccsFreeContext(context);" in line 218 in compiz_config_profile_setter.c frees the context object while background event processing still uses the object, which then leads to the segfault.
It seems the set_compiz_profile() call returns while a value-changed callback gets called in the background, which then calls ccsObjectGetInterface_() on the context object, but by then the context object already got destroyed.
I think the best way so solve this, would be to wait for the event processing to finish before freeing the context object, but I don't know how to do that properly. But not freeing the context object in compiz_config_profile_setter.c fixes the problem for me (the cssFreeContext() is called right before the compiz-config-profile-setter exits, so I think it doesn't really matter much). So
with this patch the memory gets freed on exiting of the program after the main loop has stopped.
I think I found the root cause for the compiz- config- profile- setter segfault. The call "ccsFreeContext (context) ;" in line 218 in compiz_ config_ profile_ setter. c frees the context object while background event processing still uses the object, which then leads to the segfault.
It seems the set_compiz_ profile( ) call returns while a value-changed callback gets called in the background, which then calls ccsObjectGetInt erface_ () on the context object, but by then the context object already got destroyed.
I think the best way so solve this, would be to wait for the event processing to finish before freeing the context object, but I don't know how to do that properly. But not freeing the context object in compiz_ config_ profile_ setter. c fixes the problem for me (the cssFreeContext() is called right before the compiz- config- profile- setter exits, so I think it doesn't really matter much). So
with this patch the memory gets freed on exiting of the program after the main loop has stopped.