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

Read stderr asynchronously to prevent hang if many errors logged #70

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

peitschie
Copy link
Contributor

I found this when using inside a docker container that did not contain any of Pango's fonts. The stderr filled up, and the process would hang without terminating.

@chtenb
Copy link
Member

chtenb commented Nov 15, 2023

Thanks for the report and the PR. At which line did you notice the hang? Was it stdout = memoryStream.ToArray();?

@peitschie
Copy link
Contributor Author

Hi @chtenb

I wasn't able to pin down the exact hang point yet.

I'm using this inside a windows docker container, so was not able to attach a debugger easily to find out. After making this change, the process stopped hanging and I could extract the stderr info figure out what was broken. (The windows container lacked any fonts, so the stderr was getting spammed with pango errors)

This is a known issue with streams and processes: https://stackoverflow.com/a/439633

@chtenb
Copy link
Member

chtenb commented Nov 15, 2023

Regardless, this fix makes sense to me. Thanks again!

@chtenb chtenb merged commit ed40b89 into Rubjerg:master Nov 15, 2023
1 check passed
@peitschie
Copy link
Contributor Author

My pleasure! Thanks for such a useful library. I was despairing of ever finding a straightforward solution to drawing .dot based files until I found your package here. It's saved me loads of time and configuration fiddling!

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

Successfully merging this pull request may close these issues.

2 participants