-
Notifications
You must be signed in to change notification settings - Fork 115
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
Stack Overflow when parsing recursive types #86
Comments
Sorry thought I was on the wrong github repo. I still have this issue. |
Thanks for the report. It's possible that a loop was created in the tree during parsing by one of the passes in the xsd package. If you are able to share the xsd file I can take a look. If you're not, you could start by running the |
I get the same problem with Here is the file in question. I added some logging in question and I think its to do with the global attributes file. It is pretty big. Attachment removed Let me know when you have the file and I will remove the link. |
Thanks, I have it and reproduced your issue. I am still in the process of debugging. The problem appears to be in the |
I think I see the issue. There is an element in
XML schema does allow recursive types[1], I've just never accounted for them. For
|
That sounds like a great idea. Thank you for the prompt investigation |
This should resolve issue droyo#86
Hi, I am trying to use xsdgen with a large xsd file with several large dependencies.
I get this error after a few seconds.
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow
runtime stack:
runtime.throw(0x7a70d4, 0xe)
/usr/local/go/src/runtime/panic.go:608 +0x72
runtime.newstack()
/usr/local/go/src/runtime/stack.go:1008 +0x729
runtime.morestack()
/usr/local/go/src/runtime/asm_amd64.s:429 +0x8f
goroutine 1 [running]:
aqwari.net/xml/xsd.or.func1(0xc000234200, 0x0)
/home/droker/Development/go/src/aqwari.net/xml/xsd/search.go:20 +0x92 fp=0xc02191a368 sp=0xc02191a360 pc=0x597de2
aqwari.net/xml/xsd.hasChild.func1(0xc0004c7300, 0x597db5)
/home/droker/Development/go/src/aqwari.net/xml/xsd/search.go:33 +0x85 fp=0xc02191a3a0 sp=0xc02191a368 pc=0x597e75
aqwari.net/xml/xmltree.(*Element).SearchFunc.func1(0xc0004c7300)
/home/droker/Development/go/src/aqwari.net/xml/xmltree/xmltree.go:327 +0x45 fp=0xc02191a400 sp=0xc02191a3a0 pc=0x565ad5
aqwari.net/xml/xmltree.(*Element).walk(0xc000234100, 0xc0419190e0, 0xc000234100, 0x0)
/home/droker/Development/go/src/aqwari.net/xml/xmltree/xmltree.go:287 +0x3b fp=0xc02191a420 sp=0xc02191a400 pc=0x56520b
aqwari.net/xml/xmltree.(*Element).SearchFunc.func1(0xc000234100)
/home/droker/Development/go/src/aqwari.net/xml/xmltree/xmltree.go:330 +0xa0 fp=0xc02191a480 sp=0xc02191a420 pc=0x565b30
aqwari.net/xml/xmltree.(*Element).walk(0xc000563800, 0xc0419190e0, 0xc000563800, 0x0)
/home/droker/Development/go/src/aqwari.net/xml/xmltree/xmltree.go:287 +0x3b fp=0xc02191a4a0 sp=0xc02191a480 pc=0x56520b
aqwari.net/xml/xmltree.(*Element).SearchFunc.func1(0xc000563800)..............
There is a huge stack trace.
Any ideas if there is anything I can do?
Thanks
Dean
The text was updated successfully, but these errors were encountered: