|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
problem with API gdome_a_unref()...Current versions of GDOME and LibXML libraries I have, are as follows:
libxml: libxml2-2.5.4-1 libxml2-devel-2.5.4-1 libgdome: gdome2-0.8.1-1 gdome2-devel-0.8.1-1 I am facing problem with API gdome_a_unref(). Kindly go through the following snippet: -- int get_element_attribute(char *strAttrName, GdomeNode *gNode, GdomeDOMString **attrValue) { GdomeException exc = 0; GdomeDOMString *attrName = (GdomeDOMString *)NULL; GdomeAttr *attr = (GdomeAttr *)NULL; *attrValue = (GdomeDOMString *)NULL; attrName = gdome_str_mkref(strAttrName); attr = gdome_el_getAttributeNode((GdomeElement *)gNode, attrName, &exc); gdome_str_unref(attrName); if(NULL == attr) { LOG(LOG_ERR, "<%s> NULL GDOME attribute for atrribute %s.", __func__, strAttrName); return FAILURE; } *attrValue = gdome_a_nodeValue(attr, &exc); if(NULL == *attrValue) { LOG(LOG_ERR, "<%s> NULL attribute value for atrribute %s.", __func__, strAttrName); gdome_a_unref(attr, &exc); return FAILURE; } gdome_a_unref(attr, &exc); return OK; } -- After running for a long time, my Server is crashing at call gdome_a_unref(). I am not being able to figure out why is this happening. . _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
|
|
Re: problem with API gdome_a_unref()...Hi Sameer,
On 13/apr/06, at 07:41, Sameer Oak wrote: > Kindly go through the following snippet: [...] at first sight I don't see anything wrong with it, but judging a snippet of code without any context is hard, and nobody is likely to have a look at a whole, large application. I suggest you to reduce the code until you're able to reproduce the problem in a small, self-contained source that you can post on the list. Cheers, --luca _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
|
|
Re: problem with API gdome_a_unref()...On 4/18/06, Luca Padovani <padovani.luca@...> wrote:
> Hi Sameer, > > On 13/apr/06, at 07:41, Sameer Oak wrote: > > Kindly go through the following snippet: > [...] > > at first sight I don't see anything wrong with it, but judging a > snippet of code without any context is hard, and nobody is likely to > have a look at a whole, large application. > > I suggest you to reduce the code until you're able to reproduce the > problem in a small, self-contained source that you can post on the list. Hi Luca, Seems that my patch[1] fixed that. Problem is that you misused xmlFree() and g_free(), then you get some invalid reads or memory leaks. I also sent another patch[2] to allow XPath on default namespace, but no comments from you. I would like some feedback on it too. [1] http://mail.gnome.org/archives/gdome/2006-March/msg00009.html [2] http://mail.gnome.org/archives/gdome/2006-March/msg00013.html -- Gustavo Sverzut Barbieri -------------------------------------- Jabber: barbieri@... MSN: barbieri@... ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 Phone: +1 (347) 624 6296; 08122692@... GPG: 0xB640E1A2 @ wwwkeys.pgp.net _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
|
|
Re: problem with API gdome_a_unref()...Hi Gustavo,
On 19/apr/06, at 05:27, Gustavo Sverzut Barbieri wrote: > I also sent another patch[2] to allow XPath on default namespace, but > no comments from you. I would like some feedback on it too. aha, that was caught by my anti-spam filter. I had a look at the patch. Basically the only change I made was in gdome-xpath.c, which is generated automatically from test/apigen/xpath.xml (see README.developer). Incidentally, I noticed that test-xpath crashes with a "Bus error" but am not going to look into that right now. I shall commit the patch later today. Thanks a lot. Cheers, --luca _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
|
|
Re: problem with API gdome_a_unref()...On 4/19/06, Luca Padovani <padovani.luca@...> wrote:
> Hi Gustavo, > > On 19/apr/06, at 05:27, Gustavo Sverzut Barbieri wrote: > > I also sent another patch[2] to allow XPath on default namespace, but > > no comments from you. I would like some feedback on it too. > > aha, that was caught by my anti-spam filter. :-) > I had a look at the patch. Basically the only change I made was in > gdome-xpath.c, which is generated automatically from > > test/apigen/xpath.xml > > (see README.developer). Sorry.... I'll look at it later, I'm traveling this week Actually, it changes the xpath submodule, gdome-xpath.c is just to expose the api, as you said this can be auto-generated. > Incidentally, I noticed that test-xpath crashes with a "Bus error" > but am not going to look into that right now. > > I shall commit the patch later today. Thanks! -- Gustavo Sverzut Barbieri -------------------------------------- Jabber: barbieri@... MSN: barbieri@... ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 Phone: +1 (347) 624 6296; 08122692@... GPG: 0xB640E1A2 @ wwwkeys.pgp.net _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
|
|
Re: problem with API gdome_a_unref()...On 19/apr/06, at 11:47, Gustavo Sverzut Barbieri wrote: >> I shall commit the patch later today. patch committed. Thanks again, --luca _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
|
|
Re: problem with API gdome_a_unref()...On 4/19/06, Luca Padovani <padovani.luca@...> wrote:
> > On 19/apr/06, at 11:47, Gustavo Sverzut Barbieri wrote: > >> I shall commit the patch later today. > > patch committed. This was the enhancement one, how about the bugfix for the memory leak/invalid free? http://mail.gnome.org/archives/gdome/2006-March/msg00009.html -- Gustavo Sverzut Barbieri -------------------------------------- Jabber: barbieri@... MSN: barbieri@... ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 Phone: +1 (347) 624 6296; 08122692@... GPG: 0xB640E1A2 @ wwwkeys.pgp.net _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
|
|
Re: problem with API gdome_a_unref()...On 24/apr/06, at 14:07, Gustavo Sverzut Barbieri wrote: > This was the enhancement one, how about the bugfix for the memory > leak/invalid free? > > http://mail.gnome.org/archives/gdome/2006-March/msg00009.html These all look good to me. Committed. Thanks a lot Gustavo! --luca _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
| Free embeddable forum powered by Nabble | Forum Help |