Re: problem with gdome_di_saveDocToFile()
Luca Padovani <[email protected]> Mon, 16 May 2005 15:21:30 +0200
| Newsgroups | gmane.comp.gnome.gdome |
|---|---|
| Message-ID | <1116249690.16111.13.camel@tempesta> |
On Mon, 2005-05-16 at 18:21 +0530, Sameer Oak wrote: > If I create an element in the main, it's doing fine. The moment I write > my own function to do that, it gives segfault. I believe part of the problem lies on line 45, where you unref a text node using gdome_t_unref(txtnode, &exc); but txtnode is subsequently used. The gdome2 library is very tricky because of reference counting, so please double check your code very carefully and use valgrind and/or gdb for detecting the source of the problems (most often related to pointers). It is not reasonable to assume that people on this list will debug your code, unless evidence is provided that there can be a problem within gdome2 itself. Also, bear in mind that language bindings for C++ and OCaml are available, and for these languages reference counting is taken care of automatically (either using smart pointers or garbage collection). All the best --luca