GNOME Bugzilla – Bug 50606
segfault when starting the second time
Last modified: 2008-04-14 13:49:28 UTC
Compiled and installed 0.9pre3 following instructions on Mandrake 7.2 First time I started galeon, it converted my netscape stuff correctly and ran without problems. Afterwards galeon keeps segfaulting on startup. A quick look into gdb showed that the problem is in history. on the line item = doc->root->childs after the history file 'history.xml' has been parsed in. To my understanding the file has been loaded correctly and looks good in the editor, however the 'root' pointer is nil, which causes the crash.
CVS has a fix to stop this from crashing. However, this doesn't actually solve the root of the problem. If you could attach your history.xml to this bug report that would help me to debug it.
Ok, I'll do it from home tonight. BTW, does the reporter get an automatic notification when the bugzilla entry changes?
Created attachment 215 [details] history file causing the crash
the problems seem to be due to the fact that galeon finds libxml.so.2 on my system and that version of the library seems not to guarantee the integrity of the structure returned by the parsing (I have to check). Anyway, introducing additional checks for nil pointers seems to cure the problem. I removed the history file but galeon would still fail, although in the bookmark.c this time. Probably a similar but unrelated problem. The same was happening in session.c after I killed a galeon running in a debugger. I guess the whole is related to the changes in libxml. I'll check and let you know.
Yes, version two introduces some significant changes: 1.Node childs field has been renamed children 2.The document don't have anymore a root element it has been replaced by children and usually you will get a list of element here. which explains the lot. The bug isn't one, although one could say that for the sake of paranoical solidity, pointers should be checked before dereferencing. I guess all I have to do is make sure that galeon picks up libxml.so.1 instead of version 2. Any migration plans?
Yep there is a migration plan, You can mail sobotka@axess.com He is working on the galeon port to os/2 and he have a patch to make galeon work with libxml2.