Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmlFreeChars error (on Windows) #6

Open
cyphic opened this issue Jul 12, 2012 · 3 comments
Open

xmlFreeChars error (on Windows) #6

cyphic opened this issue Jul 12, 2012 · 3 comments
Assignees

Comments

@cyphic
Copy link

cyphic commented Jul 12, 2012

Hi,

when I got a call like that:

imgnode.Attr("src")

or

imgnode.Attribute("src").Value()

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
Copy link
Contributor

What's your libxml version?

@cyphic
Copy link
Author

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).

@ghost ghost assigned mdayaram Aug 20, 2012
@mdayaram
Copy link
Contributor

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

#49

Does that help out at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants