Closed jrobsonchase closed 7 years ago
@metaleap I'm having the same issue with a Juniper JUNOS XSD file (I have to serve it from a localhost since it's not on a public URI)
$ xsd-makepkg -uri http://localhost:8090/config-14.2.xsd
2016/11/07 17:56:30 LOAD: http://localhost:8090/config-14.2.xsd
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x7706a]
goroutine 1 [running]:
panic(0x256160, 0xc4200140a0)
/usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:500 +0x1a1
github.com/metaleap/go-xsd.(*RestrictionSimpleEnumeration).makePkg(0xc421560120, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:620 +0x8a
github.com/metaleap/go-xsd.(*hasElemsEnumeration).makePkg(0xc4219676c0, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:89 +0x55
github.com/metaleap/go-xsd.(*RestrictionSimpleContent).makePkg(0xc421967600, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:605 +0x111
github.com/metaleap/go-xsd.(*hasElemRestrictionSimpleContent).makePkg(0xc42158d4f0, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:221 +0x47
github.com/metaleap/go-xsd.(*SimpleContent).makePkg(0xc42158d480, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:731 +0x73
github.com/metaleap/go-xsd.(*hasElemSimpleContent).makePkg(0xc4215726b8, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:251 +0x47
github.com/metaleap/go-xsd.(*ComplexType).makePkg(0xc4215725a0, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:179 +0x371
github.com/metaleap/go-xsd.(*hasElemComplexType).makePkg(0xc4214fca20, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:65 +0x47
github.com/metaleap/go-xsd.(*Element).makePkg(0xc4214fc900, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:367 +0x131
github.com/metaleap/go-xsd.(*hasElemsElement).makePkg(0xc4215b75b0, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:83 +0x55
github.com/metaleap/go-xsd.(*Choice).makePkg(0xc4215b7500, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:145 +0xd6
github.com/metaleap/go-xsd.(*hasElemsChoice).makePkg(0xc4215b7298, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:53 +0x55
github.com/metaleap/go-xsd.(*Choice).makePkg(0xc4215b7200, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:142 +0x79
github.com/metaleap/go-xsd.(*hasElemsChoice).makePkg(0xc4215b7198, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:53 +0x55
github.com/metaleap/go-xsd.(*Sequence).makePkg(0xc4215b7100, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:721 +0x79
github.com/metaleap/go-xsd.(*hasElemSequence).makePkg(0xc421572590, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:239 +0x47
github.com/metaleap/go-xsd.(*ComplexType).makePkg(0xc421572480, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:177 +0x327
github.com/metaleap/go-xsd.(*hasElemComplexType).makePkg(0xc4215a1c20, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:65 +0x47
github.com/metaleap/go-xsd.(*Element).makePkg(0xc4215a1b00, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:367 +0x131
github.com/metaleap/go-xsd.(*hasElemsElement).makePkg(0xc4215b70b0, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:83 +0x55
github.com/metaleap/go-xsd.(*Choice).makePkg(0xc4215b7000, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:145 +0xd6
github.com/metaleap/go-xsd.(*hasElemsChoice).makePkg(0xc4215b6e98, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:53 +0x55
github.com/metaleap/go-xsd.(*Sequence).makePkg(0xc4215b6e00, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:721 +0x79
github.com/metaleap/go-xsd.(*hasElemSequence).makePkg(0xc421572350, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:239 +0x47
github.com/metaleap/go-xsd.(*ComplexType).makePkg(0xc421572240, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:177 +0x327
github.com/metaleap/go-xsd.(*hasElemComplexType).makePkg(0xc4215a1620, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:65 +0x47
github.com/metaleap/go-xsd.(*Element).makePkg(0xc4215a1500, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:367 +0x131
github.com/metaleap/go-xsd.(*hasElemsElement).makePkg(0xc4215b6db0, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:83 +0x55
github.com/metaleap/go-xsd.(*Choice).makePkg(0xc4215b6d00, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:145 +0xd6
github.com/metaleap/go-xsd.(*hasElemsChoice).makePkg(0xc4215b6c98, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:53 +0x55
github.com/metaleap/go-xsd.(*Sequence).makePkg(0xc4215b6c00, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:721 +0x79
github.com/metaleap/go-xsd.(*hasElemSequence).makePkg(0xc4215dff70, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:239 +0x47
github.com/metaleap/go-xsd.(*ComplexType).makePkg(0xc4215dfe60, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:177 +0x327
github.com/metaleap/go-xsd.(*hasElemsComplexType).makePkg(0xc4200c2680, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/hasmakepkg.go:71 +0x55
github.com/metaleap/go-xsd.(*Schema).makePkg(0xc4200c2500, 0xc42000eb40)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/elemmakepkg.go:705 +0xd6
github.com/metaleap/go-xsd.(*Schema).MakeGoPkgSrcFile(0xc4200c2500, 0x1e, 0xc42004fe01, 0xc4200c2500, 0x0)
/Users/jboswell/go/src/github.com/metaleap/go-xsd/xsd-schema.go:170 +0x377
main.main()
/Users/jboswell/go/src/github.com/metaleap/go-xsd/xsd-makepkg/main.go:65 +0x21a
Trying to get a package generated to parse web.xml files. This was built from commit 56ab80f.