merged defaultfile and the other outstanding fixes

Lubomir I. Ivanov neolit123 at gmail.com
Tue Sep 18 07:59:27 PDT 2012


On 18 September 2012 17:19, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> some progress,
>
> if i comment out:
> parse_file(filename, &error);
> in gtk-gui.c: file_open() it no longer crashes for me when opening the
> menu or selecting a new file with the file chooser.
>

just sent a patch:
[PATCH] Call xmlCleanupParser only once - when we are done with libxml

a third party library indeed but a local mistake due to a misleading
function title:

http://xmlsoft.org/html/libxml-parser.html
"This function name is somewhat misleading. It does not clean up
parser state, it cleans up memory allocated by the library itself. It
is a cleanup function for the XML library. It tries to reclaim all
related global memory allocated for the library processing. It doesn't
deallocate any document related memory. One should call
xmlCleanupParser() only when the process has finished using the
library and all XML/HTML documents built with it. See also
xmlInitParser() which has the opposite function of preparing the
library for operations. WARNING: if your application is multithreaded
or has plugin support calling this may crash the application if
another thread or a plugin is still using libxml2. It's sometimes very
hard to guess if libxml2 is in use in the application, some libraries
or plugins may use it without notice. In case of doubt abstain from
calling this function or do it just before calling exit() to avoid
leak reports from valgrind !"

let me know if this fixes the unexpected crashes related to "file -> open"...

lubomir
--


More information about the subsurface mailing list