Re: [gnome-db] Memory leaks



BTW, I am not how and if ( at all ) it's related to GDA leaks.

I have a code like this:

read struct->member /* member is GType type */
midgard_core_query_get_model(MidgardConnection *mgd, const gchar *query);
read struct->member

get_model function is very simple:

       GdaCommand *command;
       command = gda_command_new (query,
                        GDA_COMMAND_TYPE_SQL,
                        GDA_COMMAND_OPTION_STOP_ON_ERRORS);

       g_debug("query = %s", query);

        GdaDataModel *model =
                gda_connection_execute_select_command(
                                mgd->priv->connection,
                                command, NULL, NULL);
        gda_command_free(command);

        if(model) return model;

The problem is that after get_model function is invoked struct->member
holds value of quite different GType. It happens only with Apache prefork
environment. It never happens when Apache is running in single mode
without forking. gdb is useless now and valgrind mainly report those gda
leaks.

I wonder if it's gda or mine bug. Or maybe an issue of "weird" environment
( apache is not compiled against gmodule so GType system must be
initialized in child processes ) ?

Any clue how can I debug it?

Piotras




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]