-
Notifications
You must be signed in to change notification settings - Fork 324
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
Limit Network text view to 2^16 characters to prevent it from crashing #6254
Conversation
I'm fine with this for now, but I think this warrants further investigation as to why it causes a hang. We shouldn't have an issue rendering 2^16 characters. Can you file an issue to follow up on this? |
NetworkResponseViewType.text => Text( | ||
responseBody, | ||
// Using TextViewer fixes | ||
// https://github.com/flutter/devtools/issues/5973 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above issue should be closed when this PR lands, but I'd file a new issue for this as it's a bandaid fix if we don't know why we're seeing the hang in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created the following issues in response to this discussion:
For images, the request and response bodies can get large which cause the Text view to hang DevTools.
I've hardcoded the 2^16 character limit for now, but I could be persuaded to allow an override in case other textviews have different needs.
Fixes #5973
Examples
Truncated
Under Character Limit