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

Spammed With Error Dialogs When Opening a non UTF-8 File #19908

Open
1 task done
garrettladley opened this issue Oct 29, 2024 · 4 comments
Open
1 task done

Spammed With Error Dialogs When Opening a non UTF-8 File #19908

garrettladley opened this issue Oct 29, 2024 · 4 comments
Labels
bug [core label] project panel Feedback for files tree view workspace Feedback for workspace management, layout, interactions, etc

Comments

@garrettladley
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When double clicking to open a non UTF-8 file (in my case a sqlite file) the following occurs:

  1. File doesn't open and no dialog appears
  2. Double click again n times
  3. 2(n+1) of the following dialogs appear. (n+1) from the first double click and each subsequent double click
error dialog

Environment

Zed: v0.158.2 (Zed)
OS: macOS 14.4.1
Memory: 8 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

I'd imagine this error dialog should be deduped so it only appears once or subsequent identical error dialogs are folded into one.

If applicable, attach your Zed.log file to this issue.

Many instances of the same log since I was making sure it was reproducible.

Zed.log
2024-10-29T11:09:26.392495-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:09:26.416311-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:09:26.41884-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:09:26.428691-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:11:26.249178-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:11:26.269105-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:11:26.271739-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:11:26.2741-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:11:26.276491-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:11:26.278781-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:11:26.299016-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:11:28.319565-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:12:50.616733-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:12:50.62773-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:12:51.191081-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:12:51.199785-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:12:51.205908-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:12:51.246381-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:13:00.820586-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:13:00.824102-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:13:00.826367-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:13:00.828532-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:13:46.633574-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:13:46.637793-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:13:46.640122-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:13:46.642374-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:14:08.458293-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:14:08.487403-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:14:08.490506-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:14:08.493145-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:14:08.495738-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:14:08.513175-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:30.665507-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:30.684635-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:30.687128-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:30.689522-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:30.691737-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:30.706348-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:42.183393-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:42.195892-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:42.198298-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:15:42.200515-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:18:07.311445-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:18:07.318099-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:18:07.320596-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:18:08.177375-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:18:11.593752-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:18:11.972994-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:18:16.088197-04:00 [ERROR] stream did not contain valid UTF-8
2024-10-29T11:18:16.09622-04:00 [ERROR] stream did not contain valid UTF-8
@garrettladley garrettladley added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Oct 29, 2024
@notpeter
Copy link
Member

Can you provide a screen recording? (cmd-shift-5).
I was not immediately able to reproduce, the modal dialog immediately stole focus and prevented me from double clicking multiple times.

@garrettladley
Copy link
Author

i clicked a bunch of times just for examples sake. also, realizing it might have something to do with focus of the window and or an open file
https://github.com/user-attachments/assets/fbde2784-58d0-4fb9-8346-f06fbc9663e7

@notpeter
Copy link
Member

Is that perhaps a big file? I wonder if we are reading the entire contents before recognizing that it's definitely a binary file. Either way we should probably (1) only try to open a file once (2) bail on reading a binary file sooner.

@notpeter notpeter added workspace Feedback for workspace management, layout, interactions, etc project panel Feedback for files tree view and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Oct 29, 2024
@garrettladley
Copy link
Author

yeah you're right, it was a pretty big file.

ls -lh example1.sqlite3
-rw-r--r--@ 1 garrett.ladley  staff   258M Oct 29 12:12 example1.sqlite3

@github-actions github-actions bot added admin read Pending admin review triage Maintainer needs to classify the issue labels Nov 5, 2024
@JosephTLyons JosephTLyons removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] project panel Feedback for files tree view workspace Feedback for workspace management, layout, interactions, etc
Projects
Status: No status
Development

No branches or pull requests

3 participants