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

ParseBytes method error every time after the first error #60

Closed
canuran opened this issue Aug 19, 2022 · 4 comments
Closed

ParseBytes method error every time after the first error #60

canuran opened this issue Aug 19, 2022 · 4 comments

Comments

@canuran
Copy link

canuran commented Aug 19, 2022

graphviz.ParseBytes([]byte(`digraph{a->b;b->d;a->c;c->d;}`)) // success
graphviz.ParseBytes([]byte(`digraph{a->b;b->d;a->c;c->d;}www`)) // error
graphviz.ParseBytes([]byte(`digraph{a->b;b->d;a->c;c->d;}`)) // error
graphviz.ParseBytes([]byte(`digraph{a->b;b->d;a->c;c->d;}`)) // error
graphviz.ParseBytes([]byte(`digraph{a->b;b->d;a->c;c->d;}`)) // error
@codyaray
Copy link

I just ran into the same issue. It seems like Aglasterr() is implemented using a file on disk (global!) which is never cleaned up. There is an agreseterrors() in the C code, but it's never called... and doesn't look like it removes the file anyway.

@denk0403
Copy link
Contributor

denk0403 commented Feb 13, 2023

This has been driving me insane all week. I thought it was certainly a Vercel issue because I wasn't experiencing it locally, but rather only when I deployed it to Vercel's edge network, but I guess the strange behavior is actually that I wasn't experiencing it locally.

Did anyone find a workaround? If not, I'm willing to try to make a PR with the fix, but I'm not super familiar with Go or C.

I made a PR that fixed my use case. Hopefully a maintainer can take a look at it and accept it soon. But if not, I'm hosting my own version of the package with the fix here.

@denk0403
Copy link
Contributor

This issue has been fixed with the merge of 865af03, and can be closed now.

@goccy
Copy link
Owner

goccy commented Mar 22, 2023

v0.1.1 has been released ! Please check 😄

@goccy goccy closed this as completed Mar 22, 2023
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

4 participants