Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

xmlFreeChars error (on Windows) #6

cyphic opened this Issue Jul 12, 2012 · 3 comments


None yet
3 participants

cyphic commented Jul 12, 2012


when I got a call like that:




I get the following error:

unexpected fault address 0x137425ff
throw: fault
[signal 0xc0000005 code=0x0 addr=0x137425ff pc=0x137425ff]

goroutine 1 [syscall]:
github.com/moovweb/gokogiri/xml._Cfunc_xmlFreeChars(0x37a570, 0x201319a0)
        C:/Users/sOph/AppData/Local/Temp/go-build750256355/github.com/moovweb/gokogiri/xml/_obj/_cgo_defun.c:106 +0x31
github.com/moovweb/gokogiri/xml.(*XmlNode).Content(0x20132d30, 0x201319a0, 0x66)
        document.go:842 +0x75
github.com/moovweb/gokogiri/xml.(*AttributeNode).Value(0x200e0948, 0x20155dc0, 0x5cf2e4)
        C:/Go/src/pkg/github.com/moovweb/gokogiri/xml/attribute.go:12 +0x2a

similar errors also happen when running the tests in : go test github.com/moovweb/gokogiri/xml

the only way to access the attributes right now, seems to be doing something like:

var attribute string
attribute = string((*imgnode.Attribute("src")).ToBuffer(nil))
attribute = strings.Trim(attribute[strings.Index(attribute, "=")+1:], "\"' ")

zhigangc commented Jul 16, 2012

What's your libxml version?

cyphic commented Jul 16, 2012

I compiled the source code of libxml2-2.7.8, as gokogiri wouldn't install with the downloadable precompiled libs (something to do with msvc vs. mingw gcc compiler incompatibility according to some search results ...

also, as a windows user, there isn't really support for pkg-config, so I had to to improvise a .pc file from information i could find on how it works ... so its quite probable, i messed some part of it up

so if you or someone else could provide a fully working installation "step by step" for gokogiri for windows users, not just I would be thankful (it took me about 5 hours to get it installed).

@mdayaram mdayaram was assigned Aug 20, 2012


mdayaram commented Oct 15, 2013

Hey @cyphic, someone recently made steps on getting gokogiri work for windows:


Does that help out at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment