[anjuta/gnome-2-32] bgo #633018 crash in Anjuta IDE: miuse of xmlCleanupParser
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gnome-2-32] bgo #633018 crash in Anjuta IDE: miuse of xmlCleanupParser
- Date: Wed, 29 Dec 2010 20:10:32 +0000 (UTC)
commit ab086784fdad29d9346ecf337b24975385e405d2
Author: Johannes Schmid <jhs gnome org>
Date: Wed Dec 29 18:41:05 2010 +0100
bgo #633018 crash in Anjuta IDE: miuse of xmlCleanupParser
.gitignore | 1 +
NEWS | 3 ++-
libanjuta/anjuta-profile-manager.c | 2 --
plugins/document-manager/anjuta-bookmarks.c | 1 -
plugins/language-manager/plugin.c | 1 -
src/Makefile.am | 4 ++++
src/main.c | 5 +++++
7 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fd6cf14..328992d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -104,6 +104,7 @@
/po/te.gmo
/po/th.gmo
/po/tr.gmo
+/po/ug.gmo
/po/uk.gmo
/po/vi.gmo
/po/zh_CN.gmo
diff --git a/NEWS b/NEWS
index b2e3541..ff1296d 100644
--- a/NEWS
+++ b/NEWS
@@ -4,8 +4,9 @@ Bugs fixed:
bgo#636665 - [PATCH] .vapi file not distributed
lp#448126 - The "Report bugs" menu entry does not work
bgo#636312 - Double click fails to select entire word if it contains _ or digits
+bgo#633018 crash in Anjuta IDE: misuse of xmlCleanupParser
-Thanks to: Robert Ancell
+Thanks to: Robert Ancell, Sébastien Granjoux
Anjuta 2.32.1 "2.x, we will miss you" (12 Nov 2010) -- Johannes Schmid
diff --git a/libanjuta/anjuta-profile-manager.c b/libanjuta/anjuta-profile-manager.c
index 6c275f4..241e512 100644
--- a/libanjuta/anjuta-profile-manager.c
+++ b/libanjuta/anjuta-profile-manager.c
@@ -35,8 +35,6 @@
*/
#include <string.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
#include <libanjuta/anjuta-debug.h>
#include <libanjuta/anjuta-marshal.h>
diff --git a/plugins/document-manager/anjuta-bookmarks.c b/plugins/document-manager/anjuta-bookmarks.c
index e8dd9d4..321538e 100644
--- a/plugins/document-manager/anjuta-bookmarks.c
+++ b/plugins/document-manager/anjuta-bookmarks.c
@@ -774,7 +774,6 @@ anjuta_bookmarks_session_load (AnjutaBookmarks* bookmarks, AnjutaSession* sessio
read_bookmarks (bookmarks, cur->children);
xmlFreeDoc (doc);
- xmlCleanupParser();
}
static gint
diff --git a/plugins/language-manager/plugin.c b/plugins/language-manager/plugin.c
index 88d98bd..4a0ca73 100644
--- a/plugins/language-manager/plugin.c
+++ b/plugins/language-manager/plugin.c
@@ -130,7 +130,6 @@ load_languages (LanguageManager* language_manager)
g_free (strings);
}
xmlFreeDoc(doc);
- xmlCleanupParser();
}
static gboolean
diff --git a/src/Makefile.am b/src/Makefile.am
index e9609ef..d284626 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,6 +19,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)\
-I.. -I. \
$(LIBANJUTA_CFLAGS) \
+ $(GDL_CFLAGS) \
+ $(XML_CFLAGS) \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_DATA_DIR="\"$(datadir)/$(PACKAGE)\"" \
-DPACKAGE_DOC_DIR=\"$(docdir)\" \
@@ -47,6 +49,8 @@ anjuta_LDADD = \
$(GLADE_LIBS)\
$(GLIB_LIBS) \
$(top_builddir)/libanjuta/libanjuta.la
+ $(LIBANJUTA_LIBS) \
+ $(XML_LIBS)
anjuta_LDFLAGS = $(ANJUTA_LDFLAGS)
diff --git a/src/main.c b/src/main.c
index 8bf08ec..e5d28bf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,6 +34,7 @@
#include <libanjuta/resources.h>
#include <libanjuta/anjuta-debug.h>
#include <libanjuta/interfaces/ianjuta-file-loader.h>
+#include <libxml/parser.h>
#include "anjuta.h"
@@ -264,5 +265,9 @@ main (int argc, char *argv[])
gtk_widget_show (GTK_WIDGET (app));
gtk_main();
+ /* xmlCleanupParser must be called only one time in the application */
+ if (proper_shutdown)
+ xmlCleanupParser ();
+
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]