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

Logger hanging in Windows when 'Open Log' button fails #840

Closed
yezr opened this issue Jun 7, 2024 · 2 comments · Fixed by #843
Closed

Logger hanging in Windows when 'Open Log' button fails #840

yezr opened this issue Jun 7, 2024 · 2 comments · Fixed by #843

Comments

@yezr
Copy link
Collaborator

yezr commented Jun 7, 2024

In my test run (both with 2013_minneapolis_park_config.json and dominion_alaska_config.json), this button didn't work and I got a warning in the logs saying:

WARNING: Failed to open file explorer: Cannot run program "open": CreateProcess error=2, The system cannot find the file specified

Then window then stayed open and I had to X out of it to get rid of it.

The file definitely exists... I'm guessing this has to do with Windows maybe behaving differently than a Mac? I'm on Windows 11.

Another issue arising from this: I noticed that no message appeared in the logger window the first couple times I clicked, and then the third time it appeared with three messages.

Originally posted by @HEdingfield in #812 (comment)

@artoonie
Copy link
Collaborator

artoonie commented Jun 9, 2024

I believe the first issue (opening logger in Explorer) is fixed, and the only remaining issue is the last bit (no messages appear, then all appear at once).

@HEdingfield can you let us know if you continue to encounter that issue? I'm testing on Windows and haven't seen it happen yet.

@HEdingfield
Copy link
Contributor

Correct, just the second point needs addressing now. And yes, I can still repro it by making it so this line:

Logger.warning("Failed to open file explorer: " + e.getMessage());

Gets triggered whenever the button is clicked (via throw new IOException(); above it), then clicking the button a number of times. The first few times will often work, but if I click it 4 or 5 times, it'll only show 3 or 4 messages below, until I click it some more and then a number of extra catch-up messages will show.

As mentioned in the comment, I suspect it's due to the code around the comment you wrote in Logger.java saying:

// we add to a queue and schedule an occasional update to the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants